Plan 9 from Bell Labs’s /usr/web/sources/contrib/gabidiaz/root/sys/src/cmd/snmpfs/tools/monstats

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc

NET=$1

start=`{cat /sys/log/mon/monnet.$NET | sed 1q | awk '{a=$1; print $1}'}
# end is one day later in seconds
end=`{echo $start+86400 | bc}
day=`{date | awk '{print $3 "-" $2}'}

start=`{ echo $start-200|bc}
cat /sys/log/mon/monnet.$NET | /usr/gdiaz/bin/386/drawvars -T -t 'Network traffic '^$day -s $start -e $end -m 1200 -v t,In,Out | topng > /usr/web/stats/traffic.png

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].