1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
#!/bin/sh
# $Log$
# Revision 1.4 2004/05/20 19:02:38 jimmyo
# Set categories on a bunch of plugins
#
# Revision 1.3 2004/05/15 21:33:30 jimmyo
# "Upped" som plugins from contrib/manual to manual or auto.
#
# Revision 1.2 2004/05/06 19:38:30 jimmyo
# Made solaris-plugin fs_df work without GNU df (SF#944389).
#
# Revision 1.1 2004/01/02 18:50:01 jimmyo
# Renamed occurrances of lrrd -> munin
#
# Revision 1.1.1.1 2004/01/02 15:18:07 jimmyo
# Import of LRRD CVS tree after renaming to Munin
#
# Revision 1.2 2003/11/07 17:43:16 jimmyo
# Cleanups and log entries
#
#
#%# family=manual
DF=/usr/sbin/df
TAIL=/usr/bin/tail
if [ "$1" = "config" ]; then
echo 'graph_title Filesystem usage (in %)'
echo 'graph_args --upper-limit 100'
echo 'graph_category disk'
$DF -k -l | $TAIL +2 | while read i; do
name=`echo $i | sed 's/[\/.]/_/g' | awk '{ print $6 }' | $TAIL -15c`
printf "$name.label "
echo $i | awk '{ print $6 }'
printf "$name.warn "
echo 95
done
exit 0
fi
$DF -k -l | $TAIL +2 | while read i; do
name=`echo $i | sed 's/[\/.]/_/g' | awk '{ print $6 }' | $TAIL -15c`
printf "$name.value "
echo $i | awk '{ print $5 }' | cut -f1 -d%
done
|