Joe L. Posted March 19, 2010 Share Posted March 19, 2010 Looking good. I like the summary if you give no parameters. If you invoke the command with multiple parameters, does the order in which you issue the parameters dictate the order of the output values? If not, is it possible add something like a "printf" format string so the specific desired parameters can be formatted in a single call exactly as a parsing program might desire. Example ... a new -O option for output format: -O "%m %M %s %D" Joe L. Quote Link to comment
bubbaQ Posted March 19, 2010 Author Share Posted March 19, 2010 If you invoke the command with multiple parameters, does the order in which you issue the parameters dictate the order of the output values? Yes, the order of the parameters is the order they are returned. And the -V verbose option only affects parameters AFTER the -V. The same will be true of the delimiter option. The delimiter option is intended for folks that want to parse the non-verbose output, but the default of a blank space should work just fine for awk Quote Link to comment
purko Posted March 19, 2010 Share Posted March 19, 2010 Something along the way has cached the link, so I keep getting the old beta-2. Quote Link to comment
bubbaQ Posted March 19, 2010 Author Share Posted March 19, 2010 I went back and touched the file, so try again. Quote Link to comment
purko Posted March 19, 2010 Share Posted March 19, 2010 Strange. Beta-2 again. My service provider may be doing some stupid hidden proxying. Edit: I telneted to a remote server and got beta-4 from there. I really like this new summary report. Quote Link to comment
WeeboTech Posted March 19, 2010 Share Posted March 19, 2010 unraid_info version 0.0.4-Beta is posted for download... see the OP. This version adds the -S option for a summary report, which is also the default output if unraid_info is run with no parameters. Sample output: ================== unRAID Server Summary ================== Array State: STARTED Array Status: OK Total Space on Array: 6,251,307,768 KB (5961.711 GB) Total Free on Array: 317,675,600 KB (302.959 GB) Percent Free: 5.08% Largest Freespace: 262,949,040 KB (250.768 GB) on disk 8 Last parity check: 58 days ago Hottest array temp: 29° (disk 9) WDC WD10EACS-00ZJB0 Longest running disk: disk 0 (19,010 hours / 2.17 years) There are also 2 other disk devices not in the array (/dev/hda /dev/sda ) Highest temperature of a disk device not in the array is: 30 Great job. Can the summary be changed slightly with There are also 2 other disk devices not in the array[b]:[/b] (/dev/hda /dev/sda ) Highest temperature of a disk device not in the array is: 30 (/dev/???) MODEL NUMBER i.e. use the : as a message vs data separator and add more data to highest temp line. should "not in the array" be "outside the protected array" ? Just some thoughts. great work BubbaQ. I may just borrow this (or internal subroutines) to use as a helper in a nagios plugin. really nice! Quote Link to comment
bubbaQ Posted March 20, 2010 Author Share Posted March 20, 2010 i.e. use the : as a message vs data separator and add more data to highest temp line. That was my intention all along. What other info would you like to see? Number spun up vs. spun down? Mount points for drives outside the array? Quote Link to comment
WeeboTech Posted March 20, 2010 Share Posted March 20, 2010 i.e. use the : as a message vs data separator and add more data to highest temp line. That was my intention all along. What other info would you like to see? Number spun up vs. spun down? Mount points for drives outside the array? >> Mount points for drives outside the array? I think this would be informative. One of my pet peeves has always been there is the disk#, /dev/md#, the /dev/sd# or /dev/hd# and the serial. I think it would be helpful to have a tool iterate thru devices and list each like a chart. This way it's easy to translate disk# with /dev/md# and /dev/?d# and serial line by line. Might make it easier for archiving array status too. I know every time I have an issue, I have to read mdcmd, find the sd?, then run smartctl on the /dev/sd? >> Hottest array temp: 29° (disk 9) WDC WD10EACS-00ZJB0 come to think of it, having the /dev/sd? or /dev/hd? here some where might be helpful if you want to initiate a spin down. Quote Link to comment
bubbaQ Posted March 20, 2010 Author Share Posted March 20, 2010 I think it would be helpful to have a tool iterate thru devices and list each like a chart. I'll add an option for -T (--table) to print a table of the devices as you described, and add the device to the hottest temp line. Quote Link to comment
Joe L. Posted March 20, 2010 Share Posted March 20, 2010 >> Hottest array temp: 29° (disk 9) WDC WD10EACS-00ZJB0 come to think of it, having the /dev/sd? or /dev/hd? here some where might be helpful if you want to initiate a spin down. Actually, if the disk is part of the array and you want to spin it down, the last thing you need is the /dev/sd? /root/mdcmd spindown 1 will spin down disk1 ... it knows the device. If you do it any other way, unRAID will not know it is spun down. Even worse if you were to try to spin it up by reading a block of data from the device. It will spin up, but will immediately be spun down by emhttp, since you did not go through the "md" device. Quote Link to comment
WeeboTech Posted March 20, 2010 Share Posted March 20, 2010 >> Hottest array temp: 29° (disk 9) WDC WD10EACS-00ZJB0 come to think of it, having the /dev/sd? or /dev/hd? here some where might be helpful if you want to initiate a spin down. Actually, if the disk is part of the array and you want to spin it down, the last thing you need is the /dev/sd? /root/mdcmd spindown 1 will spin down disk1 ... it knows the device. If you do it any other way, unRAID will not know it is spun down. Even worse if you were to try to spin it up by reading a block of data from the device. It will spin up, but will immediately be spun down by emhttp, since you did not go through the "md" device. True, Having the full device name there would be useful for initiating a smartctl test. If I had something that I considered too hot, I would probably initiate a smartlog review to see if there are any issues present. Quote Link to comment
bubbaQ Posted March 20, 2010 Author Share Posted March 20, 2010 Some issues about temps: 1) some drives (samsung (cough)) report temps that are obviously very inaccurate. So a samsung reporting 23 degrees may actually be much hotter than a WD reporting 29 degrees. That is why I report the model with the high-temp drive. But as it is, it has no way to distinguish that the samsung at 23 should be reported as the "hottest" drive rather than the WD at 29 degrees. 2) I have mentioned a config file previously, so that will provide a way to set individual "too hot, do something" thresholds for drives..... I'm still open to suggestions on that. Obviously I intend for unraid_info to work w/o a config file, but a config file could make it better and enable some additional features. I've already designed the -c flag to point to a config file. I can make the -C flag to create a skeleton config file. Eventually (unRAID 5.x) I intend to do a nice GUI for editing the config file. Any suggestions for the default filename and location for the config file? I also have this thread: http://lime-technology.com/forum/index.php?topic=5654.0 where I am collecting info to use in identifying which drives can return SMART info while spun down. Quote Link to comment
purko Posted March 21, 2010 Share Posted March 21, 2010 Bug: it reported temp 0 when it should've been 24 ... root@Tower:~# info ================== unRAID Server Summary ================== There are also 2 other disk devices not in the array (/dev/hda /dev/sdf ) Highest temperature of a disk device not in the array is: 0 root@Tower:~# smartctl -a /dev/hda Device Model: WDC WD3200BEVE-00A0HT0 SMART support is: Enabled 194 Temperature_Celsius 0x0022 123 117 000 Old_age Always - 24 (sdf is the boot flash disk, hda is a normal disk outside the array) Quote Link to comment
purko Posted March 21, 2010 Share Posted March 21, 2010 Question: Can you output the unRAID version? Something like... root@Tower:/# unraid_info ================== unRAID 4.5.3 Server Summary ================== ... If not, then how can I get it by some other means? Do I have to parse the emhttp web page to get that string? Or, is a string like "4.5.3" kept in some file in the ramfs? Quote Link to comment
bubbaQ Posted March 21, 2010 Author Share Posted March 21, 2010 HHow about sumary: Disks sleeping: 13 Disks spining: 4 and thats total count not just array I'll add something along those lines. Question: Can you output the unRAID version? Unfortunately, no. I have an idea about how to do it, but I have not been able to get it working yet. The WDC WD3200BEVE-00A0HT0 was likely spun down. unraid_info will not spin-up a drive. If that drive will return SMART when spun-down, please post that to the other thread so I can add it to the list of drives that do that. Quote Link to comment
Joe L. Posted March 21, 2010 Share Posted March 21, 2010 Unfortunately, no. I have an idea about how to do it, but I have not been able to get it working yet. Best I've been able to figure out is: strings /usr/local/sbin/emhttp | sed -n "s/^version=\(.*\)/unRAID Version: \1/p" But it will almost certainly change in the future when emhttp is modified for 5.0. Quote Link to comment
starcat Posted March 21, 2010 Share Posted March 21, 2010 bubbaQ, great job, thank you! Quote Link to comment
bubbaQ Posted March 21, 2010 Author Share Posted March 21, 2010 I am trying to refrain from using regexps ... my experience with the regexp libs for C has always left me unimpressed. Plus as you noted, there is no guarantee it will work in the future. I'm expecting (hoping!) unRAID 5.0 will have a simple way to get the unRIAD version... .ideally it should be in the mdcmd output. Quote Link to comment
Joe L. Posted March 21, 2010 Share Posted March 21, 2010 I'm expecting (hoping!) unRAID 5.0 will have a simple way to get the unRIAD version... .ideally it should be in the mdcmd output. I don't think the mdcmd can have the unRAID version easily since it has absolutely nothing to do with emhttp and most frequently the "md" driver is completely unchanged when a change is made to emhttp, resulting in a version change. It should be part of the emhttp API. Where it gets it from, really does not matter. Quote Link to comment
bubbaQ Posted March 21, 2010 Author Share Posted March 21, 2010 I know the emhttp version is independent from the md driver.... but my point was that the md driver *should* know what version of emhttp was used to create the config it is using. There are times when that info is very useful -- for example, when the change in length of serial numbers took place. Perhaps there is a place for it in the superblock. Quote Link to comment
purko Posted March 21, 2010 Share Posted March 21, 2010 The WDC WD3200BEVE-00A0HT0 was likely spun down. unraid_info will not spin-up a drive. If that drive will return SMART when spun-down, please post that to the other thread so I can add it to the list of drives that do that. I thought we already did that, on March 15. http://lime-technology.com/forum/index.php?topic=5654.msg52955#msg52955 Quote Link to comment
purko Posted March 21, 2010 Share Posted March 21, 2010 Unfortunately, no. I have an idea about how to do it, but I have not been able to get it working yet. Best I've been able to figure out is: strings /usr/local/sbin/emhttp | sed -n "s/^version=\(.*\)/unRAID Version: \1/p" sed is chinese to me, but you gave me the right idea. Thanks. root@v450:~# strings /usr/local/sbin/emhttp | grep version= version=4.5.3 Quote Link to comment
bubbaQ Posted March 21, 2010 Author Share Posted March 21, 2010 The WDC WD3200BEVE-00A0HT0 was likely spun down. unraid_info will not spin-up a drive. If that drive will return SMART when spun-down, please post that to the other thread so I can add it to the list of drives that do that. I thought we already did that, on March 15. http://lime-technology.com/forum/index.php?topic=5654.msg52955#msg52955 We did... I'll double check it. Can you post the results of: unraid-info --dump Quote Link to comment
purko Posted March 21, 2010 Share Posted March 21, 2010 The WDC WD3200BEVE-00A0HT0 was likely spun down. unraid_info will not spin-up a drive. If that drive will return SMART when spun-down, please post that to the other thread so I can add it to the list of drives that do that. I thought we already did that, on March 15. http://lime-technology.com/forum/index.php?topic=5654.msg52955#msg52955 We did... I'll double check it. Can you post the results of: unraid-info --dump Attached. info_dump.txt Quote Link to comment
bubbaQ Posted March 21, 2010 Author Share Posted March 21, 2010 @ purko The code to read SMART from a spun-down drive OUTSIDE the array is not yet enabled, as I have to pull the model info directly from the drive, rather from the mdcmd output.... so that will take a while. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.