$GraphDefs =
{
+ apache_bytes => ['DEF:min_raw={file}:count:MIN',
+ 'DEF:avg_raw={file}:count:AVERAGE',
+ 'DEF:max_raw={file}:count:MAX',
+ 'CDEF:min=min_raw,8,*',
+ 'CDEF:avg=avg_raw,8,*',
+ 'CDEF:max=max_raw,8,*',
+ 'CDEF:mytime=avg_raw,TIME,TIME,IF',
+ 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
+ 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
+ 'CDEF:avg_sample=avg_raw,UN,0,avg_raw,IF,sample_len,*',
+ 'CDEF:avg_sum=PREV,UN,0,PREV,IF,avg_sample,+',
+ "AREA:avg#$HalfBlue",
+ "LINE1:avg#$FullBlue:Bit/s",
+ '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',
+ 'GPRINT:avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
+ ],
+ apache_requests => ['DEF:min={file}:count:MIN',
+ 'DEF:avg={file}:count:AVERAGE',
+ 'DEF:max={file}:count:MAX',
+ "AREA:max#$HalfBlue",
+ "AREA:min#$Canvas",
+ "LINE1:avg#$FullBlue:Requests/s",
+ 'GPRINT:min:MIN:%6.2lf Min,',
+ 'GPRINT:avg:AVERAGE:%6.2lf Avg,',
+ 'GPRINT:max:MAX:%6.2lf Max,',
+ 'GPRINT:avg:LAST:%6.2lf Last'
+ ],
+ apache_scoreboard => ['DEF:min={file}:count:MIN',
+ 'DEF:avg={file}:count:AVERAGE',
+ 'DEF:max={file}:count:MAX',
+ "AREA:max#$HalfBlue",
+ "AREA:min#$Canvas",
+ "LINE1:avg#$FullBlue:Processes",
+ 'GPRINT:min:MIN:%6.2lf Min,',
+ 'GPRINT:avg:AVERAGE:%6.2lf Avg,',
+ 'GPRINT:max:MAX:%6.2lf Max,',
+ 'GPRINT:avg:LAST:%6.2lf Last'
+ ],
charge => [
'DEF:avg={file}:charge:AVERAGE',
'DEF:min={file}:charge:MIN',
'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:total_max_ms:MAX:%5.1lf%s Max,',
'GPRINT:total_avg_ms:LAST:%5.1lf%s Last'
],
+ fanspeed => [
+ 'DEF:temp_avg={file}:value:AVERAGE',
+ 'DEF:temp_min={file}:value:MIN',
+ 'DEF:temp_max={file}:value:MAX',
+ "AREA:temp_max#$HalfBlue",
+ "AREA:temp_min#$Canvas",
+ "LINE1:temp_avg#$FullBlue:RPM",
+ 'GPRINT:temp_min:MIN:%4.1lf Min,',
+ 'GPRINT:temp_avg:AVERAGE:%4.1lf Avg,',
+ '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:temp_max:MAX:%4.1lf Max,',
'GPRINT:temp_avg:LAST:%4.1lf Last\l'
],
+ if_packets => ['DEF:tx_min={file}:tx:MIN',
+ 'DEF:tx_avg={file}:tx:AVERAGE',
+ 'DEF:tx_max={file}:tx:MAX',
+ 'DEF:rx_min={file}:rx:MIN',
+ 'DEF:rx_avg={file}:rx:AVERAGE',
+ 'DEF:rx_max={file}:rx:MAX',
+ 'CDEF:overlap=tx_avg,rx_avg,GT,rx_avg,tx_avg,IF',
+ 'CDEF:mytime=tx_avg,TIME,TIME,IF',
+ 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
+ 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
+ 'CDEF:tx_avg_sample=tx_avg,UN,0,tx_avg,IF,sample_len,*',
+ 'CDEF:tx_avg_sum=PREV,UN,0,PREV,IF,tx_avg_sample,+',
+ 'CDEF:rx_avg_sample=rx_avg,UN,0,rx_avg,IF,sample_len,*',
+ 'CDEF:rx_avg_sum=PREV,UN,0,PREV,IF,rx_avg_sample,+',
+ "AREA:tx_avg#$HalfGreen",
+ "AREA:rx_avg#$HalfBlue",
+ "AREA:overlap#$HalfBlueGreen",
+ "LINE1:tx_avg#$FullGreen:TX",
+ 'GPRINT:tx_avg:AVERAGE:%5.1lf%s Avg,',
+ 'GPRINT:tx_max:MAX:%5.1lf%s Max,',
+ 'GPRINT:tx_avg:LAST:%5.1lf%s Last',
+ 'GPRINT:tx_avg_sum:LAST:(ca. %4.0lf%s Total)\l',
+ "LINE1:rx_avg#$FullBlue:RX",
+ #'GPRINT:rx_min:MIN:%5.1lf %s Min,',
+ 'GPRINT:rx_avg:AVERAGE:%5.1lf%s Avg,',
+ 'GPRINT:rx_max:MAX:%5.1lf%s Max,',
+ 'GPRINT:rx_avg:LAST:%5.1lf%s Last',
+ 'GPRINT:rx_avg_sum:LAST:(ca. %4.0lf%s Total)\l'
+ ],
load => ['DEF:s_avg={file}:shortterm:AVERAGE',
'DEF:s_min={file}:shortterm:MIN',
'DEF:s_max={file}:shortterm:MAX',
'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',
'DEF:free_max={file}:free:MAX',
'DEF:buffers_max={file}:buffers:MAX',
'DEF:cached_max={file}:cached:MAX',
- 'CDEF:free_cached_buffers_used=free_avg,cached_avg,+,buffers_avg,+,used_avg,+',
- 'CDEF:cached_buffers_used=cached_avg,buffers_avg,+,used_avg,+',
+ 'CDEF:cached_avg_nn=cached_avg,UN,0,cached_avg,IF',
+ 'CDEF:buffers_avg_nn=buffers_avg,UN,0,buffers_avg,IF',
+ 'CDEF:free_cached_buffers_used=free_avg,cached_avg_nn,+,buffers_avg_nn,+,used_avg,+',
+ 'CDEF:cached_buffers_used=cached_avg,buffers_avg_nn,+,used_avg,+',
'CDEF:buffers_used=buffers_avg,used_avg,+',
"AREA:free_cached_buffers_used#$HalfGreen",
"AREA:cached_buffers_used#$HalfBlue",
'GPRINT:sleeping_max:MAX:%5.1lf Max,',
'GPRINT:sleeping_avg:LAST:%5.1lf Last\l'
],
- sensors => [
- 'DEF:temp_avg={file}:value:AVERAGE',
- 'DEF:temp_min={file}:value:MIN',
- 'DEF:temp_max={file}:value:MAX',
- "AREA:temp_max#$HalfBlue",
- "AREA:temp_min#$Canvas",
- "LINE1:temp_avg#$FullBlue:Value",
- 'GPRINT:temp_min:MIN:%4.1lf Min,',
- 'GPRINT:temp_avg:AVERAGE:%4.1lf Avg,',
- 'GPRINT:temp_max:MAX:%4.1lf Max,',
- 'GPRINT:temp_avg:LAST:%4.1lf Last\l'
+ ps_rss => [
+ 'DEF:avg={file}:byte:AVERAGE',
+ 'DEF:min={file}:byte:MIN',
+ 'DEF:max={file}:byte:MAX',
+ "AREA:avg#$HalfBlue",
+ "LINE1:avg#$FullBlue:RSS",
+ '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'
+ ],
+ ps_cputime => [
+ 'DEF:user_avg_raw={file}:user:AVERAGE',
+ 'DEF:user_min_raw={file}:user:MIN',
+ 'DEF:user_max_raw={file}:user:MAX',
+ 'DEF:syst_avg_raw={file}:syst:AVERAGE',
+ 'DEF:syst_min_raw={file}:syst:MIN',
+ 'DEF:syst_max_raw={file}:syst:MAX',
+ 'CDEF:user_avg=user_avg_raw,1000000,/',
+ 'CDEF:user_min=user_min_raw,1000000,/',
+ 'CDEF:user_max=user_max_raw,1000000,/',
+ 'CDEF:syst_avg=syst_avg_raw,1000000,/',
+ 'CDEF:syst_min=syst_min_raw,1000000,/',
+ 'CDEF:syst_max=syst_max_raw,1000000,/',
+ 'CDEF:user_syst=syst_avg,UN,0,syst_avg,IF,user_avg,+',
+ "AREA:user_syst#$HalfBlue",
+ "AREA:syst_avg#$HalfRed",
+ "LINE1:user_syst#$FullBlue:User ",
+ 'GPRINT:user_min:MIN:%5.1lf%s Min,',
+ 'GPRINT:user_avg:AVERAGE:%5.1lf%s Avg,',
+ 'GPRINT:user_max:MAX:%5.1lf%s Max,',
+ 'GPRINT:user_avg:LAST:%5.1lf%s Last\l',
+ "LINE1:syst_avg#$FullRed:System",
+ 'GPRINT:syst_min:MIN:%5.1lf%s Min,',
+ 'GPRINT:syst_avg:AVERAGE:%5.1lf%s Avg,',
+ 'GPRINT:syst_max:MAX:%5.1lf%s Max,',
+ 'GPRINT:syst_avg:LAST:%5.1lf%s Last\l'
+ ],
+ ps_count => [
+ 'DEF:procs_avg={file}:processes:AVERAGE',
+ 'DEF:procs_min={file}:processes:MIN',
+ 'DEF:procs_max={file}:processes:MAX',
+ 'DEF:thrds_avg={file}:threads:AVERAGE',
+ 'DEF:thrds_min={file}:threads:MIN',
+ 'DEF:thrds_max={file}:threads:MAX',
+ "AREA:thrds_avg#$HalfBlue",
+ "AREA:procs_avg#$HalfRed",
+ "LINE1:thrds_avg#$FullBlue:Threads ",
+ 'GPRINT:thrds_min:MIN:%5.1lf Min,',
+ 'GPRINT:thrds_avg:AVERAGE:%5.1lf Avg,',
+ 'GPRINT:thrds_max:MAX:%5.1lf Max,',
+ 'GPRINT:thrds_avg:LAST:%5.1lf Last\l',
+ "LINE1:procs_avg#$FullRed:Processes",
+ 'GPRINT:procs_min:MIN:%5.1lf Min,',
+ 'GPRINT:procs_avg:AVERAGE:%5.1lf Avg,',
+ 'GPRINT:procs_max:MAX:%5.1lf Max,',
+ 'GPRINT:procs_avg:LAST:%5.1lf Last\l'
+ ],
+ ps_pagefaults => [
+ 'DEF:minor_avg={file}:minflt:AVERAGE',
+ 'DEF:minor_min={file}:minflt:MIN',
+ 'DEF:minor_max={file}:minflt:MAX',
+ 'DEF:major_avg={file}:majflt:AVERAGE',
+ 'DEF:major_min={file}:majflt:MIN',
+ 'DEF:major_max={file}:majflt:MAX',
+ 'CDEF:minor_major=major_avg,UN,0,major_avg,IF,minor_avg,+',
+ "AREA:minor_major#$HalfBlue",
+ "AREA:major_avg#$HalfRed",
+ "LINE1:minor_major#$FullBlue:Minor",
+ 'GPRINT:minor_min:MIN:%5.1lf%s Min,',
+ 'GPRINT:minor_avg:AVERAGE:%5.1lf%s Avg,',
+ 'GPRINT:minor_max:MAX:%5.1lf%s Max,',
+ 'GPRINT:minor_avg:LAST:%5.1lf%s Last\l',
+ "LINE1:major_avg#$FullRed:Major",
+ 'GPRINT:major_min:MIN:%5.1lf%s Min,',
+ 'GPRINT:major_avg:AVERAGE:%5.1lf%s Avg,',
+ 'GPRINT:major_max:MAX:%5.1lf%s Max,',
+ 'GPRINT:major_avg:LAST:%5.1lf%s Last\l'
],
swap => [
'DEF:used_avg={file}:used:AVERAGE',
'GPRINT:used_max:MAX:%5.1lf%s Max,',
'GPRINT:used_avg:LAST:%5.1lf%s Last\l'
],
+ temperature => [
+ 'DEF:temp_avg={file}:value:AVERAGE',
+ 'DEF:temp_min={file}:value:MIN',
+ 'DEF:temp_max={file}:value:MAX',
+ "AREA:temp_max#$HalfBlue",
+ "AREA:temp_min#$Canvas",
+ "LINE1:temp_avg#$FullBlue:Value",
+ 'GPRINT:temp_min:MIN:%4.1lf Min,',
+ 'GPRINT:temp_avg:AVERAGE:%4.1lf Avg,',
+ '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:avg:AVERAGE:%5.1lf%sV Avg,',
'GPRINT:max:MAX:%5.1lf%sV Max,',
'GPRINT:avg:LAST:%5.1lf%sV Last\l'
- ]
+ ],
+ vs_threads => [
+ "DEF:total_avg={file}:total:AVERAGE",
+ "DEF:total_min={file}:total:MIN",
+ "DEF:total_max={file}:total:MAX",
+ "DEF:running_avg={file}:running:AVERAGE",
+ "DEF:running_min={file}:running:MIN",
+ "DEF:running_max={file}:running:MAX",
+ "DEF:uninterruptible_avg={file}:uninterruptible:AVERAGE",
+ "DEF:uninterruptible_min={file}:uninterruptible:MIN",
+ "DEF:uninterruptible_max={file}:uninterruptible:MAX",
+ "DEF:onhold_avg={file}:onhold:AVERAGE",
+ "DEF:onhold_min={file}:onhold:MIN",
+ "DEF:onhold_max={file}:onhold:MAX",
+ "LINE1:total_avg#$FullYellow:Total ",
+ 'GPRINT:total_min:MIN:%5.1lf Min,',
+ 'GPRINT:total_avg:AVERAGE:%5.1lf Avg.,',
+ 'GPRINT:total_max:MAX:%5.1lf Max,',
+ 'GPRINT:total_avg:LAST:%5.1lf Last\l',
+ "LINE1:running_avg#$FullRed:Running ",
+ 'GPRINT:running_min:MIN:%5.1lf Min,',
+ 'GPRINT:running_avg:AVERAGE:%5.1lf Avg.,',
+ 'GPRINT:running_max:MAX:%5.1lf Max,',
+ 'GPRINT:running_avg:LAST:%5.1lf Last\l',
+ "LINE1:uninterruptible_avg#$FullGreen:Unintr ",
+ 'GPRINT:uninterruptible_min:MIN:%5.1lf Min,',
+ 'GPRINT:uninterruptible_avg:AVERAGE:%5.1lf Avg.,',
+ 'GPRINT:uninterruptible_max:MAX:%5.1lf Max,',
+ 'GPRINT:uninterruptible_avg:LAST:%5.1lf Last\l',
+ "LINE1:onhold_avg#$FullBlue:Onhold ",
+ 'GPRINT:onhold_min:MIN:%5.1lf Min,',
+ 'GPRINT:onhold_avg:AVERAGE:%5.1lf Avg.,',
+ 'GPRINT:onhold_max:MAX:%5.1lf Max,',
+ 'GPRINT:onhold_avg:LAST:%5.1lf Last\l'
+ ],
+ vs_memory => [
+ 'DEF:vm_avg={file}:vm:AVERAGE',
+ 'DEF:vm_min={file}:vm:MIN',
+ 'DEF:vm_max={file}:vm:MAX',
+ 'DEF:vml_avg={file}:vml:AVERAGE',
+ 'DEF:vml_min={file}:vml:MIN',
+ 'DEF:vml_max={file}:vml:MAX',
+ 'DEF:rss_avg={file}:rss:AVERAGE',
+ 'DEF:rss_min={file}:rss:MIN',
+ 'DEF:rss_max={file}:rss:MAX',
+ 'DEF:anon_avg={file}:anon:AVERAGE',
+ 'DEF:anon_min={file}:anon:MIN',
+ 'DEF:anon_max={file}:anon:MAX',
+ "LINE1:vm_avg#$FullYellow:VM ",
+ 'GPRINT:vm_min:MIN:%5.1lf%s Min,',
+ 'GPRINT:vm_avg:AVERAGE:%5.1lf%s Avg.,',
+ 'GPRINT:vm_max:MAX:%5.1lf%s Avg.,',
+ 'GPRINT:vm_avg:LAST:%5.1lf%s Last\l',
+ "LINE1:vml_avg#$FullRed:Locked ",
+ 'GPRINT:vml_min:MIN:%5.1lf%s Min,',
+ 'GPRINT:vml_avg:AVERAGE:%5.1lf%s Avg.,',
+ 'GPRINT:vml_max:MAX:%5.1lf%s Avg.,',
+ 'GPRINT:vml_avg:LAST:%5.1lf%s Last\l',
+ "LINE1:rss_avg#$FullGreen:RSS ",
+ 'GPRINT:rss_min:MIN:%5.1lf%s Min,',
+ 'GPRINT:rss_avg:AVERAGE:%5.1lf%s Avg.,',
+ 'GPRINT:rss_max:MAX:%5.1lf%s Avg.,',
+ 'GPRINT:rss_avg:LAST:%5.1lf%s Last\l',
+ "LINE1:anon_avg#$FullBlue:Anon. ",
+ 'GPRINT:anon_min:MIN:%5.1lf%s Min,',
+ 'GPRINT:anon_avg:AVERAGE:%5.1lf%s Avg.,',
+ 'GPRINT:anon_max:MAX:%5.1lf%s Avg.,',
+ 'GPRINT:anon_avg:LAST:%5.1lf%s Last\l',
+ ],
+ vs_processes => [
+ 'DEF:proc_avg={file}:total:AVERAGE',
+ 'DEF:proc_min={file}:total:MIN',
+ 'DEF:proc_max={file}:total:MAX',
+ "AREA:proc_max#$HalfBlue",
+ "AREA:proc_min#$Canvas",
+ "LINE1:proc_avg#$FullBlue:Processes",
+ 'GPRINT:proc_min:MIN:%4.1lf Min,',
+ 'GPRINT:proc_avg:AVERAGE:%4.1lf Avg.,',
+ 'GPRINT:proc_max:MAX:%4.1lf Max,',
+ 'GPRINT:proc_avg:LAST:%4.1lf Last\l'
+ ],
};
$GraphDefs->{'disk'} = $GraphDefs->{'partition'};
+ $GraphDefs->{'if_errors'} = $GraphDefs->{'if_packets'};
$GraphDefs->{'meminfo'} = $GraphDefs->{'memory'};
+ $GraphDefs->{'sensors'} = $GraphDefs->{'temperature'};
+
+ $GraphDefs->{'delay'} = $GraphDefs->{'time_offset'};
+ $GraphDefs->{'time_dispersion'} = $GraphDefs->{'time_offset'};
}
our $GraphArgs =
{
+ apache_bytes => ['-t', 'apache traffic', '-v', 'Bit/s'],
+ 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'],
+ if_errors => ['-t', '{host} {inst} errors', '-v', 'Errors/s'],
+ if_packets => ['-t', '{host} {inst} packets', '-v', 'Packets/s'],
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' ],
partition => ['-t', '{host} partition {inst} usage', '-v', 'Byte/s'],
ping => ['-t', '{host} ping to {inst}', '-v', 'ms'],
processes => ['-t', '{host} processes', '-v', 'Processes'],
+ ps_rss => ['-t', '{host} process {inst} RSS', '-v', 'Bytes', '-b', '1024'],
+ ps_cputime => ['-t', '{host} process {inst} CPU usage', '-v', 'Seconds'],
+ ps_count => ['-t', '{host} process {inst} count', '-v', 'Threads/Processes'],
+ ps_pagefaults => ['-t', '{host} process {inst} pagefaults', '-v', 'Pagefaults/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']
+ voltage => ['-t', '{host} voltage', '-v', 'Volts'],
+ vs_threads => ['-t', '{host} threads', '-v', 'Threads'],
+ vs_memory => ['-t', '{host} memory usage', '-v', 'Bytes'],
+ vs_processes => ['-t', '{host} processes', '-v', 'Processes'],
};
our $GraphMulti =
{
+ apache_scoreboard => \&output_graph_apache_scoreboard,
cpu => \&output_graph_cpu,
cpufreq => 1,
disk => 1,
ping => \&output_graph_ping,
sensors => 1,
traffic => 1,
- users => 1
+ users => 1
};
our @Info;
return (@ret);
}
+sub output_graph_apache_scoreboard
+{
+ my @inst = @_;
+ my @ret = ();
+
+ die if (@inst < 2);
+
+ my @colors = get_n_colors (scalar (@inst));
+
+ for (my $i = 0; $i < scalar (@inst); $i++)
+ {
+ my $inst = $inst[$i];
+ push (@ret,
+ "DEF:avg_$i=$AbsDir/apache_scoreboard-$inst.rrd:count:AVERAGE",
+ "DEF:min_$i=$AbsDir/apache_scoreboard-$inst.rrd:count:MIN",
+ "DEF:max_$i=$AbsDir/apache_scoreboard-$inst.rrd:count:MAX");
+ }
+
+ for (my $i = 0; $i < scalar (@inst); $i++)
+ {
+ my $inst = $inst[$i];
+ my $color = $colors[$i];
+
+ if (length ($inst) > 15)
+ {
+ $inst = substr ($inst, 0, 12) . '...';
+ }
+ else
+ {
+ $inst = sprintf ('%-15s', $inst);
+ }
+
+ push (@ret,
+ "LINE1:avg_$i#$color:$inst",
+ "GPRINT:min_$i:MIN:%6.2lf Min,",
+ "GPRINT:avg_$i:AVERAGE:%6.2lf Avg,",
+ "GPRINT:max_$i:MAX:%6.2lf Max,",
+ "GPRINT:avg_$i:LAST:%6.2lf Last\\l");
+ }
+
+ return (@ret);
+}
+
sub output_graph_ping
{
my @inst = @_;
$Inst = $files->{$Type}[0];
}
+ #push (@cmd, '-', '-a', 'PNG', '-s', $TimeSpan, '-w', 800, '-h', 150);
push (@cmd, '-', '-a', 'PNG', '-s', $TimeSpan);
push (@cmd, @{$GraphArgs->{$Type}}) if (defined ($GraphArgs->{$Type}));
print <<HTML;
</ul>
+ <h3>Hourly</h3>
+ <div><img src="$MySelf$RelDir/$Type/hour" /></div>
<h3>Daily</h3>
<div><img src="$MySelf$RelDir/$Type/day" /></div>
<h3>Weekly</h3>
}
print <<HTML;
+ <h3>Hourly</h3>
+ <div><img src="$MySelf$RelDir/$ext/hour" /></div>
<h3>Daily</h3>
<div><img src="$MySelf$RelDir/$ext/day" /></div>
<h3>Weekly</h3>
$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/^\./);