3
# Script to monitor disk usage.
5
# Parameters understood:
8
# autoconf (optional - used by munin-config)
11
# Revision 1.3 2004/01/29 19:39:00 jimmyo
12
# Generic plugins now use printf instead of echo -n, as this is more portable (SF#885564)
14
# Revision 1.2 2004/01/29 18:57:39 jimmyo
15
# Disabled plugins df and df_inode on Solaris (SF#882274).
17
# Revision 1.1 2004/01/02 18:50:00 jimmyo
18
# Renamed occurrances of lrrd -> munin
20
# Revision 1.1.1.1 2004/01/02 15:18:07 jimmyo
21
# Import of LRRD CVS tree after renaming to Munin
23
# Revision 1.6 2003/11/07 17:43:16 jimmyo
24
# Cleanups and log entries
28
# Magic markers (optional - used by munin-config and installation
32
#%# capabilities=autoconf
36
if [ "$1" = "autoconf" ]; then
37
if [ `uname -s` = SunOS ]; then
46
if [ "$1" = "config" ]; then
48
echo 'graph_title Filesystem usage (in %)'
49
echo 'graph_args --upper-limit 100 -l 0'
51
df -P -l | tail +2 | grep -v "//" | while read i; do
52
name=`echo $i | sed 's/[\/.-]/_/g'| awk '{ print $1 }'`
56
if (length(dir) <= $MAXLABEL)
59
printf (\"...%s\n\", substr (dir, length(dir)-$MAXLABEL+4, $MAXLABEL-3))
61
echo "$name.warning 92"
62
echo "$name.critical 98"
67
df -P -l | tail +2 | grep -v "//" | while read i; do
68
name=`echo $i | sed 's/[\/.-]/_/g'| awk '{ print $1 ".value " }'`
70
echo $i | awk '{ print $5 }' | cut -f1 -d%