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
Aug 242016
 

I found out that my daughter’s school recently introduced coding as a core subject.
As an IT professional myself, I applaud the school to have the foresight to introduce such a critical skill for our future generations.
As a father, I’m somewhat at a loss as to how to go about helping my daughter learn how to code. I’ve self-taught myself new languages for many years, but have no idea how to teach someone else how to code!
Continue reading »

Share
Aug 172016
 

At my job, I’m monitoring ~300 workstations that may or may not be on at any one time.
The difficulties that this presents is that some PCs will alert that they have been down for a period of time, when in fact they just haven’t been used in a while because they just haven’t been needed.
Continue reading »

Share
Aug 102016
 

I wanted to build a menu item in Zabbix to open a ticket against a host in Zabbix so that we could flag one for attention.
Continue reading »

Share