/[sysadmin-cookbook]/recepies/smart/dump.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /recepies/smart/dump.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 276 - (hide annotations)
Sat Sep 17 11:05:51 2011 UTC (12 years, 7 months ago) by dpavlin
File MIME type: application/x-sh
File size: 420 byte(s)
install cron if missing
1 dpavlin 276 #!/bin/sh
2 dpavlin 274
3 dpavlin 276 if [ ! -e /etc/cron.d/smart ] ; then
4     echo '*/30 * * * * /srv/sysadmin-cookbook/recepies/smart/dump.sh' > /etc/cron.d/smart
5     fi
6 dpavlin 274
7     cd /srv/sysadmin-cookbook/recepies/smart
8     # awk '{ if ( $3 >= 2930266584 ) print $4 }'
9    
10     driver="-d megaraid,0"
11    
12     cat /proc/partitions | grep ' sd.$' | awk '{ print $4 }' | xargs -i sudo sh -cx "smartctl $* $driver -a /dev/{} > smart.{}"
13     git commit -m `date +%Y-%m-%d.%H:%M:%S` -a

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26