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.linux/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/local/src/munin-1.2.6/node/node.d.linux/df_abs.in
#!@@GOODSH@@
# -*- sh -*-
#
# $Id: df_abs.in 1589 2008-04-12 23:37:11Z matthias $
#
# Script to monitor absolute disk usage.
#
# Parameters understood:
#
# 	config   (required)
# 	autoconf (optional - used by munin-config)
#
# Environment
#       exclude: space separated list if fs types to exclude.
#                iso9660 squashfs udf romfs ramfs by default
#       warning: Warning _percentage_, default 92
#       critical: Critical _percentage_, default 98
#
# Magic markers (optional - used by munin-config and installation
# scripts):
#
# $Id: df_abs.in 1589 2008-04-12 23:37:11Z matthias $
#
#%# family=manual
#%# capabilities=autoconf

. $MUNIN_LIBDIR/plugins/plugin.sh

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

exclude=${exclude:-iso9660 squashfs udf romfs ramfs}

exclude=$(echo $exclude | sed -e 's/ / -x /g' -e 's/^/-x /')

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

	echo 'graph_title Filesystem usage (in bytes)'
	echo 'graph_args --base 1024 --lower-limit 0'
	echo 'graph_vlabel bytes'
	echo 'graph_category disk'
	echo 'graph_total Total'
	df -P -l $exclude | sed 1d | grep -v "//" | 
	   while read dev size used avail cap mnt; do
	       name="$(clean_fieldname $dev)"
	       echo "$name.label $mnt"
	       echo "$name.cdef $name,1024,*"
	       echo "$name.warning $((size * ${warning:-92} / 100))"
	       echo "$name.critical $((size * ${critical:-98} / 100))"
	done
	exit 0
fi

df -P -l $exclude | sed 1d | grep -v "//" | 
   while read dev size used avail cap mnt; do
	echo "$(clean_fieldname $dev).value $used"
done

Anon7 - 2021