MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /usr/local/src/munin-1.2.6/node/node.d.aix/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/local/src/munin-1.2.6/node/node.d.aix/df.in
#!@@GOODSH@@
# -*- sh -*-
#
# $Id: df.in 1415 2008-01-26 21:52:41Z matthias $
#
# Script to monitor disk usage.
#
#   DESCRIPTION
#   ===========
#     This will report back the sizes of the filesystems currently
#     mounted.  All measurements are reported in percents, not in actual
#     512KB pages.  It uses /usr/bin/df.
#     
#   RESCTRICTIONS
#   =============
#     Unless you've restricted who can use /usr/bin/df then there are none.
#
# Parameters understood:
#
# 	config   (required)
# 	autoconf (optional - used by munin-config)
#
# Environment:
#       warning  Warning percentage, default 92
#       critical Critical percentage, default 98
#
# Magic markers (optional - used by munin-config and installation
# scripts):
#
#%# family=contrib
#%# capabilities=autoconf

if [ "$1" = "autoconf" ]; then
	echo yes
	exit 0
fi

if [ "$1" = "config" ]; then

	echo 'graph_title Filesystem usage (in %)'
	echo 'graph_args --upper-limit 100 -l 0'
	echo 'graph_vlabel %'
	echo 'graph_category disk'
	echo 'graph_scale no'
	df -P -k | sed 1d | grep -v "//" | grep -v "nfs" | while read i; do
		name=`echo $i | sed 's/[\/.-]/_/g'| awk '{ print $6 }'`
		devName="$name.label "
		fsLabel=`echo $i | awk '{ print $6 }'`
                echo $devName$fsLabel
		echo "$name.warning ${warning:-92}"
		echo "$name.critical ${critical:-98}"
	done
	exit 0
fi

df -P -k | sed 1d | grep -v "//" | grep -v "nfs" | while read i; do
	name=`echo $i | sed 's/[\/.-]/_/g'| awk '{ print $6 ".value " }'`
	name2=`echo $i | awk '{ print $5 }' | cut -f1 -d%`
        echo $name $name2
done

Anon7 - 2021