From 03d932e78fb2e8cba8c0777f179b2cb772c8d4f8 Mon Sep 17 00:00:00 2001 From: octo Date: Tue, 31 Jan 2006 12:15:31 +0000 Subject: [PATCH] Added battery stuff to `collection.cgi' --- contrib/museum/collection.cgi | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/contrib/museum/collection.cgi b/contrib/museum/collection.cgi index e7831aa5..5684475e 100755 --- a/contrib/museum/collection.cgi +++ b/contrib/museum/collection.cgi @@ -53,6 +53,18 @@ our $GraphDefs; $GraphDefs = { + charge => [ + 'DEF:avg={file}:charge:AVERAGE', + 'DEF:min={file}:charge:MIN', + 'DEF:max={file}:charge:MAX', + "AREA:max#$HalfBlue", + "AREA:min#$Canvas", + "LINE1:avg#$FullBlue:Charge", + 'GPRINT:min:MIN:%5.1lf%sAh Min,', + 'GPRINT:avg:AVERAGE:%5.1lf%sAh Avg,', + 'GPRINT:max:MAX:%5.1lf%sAh Max,', + 'GPRINT:avg:LAST:%5.1lf%sAh Last\l' + ], cpu => ['DEF:user_avg={file}:user:AVERAGE', 'DEF:user_min={file}:user:MIN', 'DEF:user_max={file}:user:MAX', @@ -111,6 +123,18 @@ our $GraphDefs; 'GPRINT:syst_max:MAX:%5.1lf%% Max,', 'GPRINT:syst_avg:LAST:%5.1lf%% Last\l' ], + current => [ + 'DEF:avg={file}:current:AVERAGE', + 'DEF:min={file}:current:MIN', + 'DEF:max={file}:current:MAX', + "AREA:max#$HalfBlue", + "AREA:min#$Canvas", + "LINE1:avg#$FullBlue:Current", + 'GPRINT:min:MIN:%5.1lf%sA Min,', + 'GPRINT:avg:AVERAGE:%5.1lf%sA Avg,', + 'GPRINT:max:MAX:%5.1lf%sA Max,', + 'GPRINT:avg:LAST:%5.1lf%sA Last\l' + ], df => [ 'DEF:free_avg={file}:free:AVERAGE', 'DEF:free_min={file}:free:MIN', @@ -682,6 +706,18 @@ our $GraphDefs; 'GPRINT:users_avg:AVERAGE:%4.1lf Average,', 'GPRINT:users_max:MAX:%4.1lf Max,', 'GPRINT:users_avg:LAST:%4.1lf Last\l' + ], + voltage => [ + 'DEF:avg={file}:voltage:AVERAGE', + 'DEF:min={file}:voltage:MIN', + 'DEF:max={file}:voltage:MAX', + "AREA:max#$HalfBlue", + "AREA:min#$Canvas", + "LINE1:avg#$FullBlue:Voltage", + 'GPRINT:min:MIN:%5.1lf%sV Min,', + 'GPRINT:avg:AVERAGE:%5.1lf%sV Avg,', + 'GPRINT:max:MAX:%5.1lf%sV Max,', + 'GPRINT:avg:LAST:%5.1lf%sV Last\l' ] }; $GraphDefs->{'disk'} = $GraphDefs->{'partition'}; @@ -690,8 +726,10 @@ our $GraphDefs; our $GraphArgs = { + charge => ['-t', '{host} charge', '-v', 'Ampere hours'], cpu => ['-t', '{host} cpu{inst} usage', '-v', 'Percent', '-l', '0'], cpufreq => ['-t', '{host} cpu{inst} usage', '-v', 'Mhz'], + current => ['-t', '{host} current', '-v', 'Ampere'], #disk => ['-t', '{host} disk {inst} IO wait', '-v', 'Seconds'], df => ['-t', '{host}:{inst} usage', '-v', 'Percent', '-l', '0'], disk => ['-t', '{host} disk {inst} usage', '-v', 'Byte/s'], @@ -710,7 +748,8 @@ our $GraphArgs = sensors => ['-t', '{host} sensor {inst}', '-v', '°Celsius'], swap => ['-t', '{host} swap usage', '-v', 'Bytes', '-b', '1024', '-l', '0'], traffic => ['-t', '{host} {inst} traffic', '-v', 'Bit/s'], - users => ['-t', '{host} users', '-v', 'Users'], + users => ['-t', '{host} users', '-v', 'Users'], + voltage => ['-t', '{host} voltage', '-v', 'Volts'] }; our $GraphMulti = -- 2.11.0