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/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/local/src/munin-1.2.6/node/node.d/foldingathome_wu.in
#!/bin/sh
#
# Folding@Home WU submited
#
# Parameters:
#
#   config   (required)
#   autoconf (optional - only used by munin-config)
#
# Magic markers (optional - used by munin-config and some installation
# scripts):
#%# family=contrib
#%# capabilities=autoconf

statefile=@@PLUGSTATE@@/plugin-fah_wu.state

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

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

    echo 'graph_title Folding@Home Working Units submited'
    echo 'graph_args -l 0 --base 1000'
    echo 'graph_vlabel WU done'
    echo 'wu.label WU'
    echo 'wu.type GAUGE'
    exit 0
fi

wu=`wget "http://vspx27.stanford.edu/cgi-bin/main.py?qtype=userpage&username=8d" -q -t 1 -T 5 -O - | egrep -A 2 "<TD> WU</TD>" | grep "<b>" | sed 's/.*<b> \([0-9]*\) .*/\1/'`

if [ "$wu" == "" ]; then
	if [ -f $statefile ]; then
		echo wu.value `cat $statefile`
	fi
else
	echo $wu > $statefile
	echo wu.value $wu
fi


Anon7 - 2021