Help setting up scripts

Status
Not open for further replies.

satyr

Dabbler
Joined
Jun 20, 2015
Messages
37
Just upgraded my system and have spent the last few days doing burn in and data transfer. I've managed to setup all of my permissions, shares and have the Emby plugin scraping files right now.

Where I've come across some issues, however, is with using the HDD temp monitor and SMART email scripts. I set up the SMART tasks, but would really like to have a readout of that info emailed to myself (along with overall pool health, drive temps, etc). I know there are scripts that encompass all of this, but have only been able to get the HDD temp one to work correctly in shell.

Any good guides for setting up and running the SMART data email script? Or a better method for monitoring drive temps?

Thanks for the help.
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478

satyr

Dabbler
Joined
Jun 20, 2015
Messages
37
I know. Those are the scripts I'm referring to. The HDD+CPU one only outputs the HDD info in the appropriate format for me. The CPU temps output, but not in an aligned fashion.
However, I'm more interested in getting the smart details emailed to me, since that's a vital component of pool health. I've not been able to get that script configured properly.
 
Joined
Jan 9, 2015
Messages
430
Have you successfully setup the email settings in FreeNAS GUI? The script assume this.
 

satyr

Dabbler
Joined
Jun 20, 2015
Messages
37
Yes, that's been setup and the test email sent without issue.
I've not yet figured out how to monitor a smart test in progress. I'm trying to run the smartctl commands but they're returning errors:
Code:
[root@FreeNAS ~]# smartctl -d ata -a /dev/sdi                                                                                      
smartctl 6.3 2014-07-26 r3976 [FreeBSD 9.3-RELEASE-p16 amd64] (local build)                                                        
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org                                                        
                                                                                                                                   
Smartctl open device: /dev/sdi failed: No such file or directory                                                                   
[root@FreeNAS ~]# smartctl -d ata -a /dev/ada0                                                                                     
smartctl 6.3 2014-07-26 r3976 [FreeBSD 9.3-RELEASE-p16 amd64] (local build)                                                        
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org                                                        
                                                                                                                                   
Read Device Identity failed: Inappropriate ioctl for device                                                                        
                                                                                                                                   
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.                                   
[root@FreeNAS ~]#        


I'd like to at least monitor a smart test so I know that they're working properly...which may be part of the problem for why the script isn't working.
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
You can't "monitor" a SMART test. However you can execute a SMART test and then look at the SMART attributes to see if there's any problem.

All these commands are in the thread "Useful Commands" linked in my signature. But from memory it's smartctl -t long /dev/the_drive_name to launch a long test (this test usually takes hours; for my 3 TB drives it's about 6.5 hours for example) and smartctl -a /dev/the_drive_name to see the SMART values ;)
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
You can't "monitor" a SMART test. However you can execute a SMART test and then look at the SMART attributes to see if there's any problem.
Well, the drive will tell you if a test is in progress, but that's it.
 
Status
Not open for further replies.
Top