Laden...

MCELOG und EDAC Überwachung

[root@therm01 ~]# less /etc/crontab

SHELL=/bin/bash

PATH=/sbin:/bin:/usr/sbin:/usr/bin

MAILTO=root

HOME=/

 

# run-parts

01 * * * * root run-parts /etc/cron.hourly

02 4 * * * root run-parts /etc/cron.daily

22 4 * * 0 root run-parts /etc/cron.weekly

42 4 1 * * root run-parts /etc/cron.monthly

#

*/05 * * * * root /usr/local/sbin/sdt-ganglia.sh

*/05 * * * * root /srv/cluster-autoinstall/config-space/scripts/temp-check.sh 70 70 &> /dev/null

*/01 * * * * root /usr/local/bin/keep-alive.sh

*/15 * * * * root /usr/local/bin/mce-check.sh

[root@therm01 ~]#

 

[root@therm01 ~]# less /usr/local/bin/mce-check.sh

#!/bin/bash

 

for x in $(seq -w 1 46);do

 

old_md5sum=`cat /usr/local/temp/mcelog_md5sum_node0$x`

curr_md5sum=`ssh n0$x "md5sum /var/log/mcelog"`

hostname=n0$x

 

if [ ! "$curr_md5sum" == "" ]; then

 

        if [ ! "$curr_md5sum" == "$old_md5sum" ];then

                datestamp=$(date +%Y%m%d_%H%M%S)

                ssh n0$x "cat /var/log/mcelog" | mail -s "MCELOG on $hostname at $datestamp" ssiczek@sysgen.de

                ssh n0$x "cat /var/log/mcelog" | mail -s "MCELOG on $hostname at $datestamp" dnikisch@sysgen.de

                #echo "MD5Sum changed, reference updated..."

 

                ssh n0$x "md5sum /var/log/mcelog" > /usr/local/temp/mcelog_md5sum_node0$x

        fi

fi

 

done

[root@therm01 ~]#

Article Details: Views:
Last updated:
2010/07/15
Article
article viewed 139 times
Autor:
Autor
Dieter Nikisch