From: Sven Hoexter Date: Mon, 17 Jan 2011 16:45:16 +0000 (+0100) Subject: Import Alix mrtg scripts X-Git-Url: https://git.sven.stormbind.net/?a=commitdiff_plain;h=e1c2d0940e95d5a903d8bbc8cc7837f67bdcac89;p=sven%2Fscripts.git Import Alix mrtg scripts --- diff --git a/mrtg-alix/mrtg-scripts/explore_cpu b/mrtg-alix/mrtg-scripts/explore_cpu new file mode 100755 index 0000000..a4119fb --- /dev/null +++ b/mrtg-alix/mrtg-scripts/explore_cpu @@ -0,0 +1,7 @@ +#! /bin/sh + +PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin + +head -1 /proc/stat |awk '{print $4"\n" $2+$3+$4}' +echo "" +hostname -s diff --git a/mrtg-alix/mrtg-scripts/explore_load b/mrtg-alix/mrtg-scripts/explore_load new file mode 100755 index 0000000..fc485fa --- /dev/null +++ b/mrtg-alix/mrtg-scripts/explore_load @@ -0,0 +1,17 @@ +#!/usr/bin/perl -w + +$_ = <>; +my ($l, $p) = ($_ =~ /^\s*[\d.]+\s+([\d.]+)\s+[\d.]+\s+\d+\/(\d+)/); +$l = int($l*100); + +my $h = `hostname`; +chomp $h; +print <Load average and # of procs +Options[load]: nopercent,growright,gauge +ShortLegend[load]:   +YLegend[load]: procs, load*100 +Legend1[load]: Five-minutes load average * 100 +Legend2[load]: Number of processes +LegendI[load]:  load*100 +LegendO[load]:  procs +#WithPeak[load]: wym +Colours[load]: ORANGE#ffa000, RED#f00000, BLACK#000000, VIOLET#ff00ff + + +# System and non-idle time +Target[cpu]: `/usr/local/sbin/explore_cpu` +MaxBytes[cpu]: 200 +Title[cpu]: - System and Non-Idle CPU Time +PageTop[cpu]:

System CPU time and Non-Idle CPU Time

+Options[cpu]: growright,nopercent +ShortLegend[cpu]:  % +YLegend[cpu]: % of one CPU +Legend1[cpu]: System CPU Time +Legend2[cpu]: Non-Idle CPU Time +LegendI[cpu]:  system +LegendO[cpu]:  nonidle +#WithPeak[cpu]: wym +Colours[cpu]: ORANGE#ffa000, RED#f00000, BLACK#000000, VIOLET#ff00ff + +# CPU und MB tempreture +Target[temp]: `/usr/local/sbin/explore_temp` +MaxBytes[temp]: 100 +Title[temp]: - Temp CPU and MB +PageTop[temp]:

Temp CPU and MB

+Options[temp]: nopercent,growright,gauge +ShortLegend[temp]:   +YLegend[temp]: CPU, MB +#Legend1[temp]: Five-minutes temp +#Legend2[temp]: Number of processes +LegendI[temp]:  CPU +LegendO[temp]:  MB +#WithPeak[temp]: wym +Colours[temp]: ORANGE#ffa000, RED#f00000, BLACK#000000, VIOLET#ff00ff + + +#### Network interfaces ### + +Target[ppp0]: `/usr/local/sbin/explore_net ppp0` +MaxBytes1[ppp0]: 204800 +MaxBytes2[ppp0]: 204800 +Title[ppp0]: Traffic device ppp0 [DSL] +PageTop[ppp0]: Internet Link +#WithPeak[ppp0]: wym + +Target[eth0]: `/usr/local/sbin/explore_net eth0` +MaxBytes1[eth0]: 12500000 +MaxBytes2[eth0]: 12500000 +Title[eth0]: Traffic device eth0 [LAN] +PageTop[eth0]: LAN +#WithPeak[eth0]: wym + +Target[eth2]: `/usr/local/sbin/explore_net eth2` +MaxBytes1[eth2]: 12500000 +MaxBytes2[eth2]: 12500000 +Title[eth2]: Traffic device eth2 [WLAN] +PageTop[eth2]: WLAN +#WithPeak[eth2]: wym + +Target[tun0]: `/usr/local/sbin/explore_net tun0` +MaxBytes1[tun0]: 12500000 +MaxBytes2[tun0]: 12500000 +Title[tun0]: Traffic device tun0 [VPN] +PageTop[tun0]: OpenVPN +#WithPeak[tun0]: wym \ No newline at end of file