Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About AdamT

  • Rank


  • Gender
  • URL
  1. AdamT

    Plugin Help: nfdump + nfsen

    Hi, let me preface this with "I am not an expert, I built one unMenu package". I looked at this for a bit today. I couldn't find any Slackware (the distro unRAID is based upon) packages for these applications. I attempted to build them and almost succeeded. Unfortunately, there are a few issues. Here is some technical blather about what issues I had: the standard build of nfdump doesn't include nfprofile, which I found out when I finally got all the other dependencies for nfsen and tried to install it. to build nfprofile (--enable-nfprofile) you need the headers from rddtools, but the rrdtool package I was using (http://www.slackers.it/repository/rrdtool/pkg/rrdtool-1.4.7-i686-2cf.txz) does not have a devel package and trying to "fake it" by copying the headers out of the tar.gz (http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.7.tar.gz) didn't work. That means that someone would have to build a proper rrdtool package (or at least a proper rrdtool-devel package). I played around with this for a bit, but there were a TON of dependencies that I was digging around to find (because unRAID is very slim on extra packages). Also, there seems to be a bug in the perl version I am running (http://slackware.cs.utah.edu/pub/slackware/slackware-12.2/slackware/d/perl-5.10.0-i486-1.tgz) which causes a undefined symbol: Perl_xs_apiversion_bootcheck error when trying to install nfsen. I was able to upgrade to the newest slackware perl to get around this (http://mirrors.slackware.com/slackware/slackware-14.0/slackware/d/perl-5.16.1-i486-1.txz), but am unsure if this version of perl would cause other things to break. That was just trying to get it to compile/install. who knows if it would have worked. If I have some more time, I'll try again. Not sure what your linux skill level is so apologies if the next explanation is too basic (or too complicated, or even wrong). for terminology: a package is a binary install of a bunch of files. In Slackware/unRAID, a package is a .txz or .tgz file. Basically, someone builds the program from source code (.tar.gz file) and makes the package to save other folks the hassle. You can get packages from the "official" distro page (slackware.com) or other places on the internet (if you trust them) or, if all else fails, build them yourself. If you can compile something, it is easy to package it up from there (see http://www.slackwiki.com/Building_A_Package) a script is "glue" to handle the actual install. if the program you want needs to have a directory created, or a config file copied, or something scheduled, or checking to see if something else is installed, it would be done in a script (shell script, usually). Some very simple addons are really just scripts. specific to unRAID, a package can also mean an unMenu package. This basically is a file that includes a bunch of Slackware packages to install and a little bit of scripting to do anything special that needs to be done. a plugin is a .plg file that is kind of like an unMenu package except it integrates with the default (v5 only) GUI. I haven't made one of these so I know nothing else about them. Suspect unMenu packages became so common/useful, they added the capability to "stock" unRAID in v5 an addon is just something that is put onto unRAID that is not "stock", so any of the above would be an addon. Hope that explanation helped a bit Edit: grammar and spelling
  2. Huh, I'm stumped. Send me the mrtg.cfg file as a PM and I'll have a look.
  3. Great! Glad it's working :-)
  4. Ok, that's good. I wonder if your mrtg.cfg has formatting issues? The blocks that you're having problems with have extra long lines, can you make sure that all the lines that start with Target[...]: haven't been accidentally split into two lines? Like this one, it should all be one line: Target[server.mempercentused]: 100 - ( ( memAvailReal.0&memAvailReal.0:public@localhost + memBuffer.0&memBuffer.0:public@localhost + memCached.0&memCached.0:public@localhost ) * 100 / ( memTotalReal.0&memTotalReal.0:public@localhost ) )
  5. Ah, check your mrtg.cfg file, I suspect you have something wrong with one of the PageTop lines, perhaps there is no newline at the end or something? If you want, PM me your exact config file and I'll have a look Target[sda.temp]: `smartctl -n standby -A /dev/sda | egrep "Temp|exit" | perl -pe '$_=substr($_,87,2);$_=0 if($_ eq "");$_="$_\n$_\n0\n0\n";'` Title[sda.temp]: /dev/sda Temperature PageTop[sda.temp]: <h1>/dev/sda Temperature (Celsius)</h1> MaxBytes[sda.temp]: 60 AbsMax[sda.temp]: 100 Unscaled[sda.temp]: ymwd ShortLegend[sda.temp]: C YLegend[sda.temp]: Temperature (C) Legend1[sda.temp]: /dev/sda Temperature LegendI[sda.temp]: sda Temp LegendO[sda.temp]: sda Temp Options[sda.temp]: integer, gauge, nopercent, growright, unknaszero
  6. not sure what you mean by "the config text on the webpage" it's more complicated than usual because unRAID is in a RAMdisk and boots off of a flash drive. Add a line like this to the end of your /boot/config/go file (this is all one line) (crontab -l | grep -v mrtg-traffic-sum; echo "05 01 01 * * env LANG=C /usr/bin/mrtg-traffic-sum --email=me@youraddress --range=previous --units=GB /boot/config/mrtg.cfg") | crontab - the format of a crontab line is * * * * * command to be executed ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??? day of week (0 - 7) (0 or 7 is Sun, or use names) ? ? ? ????? month (1 - 12) ? ? ??????? day of month (1 - 31) ? ????????? hour (0 - 23) ??????????? min (0 - 59) so, in my example (05 01 01 * *), that would mean that at 01:05 on the first of every month it would run the command (env LANG=C /usr/bin/mrtg-traffic-sum --email=me@youraddress --range=previous --units=GB /boot/config/mrtg.cfg). The rest of that line is adding the line into the crontab. after that you would either have to copy/paste the command into the command line (to execute it for the current session) or just reboot the unRAID. after you do that, you can test to see if it worked by typing crontab -l and looking for the line in the output. HTH
  7. @generalz and @JarDo: I would try to see if you can access the SNMP variables outside of MRTG. Using SNMPWalk from the command line: root@unRAID:~# /usr/bin/snmpwalk -v1 -c public localhost memTotalReal.0 UCD-SNMP-MIB::memTotalReal.0 = INTEGER: 4084496 kB root@unRAID:~# /usr/bin/snmpwalk -v1 -c public localhost memCached.0 UCD-SNMP-MIB::memCached.0 = INTEGER: 3619136 kB root@unRAID:~# /usr/bin/snmpwalk -v1 -c public localhost ssCpuRawSystem.0 UCD-SNMP-MIB::ssCpuRawSystem.0 = Counter32: 456891 If that doesn't work, MRTG wouldn't show those variables.
  8. Hi, yeah you could put another drive in, but then you would still always have one drive spinning... saving you a net 1 drive spinning (the parity drive wouldn't be able to spin down either if you write to the array all the time). I'm not sure that the humble usb flash drive has any wear-leveling like ssd drives are supposed to. USB flash drives are usually rated for 10,000 - 100,000 cycles (depending on the technology), so figuring worst case: 10,000 cycles over the same exact spots (probably not very likely, even without wear-leveling) at updates every 5 minutes would give about a month lifespan (10,000 write cycles / 12 five minute intervals in an hour / 24 hours in a day = 34.7 days). I had tossed around the idea of putting a tiny ssd drive in my box (newegg has a 16 GB Kingston SSD for $40) for both MRTG and other stuff (I have a weather station that I want to move the monitoring off of a Mac Mini to the unRAID box). If you have an extra drive kicking around, that's probably the best bet if you want your array to spin down. If you don't have an extra drive kicking around and want to spend the money, I would buy the tiny SSD (nothing to spin up/down and wear-leveling should make it last a very long time). USB flash drive is probably the worst bet. Although, there shouldn't be any issue writing to the array (other than the no spinning down). Of course, that's only my $0.02, anybody else have any experience in the matter?
  9. Hmm, I would guess that either you have disk usage set up for a disk that doesn't exist or your array isn't mounted or you're attempting to track disk usage without having SNMP know what disks you want to track. Either way, double check the section in /boot/config/mrtg.cfg that deals with disk usage and /boot/config/snmpd.conf. snmpd.conf should have lines like rocommunity public syslocation Here syscontact me@example.com disk /mnt/disk1 disk /mnt/disk2 disk /mnt/disk3 ... in it. if you don't have any disk lines (or no /boot/config/snmpd.conf file at all), you probably are running an older version of the MRTG install. re-copy the http://ruinedkingdoms.com/unRAID/mrtg-unmenu-package.conf file, delete snmpd.conf (if present), and re-install the MRTG package. The "dskPercent.1 dskPercent.2" in your error message means MRTG can't find information about the 1st and 2nd "disk" lines in the snmpd.conf file. Hope that helps.
  10. Glad it's helping you out :-) Overhead for MRTG and all the plots but temperature is negligible. Getting the drive temps via smartctl takes a few seconds per drive so if you've got a pile of drives, it could take a while. I'm not sure if this is really overhead (using up mem/cpu) or just the time it takes for the drives to spit out data. I checked top while manually getting SMART data, and it was negligible CPU (0.3% for only part of the time it took to get data) and Mem (less than 0.1% out of 4GB, didn't even show a value in top). I think top was actually using more resources than smartctl :-) I just started using SMART drive data myself, so maybe someone else knows more about that specifically. As a sidenote, I'm switching my personal mrtg.cfg to use by-id device names for the hard drive temp code because Linux changing /dev/sdX for all the drives periodically is kind of annoying. You look like you've got a bunch of drives, so to save your sanity, you might want to do the same :-) It looks like this Target[parity.temp]: `smartctl -n standby -A /dev/disk/by-id/wwn-0x5000cca369cfa7d9 | egrep "Temp|exit" | perl -pe '$_=substr($_,87,2);$_= 0 if($_ eq "");$_="$_\n$_\n0\n0\n";'` Title[parity.temp]: parity Temperature PageTop[parity.temp]: <h1>parity Temperature (Celsius)</h1> MaxBytes[parity.temp]: 60 AbsMax[parity.temp]: 100 Unscaled[parity.temp]: ymwd ShortLegend[parity.temp]: C YLegend[parity.temp]: Temperature © Legend1[parity.temp]: parity Temperature LegendI[parity.temp]: parity Temp LegendO[parity.temp]: parity Temp Options[parity.temp]: integer, gauge, nopercent, growright, unknaszero good luck!
  11. Folks, I updated the advanced mrtg.cfg file and the sample chart screenshot. I removed the disk storage monitoring and replaced it with the disk temperature plots. Plus I changed how the memory chart works. Before it was accurate, but misleading in that it showed only memory that had never been used, Linux caches files and programs with memory that isn't currently needed and this didn't show up as "Free" in the older charts. I changed the calculation of "Free" to show how much memory would be available to run programs with (which matches what most people consider "Free") http://ruinedkingdoms.com/unRAID/mrtg_sample_index.png http://ruinedkingdoms.com/unRAID/mrtg.cfg
  12. Hi, I checked the MRTG docs (http://oss.oetiker.ch/mrtg/doc/mrtg-reference.en.html) and it seems what you want is to put these lines near the top of your mrtg.cfg file: XSize[_]: 600 YSize[_]: 200 By default, the charts are 100 by 400 pixels. Unfortunately, there are some limitations: "Note: XSize must be between 20 and 600; YSize must be larger than 20"
  13. Anyone interested in drive temp monitoring? I've got a bit that queries S.M.A.R.T. to populate the charts. They respect the privacy of drives that are sleeping. Add this line into your mrtg.cfg for each drive you want to monitor (change the blue bits). Target[sda.temp]: `smartctl -n standby -a /dev/sda | egrep "Temp|exit" | perl -pe '$_=substr($_,87,2);$_=0 if($_ eq "");$_="$_\n$_\n0\n0\n";'` Title[sda.temp]: /dev/sda Temperature PageTop[sda.temp]: <h1>/dev/sda Temperature (Celsius)</h1> MaxBytes[sda.temp]: 60 AbsMax[sda.temp]: 100 Unscaled[sda.temp]: ymwd ShortLegend[sda.temp]: C YLegend[sda.temp]: Temperature © Legend1[sda.temp]: /dev/sda Temperature LegendI[sda.temp]: sda Temp LegendO[sda.temp]: sda Temp Options[sda.temp]: integer, gauge, nopercent, growright, unknaszero then run this to update the chart main page (blue is the package default, so if you changed it when you installed the package, change it here) /usr/bin/indexmaker --output=/tmp/mrtg/index.html /boot/config/mrtg.cfg then wait 10-15 minutes for charts to start showing up! Here is a sample
  14. Let me see if I can re-compile Slackware's SNMP. If there are too many dependancies, I won't be able to do it (I don't actually have a Slackware dev box setup, I'm compiling stuff on unRAID which doesn't have a lot of packages installed). Ok, I was able to re-compile net-snmp with the required option and I can get stats by both disk (physical drive) and array (drive + parity). That means with this you could track how much was read/written to each disk drive individually or to each "disk share". Unfortunately, it doesn't see user shares at all. I suspect that is because they are really done in software "above" the level that SNMP is monitoring. However, if there is some file somewhere in unRAID that has this information, we can add it to the charts that way. I haven't included this new net-snmp in the mrtg package yet. is anyone interested in by disk read/writes?
  15. Thanks, glad it's working for you! Good idea, done.