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 :  /proc/self/root/usr/share/munin/plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/share/munin/plugins/sendmail_mailtraffic
#!/bin/sh
#
# Plugin to monitor sendmail statistics.
#
# Usage: Place in /etc/lrrd/client.d/ (or link it there  using ln -s)
#
# Config variables:
#
#       mailstats - path to mailstats command
#
# Parameters understood:
#
# 	config   (required)
# 	autoconf (optional)
#
# $Log$
# Revision 1.6.2.1  2005/01/11 13:47:02  ilmari
# Fix sendmail_mail{stats,traffic} autoconf handling.
#
# Revision 1.6  2005/01/03 14:17:30  jimmyo
# Plugins generic/sendmail_mail{stats,traffic} updated.
#
#
# Magic markers (used by munin-node-configure)
#%# capabilities=autoconf
#%# family=auto

if [ -n "$mailstats" ]; then MAILSTATS=$mailstats; else MAILSTATS=`which mailstats`; fi

if [ "$1" = "autoconf" ]; then
	if [ -n "$MAILSTATS" ] && [ -x "$MAILSTATS" ]; then
		echo yes
		exit 0
	else
		echo no
		exit 1
	fi
fi

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

	echo "graph_title Sendmail email volumes"
	echo "graph_order received sent"
	echo 'graph_vlabel bytes/${graph_period}'
	echo "graph_category sendmail"
	echo "received.label received"
	echo "sent.label sent"
	echo "received.max 1000000"
	echo "received.min 0"
	echo "sent.max 1000000"
	echo "sent.min 0"
	echo "received.type DERIVE"
	echo "sent.type DERIVE"
	exit 0
fi

$MAILSTATS -P | awk '/^ *T/ {
  received = received + $5
  sent = sent + $3
}

END {
  print "received.value", received
  print "sent.value", sent
}'


Anon7 - 2021