Oct 042016
 

I had a RAID6 array die on my recently so I wanted to start running SMART tests across all the drives that were in the RAID6 array.
This was easy for me as the RAID drives were all Seagates, so I used the following snippet to do it:


for x in /dev/sd?; do
output=$(smartctl -i $x);
if [[ $output =~ 'Seagate' ]]; then
smartctl -t long $x;
fi;
done

The snippet above checks the SMART information for the string ‘Seagate’, and if it finds it, then starts the SMART test via smartctl.

Then to monitor the progress of the SMART tests, I used the following snippet:

while true; do
clear
for x in $(
for x in /dev/sd?; do
output=$(smartctl -i $x);
if [[ $output =~ 'Seagate' ]]; then
echo $x;
fi;
done); do
echo $x
smartctl -l selftest $x
done
sleep 10
done

This snippet has a nested for statement so that it only shows the self test logs for the drives that are Seagates.

Share
Jan 202016
 

My home Zabbix instance was running out of space today, so I had to resize the partition that it lived on so that it would last a few more days while I worked out how to migrate it from my VMWare host to my ProxMox host.

Continue reading »

Share
Jan 132016
 

If you’re a regular reader of my blog, you’ll know that I’ve set up a Motion daemon to monitor one of my IP Cameras.

Recently, I decided to also make a graph of the motion so that I easily track when motion was detected from my IP Camera. This was easily done with the Zabbix agent as I could send data straight into a Zabbix item with zabbix_sender.

Continue reading »

Share
Nov 252015
 

I recently bought a Telstra Prepaid (ZTE MF823) 4G stick to use while I’m out and about. It works great for internet, getting a nice 20Mbits in some locations, but I’ve run into some issues with the IP addressing scheme of the stick’s network.
Continue reading »

Share