From 38cb629a721bb2830c316df2caeedabcbee1ef9f Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 26 Jun 2010 18:09:48 +0100 Subject: [PATCH] network; correct base on memory; users --- cgi | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/cgi b/cgi index de792b3..0efae63 100755 --- a/cgi +++ b/cgi @@ -71,7 +71,7 @@ graph('General', 'CPU', { Units => '[%]' }, ]); graph('General', 'Memory', { }, - [ + [ '-b',1024, (map { "DEF:swap_$_=$R/swap/swap-$_.rrd:value:AVERAGE" } qw(free used cached)), (map { "DEF:mem_$_=$R/memory/memory-$_.rrd:value:AVERAGE" } @@ -88,6 +88,31 @@ graph('General', 'Memory', { }, "AREA:mem_free#ccc:unused memory:STACK", ]); +graph('General', 'Network', { Units => '[/sec; tx +ve; errs x1000]' }, + [ + (map { + ("DEF:tx_$_=$R/interface/if_$_-eth0.rrd:tx:AVERAGE", + "DEF:rx_$_=$R/interface/if_$_-eth0.rrd:rx:AVERAGE", + "CDEF:mrx_$_=0,rx_$_,-") + } qw(octets packets errors)), + (map { + ("CDEF:${_}_kb=${_}_octets,1024,/", + "CDEF:${_}_errsx=${_}_errors,1000,*") + } qw(mrx tx)), + "AREA:tx_kb#080:kby", + "LINE:tx_packets#0f0:pkts", + "LINE:tx_errsx#000:errs", + "AREA:mrx_kb#008:kby", + "LINE:mrx_packets#00f:pkts", + "LINE:mrx_errsx#444:errs", + ]); + +graph('General', 'Users', { }, + [ + "DEF:users=$R/users/users.rrd:users:AVERAGE", + "LINE:users#008:users" + ]); + foreach my $src (<$R/df/df-*.rrd>) { my $vol= $src; $vol =~ s,.*/,,; -- 2.30.2