Skip to content

Instantly share code, notes, and snippets.

View cfazendin's full-sized avatar

Christopher Fazendin cfazendin

View GitHub Profile
#!/bin/sh
### Parameters ###
logfile="/tmp/smart_report.tmp"
email="your_email@gmail.com"
subject="SMART Status Report for FreeNAS"
drives="da0 da1 da2 da3 da4 da5 da6 da7"
tempWarn=40
tempCrit=45
sectorsCrit=10
@cfazendin
cfazendin / takeOutTrash.sh
Created June 5, 2015 18:55
FreeNAS empty recycle bins of files > 7 days.
#!/bin/sh
find /mnt -path \*/.recycle/\* -atime +7 -delete
#!/bin/sh
### CPU ###
echo ""
sysctl -a | grep "cpu.0.temp" | cut -c5-25 | tr -d "\n" ; echo " C"
sysctl -a | grep "cpu.1.temp" | cut -c5-25 | tr -d "\n" ; echo " C"
sysctl -a | grep "cpu.2.temp" | cut -c5-25 | tr -d "\n" ; echo " C"
sysctl -a | grep "cpu.3.temp" | cut -c5-25 | tr -d "\n" ; echo " C"
sysctl -a | grep "cpu.4.temp" | cut -c5-25 | tr -d "\n" ; echo " C"
sysctl -a | grep "cpu.5.temp" | cut -c5-25 | tr -d "\n" ; echo " C"