Opened 17 years ago

Closed 7 years ago

#159 closed task (wontfix)

We Need Low Disk notifier on osgeo1 and osgeo2

Reported by: warmerdam Owned by: sac@…
Priority: normal Milestone:
Component: SysAdmin Keywords:
Cc:

Description

Could something put in place a script on osgeo1 and osgeo2 to notify the SAC list when disk space falls below some threshhold like 5GB? Mateusz suggests a script something like:

#!/bin/sh
df -H | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output;
do
  echo $output
  usep=$(echo $output | awk '{ print $1}' | cut -d'%' -f1  )
  partition=$(echo $output | awk '{ print $2 }' )
  if [ $usep -ge 90 ]; then
    echo "Running out of space \"$partition ($usep%)\" on $(hostname) as on $(date)" |
     mail -s "Alert: Almost out of disk space $usep%" you@somewhere.com
  fi
done

I've done my threshold of remote system admin over my sat link ... so painful!

It might also make sense to put something like this on key telascience servers with a smaller activation point.

Change History (2)

comment:1 by Mateusz Łoskot, 17 years ago

The script above was taken from NIXCRAFT website, Shell script to watch the disk space

comment:2 by wildintellect, 7 years ago

Resolution: wontfix
Status: newclosed

We no longer have osgeo1 and osgeo2. Current systems send munin notifications.

Note: See TracTickets for help on using tickets.