'GPRINT:max:MAX:%5.1lf%sAh Max,',
'GPRINT:avg:LAST:%5.1lf%sAh Last\l'
],
+ charge_percent => [
+ 'DEF:avg={file}:percent:AVERAGE',
+ 'DEF:min={file}:percent:MIN',
+ 'DEF:max={file}:percent:MAX',
+ "AREA:max#$HalfBlue",
+ "AREA:min#$Canvas",
+ "LINE1:avg#$FullBlue:Charge",
+ 'GPRINT:min:MIN:%5.1lf%s%% Min,',
+ 'GPRINT:avg:AVERAGE:%5.1lf%s%% Avg,',
+ 'GPRINT:max:MAX:%5.1lf%s%% Max,',
+ 'GPRINT:avg:LAST:%5.1lf%s%% Last\l'
+ ],
cpu => ['DEF:user_avg={file}:user:AVERAGE',
'DEF:user_min={file}:user:MIN',
'DEF:user_max={file}:user:MAX',
'GPRINT:temp_max:MAX:%4.1lf Max,',
'GPRINT:temp_avg:LAST:%4.1lf Last\l'
],
+ frequency_offset => [ # NTPd
+ 'DEF:ppm_avg={file}:ppm:AVERAGE',
+ 'DEF:ppm_min={file}:ppm:MIN',
+ 'DEF:ppm_max={file}:ppm:MAX',
+ "AREA:ppm_max#$HalfBlue",
+ "AREA:ppm_min#$Canvas",
+ "LINE1:ppm_avg#$FullBlue:{inst}",
+ 'GPRINT:ppm_min:MIN:%5.2lf Min,',
+ 'GPRINT:ppm_avg:AVERAGE:%5.2lf Avg,',
+ 'GPRINT:ppm_max:MAX:%5.2lf Max,',
+ 'GPRINT:ppm_avg:LAST:%5.2lf Last'
+ ],
hddtemp => [
'DEF:temp_avg={file}:value:AVERAGE',
'DEF:temp_min={file}:value:MIN',
'GPRINT:l_max:MAX:%4.2lf Max,',
'GPRINT:l_avg:LAST:%4.2lf Last'
],
+ load_percent => [
+ 'DEF:avg={file}:percent:AVERAGE',
+ 'DEF:min={file}:percent:MIN',
+ 'DEF:max={file}:percent:MAX',
+ "AREA:max#$HalfBlue",
+ "AREA:min#$Canvas",
+ "LINE1:avg#$FullBlue:Load",
+ 'GPRINT:min:MIN:%5.1lf%s%% Min,',
+ 'GPRINT:avg:AVERAGE:%5.1lf%s%% Avg,',
+ 'GPRINT:max:MAX:%5.1lf%s%% Max,',
+ 'GPRINT:avg:LAST:%5.1lf%s%% Last\l'
+ ],
mails => ['DEF:rawgood={file}:good:AVERAGE',
'DEF:rawspam={file}:spam:AVERAGE',
'CDEF:good=rawgood,UN,0,rawgood,IF',
'GPRINT:temp_max:MAX:%4.1lf Max,',
'GPRINT:temp_avg:LAST:%4.1lf Last\l'
],
+ timeleft => [
+ 'DEF:avg={file}:timeleft:AVERAGE',
+ 'DEF:min={file}:timeleft:MIN',
+ 'DEF:max={file}:timeleft:MAX',
+ "AREA:max#$HalfBlue",
+ "AREA:min#$Canvas",
+ "LINE1:avg#$FullBlue:Time left [min]",
+ 'GPRINT:min:MIN:%5.1lf%s Min,',
+ 'GPRINT:avg:AVERAGE:%5.1lf%s Avg,',
+ 'GPRINT:max:MAX:%5.1lf%s Max,',
+ 'GPRINT:avg:LAST:%5.1lf%s Last\l'
+ ],
+ time_offset => [ # NTPd
+ 'DEF:s_avg={file}:seconds:AVERAGE',
+ 'DEF:s_min={file}:seconds:MIN',
+ 'DEF:s_max={file}:seconds:MAX',
+ "AREA:s_max#$HalfBlue",
+ "AREA:s_min#$Canvas",
+ "LINE1:s_avg#$FullBlue:{inst}",
+ 'GPRINT:s_min:MIN:%7.3lf%s Min,',
+ 'GPRINT:s_avg:AVERAGE:%7.3lf%s Avg,',
+ 'GPRINT:s_max:MAX:%7.3lf%s Max,',
+ 'GPRINT:s_avg:LAST:%7.3lf%s Last'
+ ],
traffic => ['DEF:out_min_raw={file}:outgoing:MIN',
'DEF:out_avg_raw={file}:outgoing:AVERAGE',
'DEF:out_max_raw={file}:outgoing:MAX',
'GPRINT:max:MAX:%5.1lf%sV Max,',
'GPRINT:avg:LAST:%5.1lf%sV Last\l'
],
- threads => [
+ vs_threads => [
"DEF:total_avg={file}:total:AVERAGE",
"DEF:total_min={file}:total:MIN",
"DEF:total_max={file}:total:MAX",
$GraphDefs->{'disk'} = $GraphDefs->{'partition'};
$GraphDefs->{'meminfo'} = $GraphDefs->{'memory'};
$GraphDefs->{'sensors'} = $GraphDefs->{'temperature'};
+
+ $GraphDefs->{'delay'} = $GraphDefs->{'time_offset'};
+ $GraphDefs->{'time_dispersion'} = $GraphDefs->{'time_offset'};
}
our $GraphArgs =
apache_requests => ['-t', 'apache requests', '-v', 'Requests/s'],
apache_scoreboard => ['-t', 'apache scoreboard {inst}', '-v', 'Processes'],
charge => ['-t', '{host} charge', '-v', 'Ampere hours'],
+ charge_percent => ['-t', '{host} charge', '-v', 'Percent'],
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'],
+ delay => ['-t', 'NTPd peer delay ({inst})', '-v', 'Seconds'],
df => ['-t', '{host}:{inst} usage', '-v', 'Percent', '-l', '0'],
disk => ['-t', '{host} disk {inst} usage', '-v', 'Byte/s'],
fanspeed => ['-t', '{host} fanspeed {inst}', '-v', 'rpm'],
+ frequency_offset => ['-t', 'NTPd frequency offset ({inst})', '-v', 'Parts per million'],
hddtemp => ['-t', '{host} hdd temperature {inst}', '-v', '°Celsius'],
load => ['-t', '{host} load average', '-v', 'System load', '-X', '0'],
+ load_percent => ['-t', '{host} load', '-v', 'Percent'],
mails => ['-t', '{host} mail count', '-v', 'Amount', '-X', '0'],
memory => ['-t', '{host} memory usage', '-v', 'Bytes', '-b', '1024', '-l', '0'],
mysql_commands => ['-t', 'mysql command {inst}', '-v', 'Issues/s' ],
sensors => ['-t', '{host} sensor {inst}', '-v', '°Celsius'],
swap => ['-t', '{host} swap usage', '-v', 'Bytes', '-b', '1024', '-l', '0'],
temperature => ['-t', '{host} temperature {inst}', '-v', '°Celsius'],
+ timeleft => ['-t', '{host} UPS time left', '-v', 'Time [min]'],
+ time_offset => ['-t', 'NTPd time offset ({inst})', '-v', 'Seconds'],
+ time_dispersion => ['-t', 'NTPd time dispersion ({inst})', '-v', 'Seconds'],
traffic => ['-t', '{host} {inst} traffic', '-v', 'Bit/s'],
users => ['-t', '{host} users', '-v', 'Users'],
voltage => ['-t', '{host} voltage', '-v', 'Volts'],
- threads => ['-t', '{host} threads', '-v', 'Threads'],
+ vs_threads => ['-t', '{host} threads', '-v', 'Threads'],
vs_memory => ['-t', '{host} memory usage', '-v', 'Bytes'],
vs_processes => ['-t', '{host} processes', '-v', 'Processes'],
};
ping => \&output_graph_ping,
sensors => 1,
traffic => 1,
- users => 1
+ users => 1
};
our @Info;
$AbsDir = $Config->{'Directory'};
$RelDir = '';
- while (@info and -d $AbsDir . '/' . $Info[0])
+ while (@info and -d $AbsDir . '/' . $info[0])
{
my $new = shift (@info);
next if ($new =~ m/^\./);