July 7, 200817 yr To make it much easier, attached is a more advanced version of the same script, based on conversations with bjp999 and ideas he had. unzipp and put it on your flash drive. This version works for me, regardless of the backslash issue. It is also much more concise and elegant than the one I sent you. (darnit! ) Biggest functional differences are mine overwrites the "cummulative" smart output on each run, attaches the hours and minutes to the file names (allowing you to keep history even if run multiple times in a day), and captures a date/time stamped syslog. These changes can easily be made to the version Joe posted. I'll likely do exactly that when I get some time. BTW, the smartctl v5.38 is better than 5.36 with newer drives. Follow the "Best of" link in my sig to the "unRAID Addons and Tools" section. I recently posted detailed directions for getting the new version working which is referenced there. Joe - could you answer one question? Why are the log subdirectories for the drives created in lower case for some of them, and upper case for others, when the variables in the shell script always contains UPPER case? I got a bit annoyed that I couldn't get them to be created in upper case.
July 7, 200817 yr To make it much easier, attached is a more advanced version of the same script, based on conversations with bjp999 and ideas he had. unzipp and put it on your flash drive. This version works for me, regardless of the backslash issue. It is also much more concise and elegant than the one I sent you. (darnit! ) I've probably written a few more scripts than you have Biggest functional differences are mine overwrites the "cummulative" smart output on each run, attaches the hours and minutes to the file names (allowing you to keep history even if run multiple times in a day), and captures a date/time stamped syslog. To add hours and minutes to the file names created, just change this line near the top of the script from: dt=`date "+%Y%m%d"` to: dt=`date "+%Y%m%d%H%M"` These changes can easily be made to the version Joe posted. I'll likely do exactly that when I get some time. BTW, the smartctl v5.38 is better than 5.36 with newer drives. Follow the "Best of" link in my sig to the "unRAID Addons and Tools" section. I recently posted detailed directions for getting the new version working which is referenced there. Joe - could you answer one question? Why are the log subdirectories for the drives created in lower case for some of them, and upper case for others, when the variables in the shell script always contains UPPER case? I got a bit annoyed that I couldn't get them to be created in upper case. I noticed that too. It has nothing to do with your script, but everything to do with the default behaviour of the vfat file-system on the flash drive. In the manual page for mount options for vfat is this: shortname=[lower|win95|winnt|mixed] Defines the behaviour for creation and display of filenames which fit into 8.3 characters. If a long name for a file exists, it will always be preferred display. There are four modes: lower - Force the short name to lower case upon display; store a long name when the short name is not all upper case. win95 - Force the short name to upper case upon display; store a long name when the short name is not all upper case. winnt - Display the shortname as is; store a long name when the short name is not all lower case or all upper case. mixed - Display the short name as is; store a long name when the short name is not all upper case. The default is "lower" Tom does not supply any mount options for this, so we get the default behavior for the shorter names that fit into 8.3 characters.. Joe L.
January 17, 200917 yr Just to add to all this... Yesterday i purchased a really nice Lian-Li 3-bay SATA hotswap case, that fits 3 sata hdd's and takes up 3 x 5.25" drive bays....Yesterday i hooked it all up, temps were worst than before, even with the so called super FAN!, all my hdd's were getting near the 35c mark, and my parity was hitting 50c.... Today i spend all day changing the setup of the cage, i changed the placement of the fan in the rear of the cage (blowing air out), and moved it to the front - blowing air onto all my HDD's and into the chassis, i have enought exhaust fans to take out the added heat..... This made a huge difference, all my hdd's suddenly dropped from the 35c mark to 31c....parity still too high at 35c on idle... I changed the 120mm fan with one of my silent fans which seems to push more air through......to my suprise this made all my drives sit at 28c....and the parity (which is a wd blue drive = faster and hotter) is now idling at 30c, im realy happy with the results, it goes to show you can drop temps by playing around here and there.... at full noise, some of my hdd's hit 32c, and my parity hits 34-35c...should i be worried with these temps???...note this is only when doing a parity check where all hdd's are running, and being that theyre all on top of one another, i find the temps to be awesome:)
January 30, 200917 yr Script works great, thanks for making it for us! Now a request, can anyone help modify the script or more likely create a simple launcher script that I can invoke from the "go" file to run the test once daily? I looked at other scripts that do this like monthly_parity_check.sh but don't understand the syntax very well. I was never very good with Unix scripting, much better with Windows on the command-line. Thanks for any help that can be provided... G
April 18, 201016 yr Joe L, I tried to down load the smarttest.zip script from a few entries back. The zip file that comes down is empty. Could you possibly repost?
April 18, 201016 yr Joe L, I tried to down load the smarttest.zip script from a few entries back. The zip file that comes down is empty. Could you possibly repost? I just tried the link. It seems to work.
April 18, 201016 yr I tried to down load the smarttest.zip script from a few entries back. The zip file that comes down is empty. Could you possibly repost? Somethig must be corrupting your download. When I try it it's OK.
April 18, 201016 yr Very Interesting. Windows thinks that smarttest.sh is a system file and hides it!! It was there all the time. As soon as I entered godmode and told it to show hidden files it was there. Thanks for the prod!
April 12, 201313 yr *Joe, I know this is an old thread, so maybe it just wont work with unraid 5.x, if so.. sorry I didn't know! If i try using your script from smarttest.zip it results in: /boot# ./smarttest.sh cat: /boot/smart_results/*/smart_20130412_*: No such file or directory Smart Summary is in /boot/smart_results/20130412_smart_summary.txt heres the command that the script uses to gather raw info to parse, hopes this helps to debug: /boot# ls -l /dev/disk/by-id/ total 0 lrwxrwxrwx 1 root root 9 2013-04-09 23:41 ata-ST31000340AS_9QJ1Q5G1 -> ../../sdf lrwxrwxrwx 1 root root 10 2013-04-09 23:41 ata-ST31000340AS_9QJ1Q5G1-part1 -> ../../sdf1 lrwxrwxrwx 1 root root 9 2013-04-09 23:41 ata-WDC_WD10EADS-00L5B1_WD-WCAU4A729318 -> ../../sde lrwxrwxrwx 1 root root 10 2013-04-09 23:41 ata-WDC_WD10EADS-00L5B1_WD-WCAU4A729318-part1 -> ../../sde1 lrwxrwxrwx 1 root root 9 2013-04-09 23:41 ata-WDC_WD10EARS-00Y5B1_WD-WCAV55468269 -> ../../sdd lrwxrwxrwx 1 root root 10 2013-04-09 23:41 ata-WDC_WD10EARS-00Y5B1_WD-WCAV55468269-part1 -> ../../sdd1 lrwxrwxrwx 1 root root 9 2013-04-11 08:43 ata-WDC_WD20EARS-00S8B1_WD-WCAVY4386698 -> ../../sdg lrwxrwxrwx 1 root root 10 2013-04-11 08:43 ata-WDC_WD20EARS-00S8B1_WD-WCAVY4386698-part1 -> ../../sdg1 lrwxrwxrwx 1 root root 9 2013-04-09 23:41 ata-WDC_WD20EARX-00PASB0_WD-WCAZAH661492 -> ../../sdh lrwxrwxrwx 1 root root 10 2013-04-09 23:41 ata-WDC_WD20EARX-00PASB0_WD-WCAZAH661492-part1 -> ../../sdh1 lrwxrwxrwx 1 root root 9 2013-04-09 23:41 ata-WDC_WD20EARX-00PASB0_WD-WCAZAH795737 -> ../../sdc lrwxrwxrwx 1 root root 10 2013-04-09 23:41 ata-WDC_WD20EARX-00PASB0_WD-WCAZAH795737-part1 -> ../../sdc1 lrwxrwxrwx 1 root root 9 2013-04-09 23:40 ata-WDC_WD30EZRX-00DC0B0_WD-WMC1T1598435 -> ../../sda lrwxrwxrwx 1 root root 10 2013-04-09 23:40 ata-WDC_WD30EZRX-00DC0B0_WD-WMC1T1598435-part1 -> ../../sda1 lrwxrwxrwx 1 root root 9 2013-04-09 23:41 scsi-SATA_ST31000340AS_9QJ1Q5G1 -> ../../sdf lrwxrwxrwx 1 root root 10 2013-04-09 23:41 scsi-SATA_ST31000340AS_9QJ1Q5G1-part1 -> ../../sdf1 lrwxrwxrwx 1 root root 9 2013-04-09 23:41 scsi-SATA_WDC_WD10EADS-00_WD-WCAU4A729318 -> ../../sde lrwxrwxrwx 1 root root 10 2013-04-09 23:41 scsi-SATA_WDC_WD10EADS-00_WD-WCAU4A729318-part1 -> ../../sde1 lrwxrwxrwx 1 root root 9 2013-04-09 23:41 scsi-SATA_WDC_WD10EARS-00_WD-WCAV55468269 -> ../../sdd lrwxrwxrwx 1 root root 10 2013-04-09 23:41 scsi-SATA_WDC_WD10EARS-00_WD-WCAV55468269-part1 -> ../../sdd1 lrwxrwxrwx 1 root root 9 2013-04-11 08:43 scsi-SATA_WDC_WD20EARS-00_WD-WCAVY4386698 -> ../../sdg lrwxrwxrwx 1 root root 10 2013-04-11 08:43 scsi-SATA_WDC_WD20EARS-00_WD-WCAVY4386698-part1 -> ../../sdg1 lrwxrwxrwx 1 root root 9 2013-04-09 23:41 scsi-SATA_WDC_WD20EARX-00_WD-WCAZAH661492 -> ../../sdh lrwxrwxrwx 1 root root 10 2013-04-09 23:41 scsi-SATA_WDC_WD20EARX-00_WD-WCAZAH661492-part1 -> ../../sdh1 lrwxrwxrwx 1 root root 9 2013-04-09 23:41 scsi-SATA_WDC_WD20EARX-00_WD-WCAZAH795737 -> ../../sdc lrwxrwxrwx 1 root root 10 2013-04-09 23:41 scsi-SATA_WDC_WD20EARX-00_WD-WCAZAH795737-part1 -> ../../sdc1 lrwxrwxrwx 1 root root 9 2013-04-09 23:40 scsi-SATA_WDC_WD30EZRX-00_WD-WMC1T1598435 -> ../../sda lrwxrwxrwx 1 root root 10 2013-04-09 23:40 scsi-SATA_WDC_WD30EZRX-00_WD-WMC1T1598435-part1 -> ../../sda1 lrwxrwxrwx 1 root root 9 2013-04-09 23:40 usb-MUSHKIN_MKNUFDPR4GB_070731F3227F5C47-0:0 -> ../../sdb lrwxrwxrwx 1 root root 10 2013-04-09 23:40 usb-MUSHKIN_MKNUFDPR4GB_070731F3227F5C47-0:0-part1 -> ../../sdb1 lrwxrwxrwx 1 root root 9 2013-04-09 23:41 wwn-0x5000c5000da05416 -> ../../sdf lrwxrwxrwx 1 root root 10 2013-04-09 23:41 wwn-0x5000c5000da05416-part1 -> ../../sdf1 lrwxrwxrwx 1 root root 9 2013-04-09 23:41 wwn-0x50014ee1571cf7cc -> ../../sde lrwxrwxrwx 1 root root 10 2013-04-09 23:41 wwn-0x50014ee1571cf7cc-part1 -> ../../sde1 lrwxrwxrwx 1 root root 9 2013-04-09 23:41 wwn-0x50014ee203c115cd -> ../../sdd lrwxrwxrwx 1 root root 10 2013-04-09 23:41 wwn-0x50014ee203c115cd-part1 -> ../../sdd1 lrwxrwxrwx 1 root root 9 2013-04-11 08:43 wwn-0x50014ee204a1feef -> ../../sdg lrwxrwxrwx 1 root root 10 2013-04-11 08:43 wwn-0x50014ee204a1feef-part1 -> ../../sdg1 lrwxrwxrwx 1 root root 9 2013-04-09 23:41 wwn-0x50014ee2b205a01d -> ../../sdh lrwxrwxrwx 1 root root 10 2013-04-09 23:41 wwn-0x50014ee2b205a01d-part1 -> ../../sdh1 lrwxrwxrwx 1 root root 9 2013-04-09 23:41 wwn-0x50014ee2b20612b6 -> ../../sdc lrwxrwxrwx 1 root root 10 2013-04-09 23:41 wwn-0x50014ee2b20612b6-part1 -> ../../sdc1 lrwxrwxrwx 1 root root 9 2013-04-09 23:40 wwn-0x50014ee658536ee7 -> ../../sda lrwxrwxrwx 1 root root 10 2013-04-09 23:40 wwn-0x50014ee658536ee7-part1 -> ../../sda1
May 25, 201412 yr *Joe, I know this is an old thread, so maybe it just wont work with unraid 5.x, if so.. sorry I didn't know! If i try using your script from smarttest.zip it results in: /boot# ./smarttest.sh cat: /boot/smart_results/*/smart_20130412_*: No such file or directory Smart Summary is in /boot/smart_results/20130412_smart_summary.txt I found the issue. Just change the line that reads ls -l /dev/disk/by-id | while read a b c d e f g h i j k to ls -l /dev/disk/by-id | while read b c d e f g h i j k I've attached a fixed copy and also added minutes and seconds to the timestamp to make consecutive runs on the same day usable. smarttest.sh.zip
Archived
This topic is now archived and is closed to further replies.