6 use Carp (qw(cluck confess));
8 use CGI::Carp ('fatalsToBrowser');
9 use HTML::Entities ('encode_entities');
10 use URI::Escape ('uri_escape');
14 our $Config = "/etc/collection.conf";
16 our @DontShowTypes = ();
28 our @RRDDefaultArgs = ('-w', '400');
33 our $MetaGraphDefs = {};
34 load_graph_definitions ();
36 for (qw(action host plugin plugin_instance type type_instance timespan))
38 $Args->{$_} = param ($_);
46 open ($fh, "< $Config") or confess ("open ($Config): $!");
47 while (my $line = <$fh>)
51 next if ($line =~ m/^\s*#/);
52 next if ($line =~ m/^\s*$/);
57 if ($line =~ m/^([A-Za-z]+):\s*"((?:[^"\\]+|\\.)*)"$/)
59 $key = lc ($1); $value = $2;
60 $value =~ s/\\(.)/$1/g;
62 elsif ($line =~ m/([A-Za-z]+):\s*([0-9]+)$/)
64 $key = lc ($1); $value = 0 + $2;
68 print STDERR "Cannot parse line: $line\n";
72 if ($key eq 'datadir')
75 push (@DataDirs, $value);
77 elsif ($key eq 'libdir')
82 elsif ($key eq 'dontshowtype')
84 push (@DontShowTypes, $value);
88 print STDERR "Unknown key: $key\n";
96 if ($Args->{'action'} && ($Args->{'action'} =~ m/^(overview|show_host|show_plugin|show_type|show_graph)$/))
98 $Args->{'action'} = $1;
102 $Args->{'action'} = 'overview';
105 if ($Args->{'host'} && ($Args->{'host'} =~ m#/#))
107 delete ($Args->{'host'});
110 if ($Args->{'plugin'} && ($Args->{'plugin'} =~ m#/#))
112 delete ($Args->{'plugin'});
115 if ($Args->{'type'} && ($Args->{'type'} =~ m#/#))
117 delete ($Args->{'type'});
120 if (!$Args->{'plugin'} || ($Args->{'plugin_instance'}
121 && ($Args->{'plugin_instance'} =~ m#/#)))
123 delete ($Args->{'plugin_instance'});
126 if (!$Args->{'type'} || ($Args->{'type_instance'}
127 && ($Args->{'type_instance'} =~ m#/#)))
129 delete ($Args->{'type_instance'});
132 if (defined ($Args->{'timespan'})
133 && ($Args->{'timespan'} =~ m/^(hour|day|week|month|year)$/))
135 $Args->{'timespan'} = $1;
139 $Args->{'timespan'} = 'day';
147 if (defined ($hosts))
149 return (keys %$hosts);
154 for (my $i = 0; $i < @DataDirs; $i++)
159 opendir ($dh, $DataDirs[$i]) or next;
160 @tmp = grep { ($_ !~ m/^\./) && (-d $DataDirs[$i] . '/' . $_) } (readdir ($dh));
163 $hosts->{$_} = 1 for (@tmp);
166 return (keys %$hosts);
172 my %all_hosts = map { $_ => 1 } (_find_hosts ());
173 my @selected_hosts = ();
176 if (defined ($all_hosts{$_}))
178 push (@selected_hosts, "$_");
181 return (@selected_hosts);
184 sub _get_param_timespan
186 my $timespan = param ('timespan');
189 $timespan = lc ($timespan);
191 if (!defined ($ValidTimespan->{$timespan}))
197 } # _get_param_timespan
204 for (my $i = 0; $i < @DataDirs; $i++)
206 my $dir = $DataDirs[$i] . "/$host";
210 opendir ($dh, $dir) or next;
211 @tmp = grep { ($_ !~ m/^\./) && (-d "$dir/$_") } (readdir ($dh));
216 my ($plugin, $instance) = split (m/-/, $_, 2);
217 $plugins{$plugin} = [] if (!exists $plugins{$plugin});
218 push (@{$plugins{$plugin}}, $instance);
229 my $plugin_instance = shift;
232 for (my $i = 0; $i < @DataDirs; $i++)
234 my $dir = $DataDirs[$i] . "/$host/$plugin" . (defined ($plugin_instance) ? "-$plugin_instance" : '');
238 opendir ($dh, $dir) or next;
239 @tmp = grep { ($_ !~ m/^\./) && ($_ =~ m/\.rrd$/i) && (-f "$dir/$_") } (readdir ($dh));
245 $name =~ s/\.rrd$//i;
246 my ($type, $instance) = split (m/-/, $name, 2);
247 if (grep { $_ eq $type } @DontShowTypes) { next; }
248 $types{$type} = [] if (!$types{$type});
249 push (@{$types{$type}}, $instance) if (defined ($instance));
256 sub _find_files_for_host
261 my %plugins = _find_plugins ($host);
265 my $plugin_instances = $plugins{$plugin};
267 if (!$plugin_instances || !@$plugin_instances)
269 $plugin_instances = ['-'];
272 $ret->{$plugin} = {};
274 for (@$plugin_instances)
276 my $plugin_instance = defined ($_) ? $_ : '-';
277 my %types = _find_types ($host, $plugin,
278 ($plugin_instance ne '-')
282 $ret->{$plugin}{$plugin_instance} = {};
287 my $type_instances = $types{$type};
289 $ret->{$plugin}{$plugin_instance}{$type} = {};
291 for (@$type_instances)
293 $ret->{$plugin}{$plugin_instance}{$type}{$_} = 1;
296 if (!@$type_instances)
298 $ret->{$plugin}{$plugin_instance}{$type}{'-'} = 1;
300 } # for (keys %types)
301 } # for (@$plugin_instances)
302 } # for (keys %plugins)
305 } # _find_files_for_host
307 sub _find_files_for_hosts
310 my $all_plugins = {};
312 for (my $i = 0; $i < @hosts; $i++)
314 my $tmp = _find_files_for_host ($hosts[$i]);
315 _files_union ($all_plugins, $tmp);
318 return ($all_plugins);
319 } # _find_files_for_hosts
329 $dest->{$plugin} ||= {};
331 for (keys %{$src->{$plugin}})
334 $dest->{$plugin}{$pinst} ||= {};
336 for (keys %{$src->{$plugin}{$pinst}})
339 $dest->{$plugin}{$pinst}{$type} ||= {};
341 for (keys %{$src->{$plugin}{$pinst}{$type}})
344 $dest->{$plugin}{$pinst}{$type}{$tinst} = 1;
351 sub _files_plugin_inst_count
358 if (exists ($MetaGraphDefs->{$_}))
364 $i = $i + keys %{$src->{$_}};
368 } # _files_plugin_count
372 my @hosts = _find_hosts ();
373 @hosts = sort (@hosts);
376 for (my $i = 0; $i < @hosts; $i++)
378 my $host_html = encode_entities ($hosts[$i]);
379 my $host_url = uri_escape ($hosts[$i]);
381 print qq( <li><a href="${\script_name ()}?action=show_host;host=$host_url">$host_html</a></li>\n);
389 if ($color =~ m/([0-9A-Fa-f][0-9A-Fa-f])([0-9A-Fa-f][0-9A-Fa-f])([0-9A-Fa-f][0-9A-Fa-f])/)
391 return ([hex ($1) / 255.0, hex ($2) / 255.0, hex ($3) / 255.0]);
398 confess ("Wrong number of arguments") if (@_ != 1);
399 return (sprintf ('%02hx%02hx%02hx', map { int (255.0 * $_) } @{$_[0]}));
402 sub _get_random_color
404 my ($r, $g, $b) = (rand (), rand ());
410 $min = 1.0 - ($r + $g);
414 $max = 2.0 - ($r + $g);
417 $b = $min + (rand () * ($max - $min));
419 return ([$r, $g, $b]);
420 } # _get_random_color
424 my $instances = shift;
425 my $num = scalar @$instances;
428 for (my $i = 0; $i < $num; $i++)
430 my $pos = 6 * $i / $num;
473 $color = sprintf ("%02x%02x%02x", $red, $green, $blue);
474 $ret->{$instances->[$i]} = $color;
485 my $ret = [undef, undef, undef];
487 $opts{'background'} ||= [1.0, 1.0, 1.0];
488 $opts{'alpha'} ||= 0.25;
490 if (!ref ($opts{'background'}))
492 $opts{'background'} = _string_to_color ($opts{'background'})
493 or confess ("Cannot parse background color " . $opts{'background'});
495 $bg = $opts{'background'};
497 for (my $i = 0; $i < 3; $i++)
499 $ret->[$i] = ($opts{'alpha'} * $fg->[$i])
500 + ((1.0 - $opts{'alpha'}) * $bg->[$i]);
506 sub _custom_sort_arrayref
508 my $array_ref = shift;
509 my $array_sort = shift;
511 my %elements = map { $_ => 1 } (@$array_ref);
512 splice (@$array_ref, 0);
516 next if (!exists ($elements{$_}));
517 push (@$array_ref, $_);
518 delete ($elements{$_});
520 push (@$array_ref, sort (keys %elements));
521 } # _custom_sort_arrayref
525 my @hosts = _get_param_host ();
526 @hosts = sort (@hosts);
528 my $timespan = _get_param_timespan ();
529 my $all_plugins = _find_files_for_hosts (@hosts);
531 my $url_prefix = script_name () . '?action=show_plugin'
532 . join ('', map { ';host=' . uri_escape ($_) } (@hosts))
533 . ';timespan=' . uri_escape ($timespan);
535 print qq( <div><a href="${\script_name ()}?action=overview">Back to list of hosts</a></div>\n);
537 print " <p>Available plugins:</p>\n"
539 for (sort (keys %$all_plugins))
542 my $plugin_html = encode_entities ($plugin);
543 my $url_plugin = $url_prefix . ';plugin=' . uri_escape ($plugin);
544 print qq( <li><a href="$url_plugin">$plugin_html</a></li>\n);
549 sub action_show_plugin
551 my @hosts = _get_param_host ();
553 my $plugin_instance = shift;
554 my $timespan = _get_param_timespan ();
556 my $hosts_url = join (';', map { 'host=' . uri_escape ($_) } (@hosts));
557 my $url_prefix = script_name () . "?$hosts_url";
559 my $all_plugins = {};
560 my $plugins_per_host = {};
561 my $selected_plugins = {};
563 for (my $i = 0; $i < @hosts; $i++)
565 $plugins_per_host->{$hosts[$i]} = _find_files_for_host ($hosts[$i]);
566 _files_union ($all_plugins, $plugins_per_host->{$hosts[$i]});
569 for (param ('plugin'))
571 if (defined ($all_plugins->{$_}))
573 $selected_plugins->{$_} = 1;
577 print qq( <div><a href="${\script_name ()}?action=show_host;$hosts_url">Back to list of plugins</a></div>\n);
581 <table class="graphs">
587 print "\t<th>", encode_entities ($_), "</th>\n";
591 for (sort (keys %$selected_plugins))
594 my $plugin_html = encode_entities ($plugin);
595 my $plugin_url = "$url_prefix;plugin=" . uri_escape ($plugin);
596 my $all_pinst = $all_plugins->{$plugin};
598 for (sort (keys %$all_pinst))
602 my $pinst_url = $plugin_url;
606 $pinst_html = encode_entities ($pinst);
607 $pinst_url .= ';plugin_instance=' . uri_escape ($pinst);
610 my $files_printed = 0;
611 my $files_num = _files_plugin_inst_count ($all_pinst->{$pinst});
616 my $rowspan = ($files_num == 1) ? '' : qq( rowspan="$files_num");
618 for (sort (keys %{$all_plugins->{$plugin}{$pinst}}))
621 my $type_html = encode_entities ($type);
622 my $type_url = "$pinst_url;type=" . uri_escape ($type);
624 if ($files_printed == 0)
626 my $title = $plugin_html;
629 $title .= " ($pinst_html)";
632 print "\t<td$rowspan>$title</td>\n";
635 if (exists ($MetaGraphDefs->{$type}))
637 my $graph_url = script_name () . '?action=show_graph'
638 . ';plugin=' . uri_escape ($plugin)
639 . ';type=' . uri_escape ($type)
640 . ';timespan=' . uri_escape ($timespan);
643 $graph_url .= ';plugin_instance=' . uri_escape ($pinst);
646 if ($files_printed != 0)
654 my $host_graph_url = $graph_url . ';host=' . uri_escape ($host);
657 if (exists $plugins_per_host->{$host}{$plugin}{$pinst}{$type})
659 print qq(<img src="$host_graph_url" />);
660 #print encode_entities (qq(<img src="${\script_name ()}?action=show_graph;host=$host_esc;$param_plugin;$param_type;timespan=$timespan" />));
663 } # for (my $k = 0; $k < @hosts; $k++)
669 } # if (exists ($MetaGraphDefs->{$type}))
671 for (sort (keys %{$all_plugins->{$plugin}{$pinst}{$type}}))
674 my $tinst_esc = encode_entities ($tinst);
675 my $graph_url = script_name () . '?action=show_graph'
676 . ';plugin=' . uri_escape ($plugin)
677 . ';type=' . uri_escape ($type)
678 . ';timespan=' . uri_escape ($timespan);
681 $graph_url .= ';plugin_instance=' . uri_escape ($pinst);
685 $graph_url .= ';type_instance=' . uri_escape ($tinst);
688 if ($files_printed != 0)
693 for (my $k = 0; $k < @hosts; $k++)
695 my $host = $hosts[$k];
696 my $host_graph_url = $graph_url . ';host=' . uri_escape ($host);
699 if ($plugins_per_host->{$host}{$plugin}{$pinst}{$type}{$tinst})
701 print qq(<img src="$host_graph_url" />);
702 #print encode_entities (qq(<img src="${\script_name ()}?action=show_graph;host=$host_esc;$param_plugin;$param_type;timespan=$timespan" />));
705 } # for (my $k = 0; $k < @hosts; $k++)
715 } # action_show_plugin
721 my $plugin_instance = shift;
723 my $type_instance = shift;
725 my $host_url = uri_escape ($host);
726 my $plugin_url = uri_escape ($plugin);
727 my $plugin_html = encode_entities ($plugin);
728 my $plugin_instance_url = defined ($plugin_instance) ? uri_escape ($plugin_instance) : undef;
729 my $type_url = uri_escape ($type);
730 my $type_instance_url = defined ($type_instance) ? uri_escape ($type_instance) : undef;
732 my $url_prefix = script_name () . "?action=show_plugin;host=$host_url;plugin=$plugin_url";
733 $url_prefix .= ";plugin_instance=$plugin_instance_url" if (defined ($plugin_instance));
735 print qq( <div><a href="$url_prefix">Back to plugin "$plugin_html"</a></div>\n);
737 $url_prefix = script_name () . "?action=show_graph;host=$host_url;plugin=$plugin_url";
738 $url_prefix .= ";plugin_instance=$plugin_instance_url" if (defined ($plugin_instance));
739 $url_prefix .= ";type=$type_url";
740 $url_prefix .= ";type_instance=$type_instance_url" if (defined ($type_instance));
742 for (qw(hour day week month year))
746 print qq# <div><img src="$url_prefix;timespan=$timespan" /></div>\n#;
750 sub action_show_graph
754 my $plugin_instance = shift;
756 my $type_instance = shift;
760 my %times = (hour => -3600, day => -86400, week => 7 * -86400, month => 31 * -86400, year => 366 * -86400);
761 my $start_time = $times{$Args->{'timespan'}} || -86400;
763 #print STDERR Data::Dumper->Dump ([$Args], ['Args']);
766 if (exists ($MetaGraphDefs->{$type}))
768 my %types = _find_types ($host, $plugin, $plugin_instance);
769 return $MetaGraphDefs->{$type}->($host, $plugin, $plugin_instance, $type, $types{$type});
772 return if (!defined ($GraphDefs->{$type}));
773 @rrd_args = @{$GraphDefs->{$type}};
775 $title = "$host/$plugin" . (defined ($plugin_instance) ? "-$plugin_instance" : '')
776 . "/$type" . (defined ($type_instance) ? "-$type_instance" : '');
778 for (my $i = 0; $i < @DataDirs; $i++)
780 my $file = $DataDirs[$i] . "/$title.rrd";
784 s/{file}/$file/ for (@rrd_args);
786 RRDs::graph ('-', '-a', 'PNG', '-s', $start_time, '-t', $title, @RRDDefaultArgs, @rrd_args);
787 if (my $err = RRDs::error ())
789 die ("RRDs::graph: $err");
792 } # action_show_graph
796 my @hosts = _find_hosts ();
797 @hosts = sort (@hosts);
799 my %selected_hosts = map { $_ => 1 } (_get_param_host ());
800 my $timespan_selected = _get_param_timespan ();
803 <form action="${\script_name ()}" method="get">
805 <legend>Selector</legend>
806 <select name="host" multiple="multiple" size="10">
808 for (my $i = 0; $i < @hosts; $i++)
810 my $host = encode_entities ($hosts[$i]);
811 my $selected = defined ($selected_hosts{$hosts[$i]}) ? ' selected="selected"' : '';
812 print qq(\t <option value="$host"$selected>$host</option>\n);
814 print "\t</select>\n";
816 if (keys %selected_hosts)
818 my $all_plugins = _find_files_for_hosts (keys %selected_hosts);
819 my %selected_plugins = map { $_ => 1 } (param ('plugin'));
821 print qq(\t<select name="plugin" multiple="multiple" size="10">\n);
822 for (sort (keys %$all_plugins))
825 my $plugin_html = encode_entities ($plugin);
826 my $selected = (defined ($selected_plugins{$plugin})
827 ? ' selected="selected"' : '');
828 print qq(\t <option value="$plugin_html"$selected>$plugin</option>\n);
831 } # if (keys %selected_hosts)
833 print qq(\t<select name="timespan">\n);
834 for (qw(Hour Day Week Month Year))
836 my $timespan_uc = $_;
837 my $timespan_lc = lc ($_);
838 my $selected = ($timespan_selected eq $timespan_lc)
839 ? ' selected="selected"' : '';
840 print qq(\t <option value="$timespan_lc"$selected>$timespan_uc</option>\n);
844 <input type="submit" name="button" value="Ok" />
853 Content-Type: application/xhtml+xml; charset=utf-8
854 Cache-Control: no-cache
856 <?xml version="1.0" encoding="utf-8"?>
857 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
858 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
860 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
862 <title>collection.cgi, Version 2</title>
863 <style type="text/css">
870 border-collapse: collapse;
875 border: 1px solid black;
899 if (defined ($Args->{'host'})
900 && defined ($Args->{'plugin'})
901 && defined ($Args->{'type'})
902 && ($Args->{'action'} eq 'show_graph'))
905 print STDOUT header (-Content_Type => 'image/png');
906 action_show_graph ($Args->{'host'},
907 $Args->{'plugin'}, $Args->{'plugin_instance'},
908 $Args->{'type'}, $Args->{'type_instance'});
914 if (!$Args->{'host'})
918 elsif (!$Args->{'plugin'})
920 action_show_host ($Args->{'host'});
922 elsif (!$Args->{'type'})
924 action_show_plugin ($Args->{'plugin'}, $Args->{'plugin_instance'});
928 action_show_type ($Args->{'host'},
929 $Args->{'plugin'}, $Args->{'plugin_instance'},
930 $Args->{'type'}, $Args->{'type_instance'});
938 sub load_graph_definitions
940 my $Canvas = 'FFFFFF';
942 my $FullRed = 'FF0000';
943 my $FullGreen = '00E000';
944 my $FullBlue = '0000FF';
945 my $FullYellow = 'F0A000';
946 my $FullCyan = '00A0FF';
947 my $FullMagenta= 'A000FF';
949 my $HalfRed = 'F7B7B7';
950 my $HalfGreen = 'B7EFB7';
951 my $HalfBlue = 'B7B7F7';
952 my $HalfYellow = 'F3DFB7';
953 my $HalfCyan = 'B7DFF7';
954 my $HalfMagenta= 'DFB7F7';
956 my $HalfBlueGreen = '89B3C9';
960 apache_bytes => ['DEF:min_raw={file}:count:MIN',
961 'DEF:avg_raw={file}:count:AVERAGE',
962 'DEF:max_raw={file}:count:MAX',
963 'CDEF:min=min_raw,8,*',
964 'CDEF:avg=avg_raw,8,*',
965 'CDEF:max=max_raw,8,*',
966 'CDEF:mytime=avg_raw,TIME,TIME,IF',
967 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
968 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
969 'CDEF:avg_sample=avg_raw,UN,0,avg_raw,IF,sample_len,*',
970 'CDEF:avg_sum=PREV,UN,0,PREV,IF,avg_sample,+',
971 "AREA:avg#$HalfBlue",
972 "LINE1:avg#$FullBlue:Bit/s",
973 'GPRINT:min:MIN:%5.1lf%s Min,',
974 'GPRINT:avg:AVERAGE:%5.1lf%s Avg,',
975 'GPRINT:max:MAX:%5.1lf%s Max,',
976 'GPRINT:avg:LAST:%5.1lf%s Last',
977 'GPRINT:avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
979 apache_requests => ['DEF:min={file}:count:MIN',
980 'DEF:avg={file}:count:AVERAGE',
981 'DEF:max={file}:count:MAX',
982 "AREA:max#$HalfBlue",
984 "LINE1:avg#$FullBlue:Requests/s",
985 'GPRINT:min:MIN:%6.2lf Min,',
986 'GPRINT:avg:AVERAGE:%6.2lf Avg,',
987 'GPRINT:max:MAX:%6.2lf Max,',
988 'GPRINT:avg:LAST:%6.2lf Last'
990 apache_scoreboard => ['DEF:min={file}:count:MIN',
991 'DEF:avg={file}:count:AVERAGE',
992 'DEF:max={file}:count:MAX',
993 "AREA:max#$HalfBlue",
995 "LINE1:avg#$FullBlue:Processes",
996 'GPRINT:min:MIN:%6.2lf Min,',
997 'GPRINT:avg:AVERAGE:%6.2lf Avg,',
998 'GPRINT:max:MAX:%6.2lf Max,',
999 'GPRINT:avg:LAST:%6.2lf Last'
1001 bitrate => ['-v', 'Bits/s',
1002 'DEF:avg={file}:value:AVERAGE',
1003 'DEF:min={file}:value:MIN',
1004 'DEF:max={file}:value:MAX',
1005 "AREA:max#$HalfBlue",
1007 "LINE1:avg#$FullBlue:Bits/s",
1008 'GPRINT:min:MIN:%5.1lf%s Min,',
1009 'GPRINT:avg:AVERAGE:%5.1lf%s Average,',
1010 'GPRINT:max:MAX:%5.1lf%s Max,',
1011 'GPRINT:avg:LAST:%5.1lf%s Last\l'
1013 charge => ['-v', 'Ah',
1014 'DEF:avg={file}:value:AVERAGE',
1015 'DEF:min={file}:value:MIN',
1016 'DEF:max={file}:value:MAX',
1017 "AREA:max#$HalfBlue",
1019 "LINE1:avg#$FullBlue:Charge",
1020 'GPRINT:min:MIN:%5.1lf%sAh Min,',
1021 'GPRINT:avg:AVERAGE:%5.1lf%sAh Avg,',
1022 'GPRINT:max:MAX:%5.1lf%sAh Max,',
1023 'GPRINT:avg:LAST:%5.1lf%sAh Last\l'
1025 connections => ['-v', 'Connections',
1026 'DEF:avg={file}:value:AVERAGE',
1027 'DEF:min={file}:value:MIN',
1028 'DEF:max={file}:value:MAX',
1029 "AREA:max#$HalfBlue",
1031 "LINE1:avg#$FullBlue:Connections",
1032 'GPRINT:min:MIN:%4.1lf Min,',
1033 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1034 'GPRINT:max:MAX:%4.1lf Max,',
1035 'GPRINT:avg:LAST:%4.1lf Last\l'
1037 cpu => ['-v', 'CPU load',
1038 'DEF:avg={file}:value:AVERAGE',
1039 'DEF:min={file}:value:MIN',
1040 'DEF:max={file}:value:MAX',
1041 "AREA:max#$HalfBlue",
1043 "LINE1:avg#$FullBlue:Percent",
1044 'GPRINT:min:MIN:%6.2lf%% Min,',
1045 'GPRINT:avg:AVERAGE:%6.2lf%% Avg,',
1046 'GPRINT:max:MAX:%6.2lf%% Max,',
1047 'GPRINT:avg:LAST:%6.2lf%% Last\l'
1049 current => ['-v', 'Ampere',
1050 'DEF:avg={file}:value:AVERAGE',
1051 'DEF:min={file}:value:MIN',
1052 'DEF:max={file}:value:MAX',
1053 "AREA:max#$HalfBlue",
1055 "LINE1:avg#$FullBlue:Current",
1056 'GPRINT:min:MIN:%5.1lf%sA Min,',
1057 'GPRINT:avg:AVERAGE:%5.1lf%sA Avg,',
1058 'GPRINT:max:MAX:%5.1lf%sA Max,',
1059 'GPRINT:avg:LAST:%5.1lf%sA Last\l'
1061 df => ['-v', 'Percent', '-l', '0',
1062 'DEF:free_avg={file}:free:AVERAGE',
1063 'DEF:free_min={file}:free:MIN',
1064 'DEF:free_max={file}:free:MAX',
1065 'DEF:used_avg={file}:used:AVERAGE',
1066 'DEF:used_min={file}:used:MIN',
1067 'DEF:used_max={file}:used:MAX',
1068 'CDEF:total=free_avg,used_avg,+',
1069 'CDEF:free_pct=100,free_avg,*,total,/',
1070 'CDEF:used_pct=100,used_avg,*,total,/',
1071 'CDEF:free_acc=free_pct,used_pct,+',
1072 'CDEF:used_acc=used_pct',
1073 "AREA:free_acc#$HalfGreen",
1074 "AREA:used_acc#$HalfRed",
1075 "LINE1:free_acc#$FullGreen:Free",
1076 'GPRINT:free_min:MIN:%5.1lf%sB Min,',
1077 'GPRINT:free_avg:AVERAGE:%5.1lf%sB Avg,',
1078 'GPRINT:free_max:MAX:%5.1lf%sB Max,',
1079 'GPRINT:free_avg:LAST:%5.1lf%sB Last\l',
1080 "LINE1:used_acc#$FullRed:Used",
1081 'GPRINT:used_min:MIN:%5.1lf%sB Min,',
1082 'GPRINT:used_avg:AVERAGE:%5.1lf%sB Avg,',
1083 'GPRINT:used_max:MAX:%5.1lf%sB Max,',
1084 'GPRINT:used_avg:LAST:%5.1lf%sB Last\l'
1087 'DEF:rtime_avg={file}:rtime:AVERAGE',
1088 'DEF:rtime_min={file}:rtime:MIN',
1089 'DEF:rtime_max={file}:rtime:MAX',
1090 'DEF:wtime_avg={file}:wtime:AVERAGE',
1091 'DEF:wtime_min={file}:wtime:MIN',
1092 'DEF:wtime_max={file}:wtime:MAX',
1093 'CDEF:rtime_avg_ms=rtime_avg,1000,/',
1094 'CDEF:rtime_min_ms=rtime_min,1000,/',
1095 'CDEF:rtime_max_ms=rtime_max,1000,/',
1096 'CDEF:wtime_avg_ms=wtime_avg,1000,/',
1097 'CDEF:wtime_min_ms=wtime_min,1000,/',
1098 'CDEF:wtime_max_ms=wtime_max,1000,/',
1099 'CDEF:total_avg_ms=rtime_avg_ms,wtime_avg_ms,+',
1100 'CDEF:total_min_ms=rtime_min_ms,wtime_min_ms,+',
1101 'CDEF:total_max_ms=rtime_max_ms,wtime_max_ms,+',
1102 "AREA:total_max_ms#$HalfRed",
1103 "AREA:total_min_ms#$Canvas",
1104 "LINE1:wtime_avg_ms#$FullGreen:Write",
1105 'GPRINT:wtime_min_ms:MIN:%5.1lf%s Min,',
1106 'GPRINT:wtime_avg_ms:AVERAGE:%5.1lf%s Avg,',
1107 'GPRINT:wtime_max_ms:MAX:%5.1lf%s Max,',
1108 'GPRINT:wtime_avg_ms:LAST:%5.1lf%s Last\n',
1109 "LINE1:rtime_avg_ms#$FullBlue:Read ",
1110 'GPRINT:rtime_min_ms:MIN:%5.1lf%s Min,',
1111 'GPRINT:rtime_avg_ms:AVERAGE:%5.1lf%s Avg,',
1112 'GPRINT:rtime_max_ms:MAX:%5.1lf%s Max,',
1113 'GPRINT:rtime_avg_ms:LAST:%5.1lf%s Last\n',
1114 "LINE1:total_avg_ms#$FullRed:Total",
1115 'GPRINT:total_min_ms:MIN:%5.1lf%s Min,',
1116 'GPRINT:total_avg_ms:AVERAGE:%5.1lf%s Avg,',
1117 'GPRINT:total_max_ms:MAX:%5.1lf%s Max,',
1118 'GPRINT:total_avg_ms:LAST:%5.1lf%s Last'
1120 disk_octets => ['-v', 'Bytes/s',
1121 'DEF:out_min={file}:write:MIN',
1122 'DEF:out_avg={file}:write:AVERAGE',
1123 'DEF:out_max={file}:write:MAX',
1124 'DEF:inc_min={file}:read:MIN',
1125 'DEF:inc_avg={file}:read:AVERAGE',
1126 'DEF:inc_max={file}:read:MAX',
1127 'CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF',
1128 'CDEF:mytime=out_avg,TIME,TIME,IF',
1129 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1130 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1131 'CDEF:out_avg_sample=out_avg,UN,0,out_avg,IF,sample_len,*',
1132 'CDEF:out_avg_sum=PREV,UN,0,PREV,IF,out_avg_sample,+',
1133 'CDEF:inc_avg_sample=inc_avg,UN,0,inc_avg,IF,sample_len,*',
1134 'CDEF:inc_avg_sum=PREV,UN,0,PREV,IF,inc_avg_sample,+',
1135 "AREA:out_avg#$HalfGreen",
1136 "AREA:inc_avg#$HalfBlue",
1137 "AREA:overlap#$HalfBlueGreen",
1138 "LINE1:out_avg#$FullGreen:Written",
1139 'GPRINT:out_avg:AVERAGE:%5.1lf%s Avg,',
1140 'GPRINT:out_max:MAX:%5.1lf%s Max,',
1141 'GPRINT:out_avg:LAST:%5.1lf%s Last',
1142 'GPRINT:out_avg_sum:LAST:(ca. %5.1lf%sB Total)\l',
1143 "LINE1:inc_avg#$FullBlue:Read ",
1144 'GPRINT:inc_avg:AVERAGE:%5.1lf%s Avg,',
1145 'GPRINT:inc_max:MAX:%5.1lf%s Max,',
1146 'GPRINT:inc_avg:LAST:%5.1lf%s Last',
1147 'GPRINT:inc_avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
1149 disk_merged => ['-v', 'Merged Ops/s',
1150 'DEF:out_min={file}:write:MIN',
1151 'DEF:out_avg={file}:write:AVERAGE',
1152 'DEF:out_max={file}:write:MAX',
1153 'DEF:inc_min={file}:read:MIN',
1154 'DEF:inc_avg={file}:read:AVERAGE',
1155 'DEF:inc_max={file}:read:MAX',
1156 'CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF',
1157 "AREA:out_avg#$HalfGreen",
1158 "AREA:inc_avg#$HalfBlue",
1159 "AREA:overlap#$HalfBlueGreen",
1160 "LINE1:out_avg#$FullGreen:Written",
1161 'GPRINT:out_avg:AVERAGE:%6.2lf Avg,',
1162 'GPRINT:out_max:MAX:%6.2lf Max,',
1163 'GPRINT:out_avg:LAST:%6.2lf Last\l',
1164 "LINE1:inc_avg#$FullBlue:Read ",
1165 'GPRINT:inc_avg:AVERAGE:%6.2lf Avg,',
1166 'GPRINT:inc_max:MAX:%6.2lf Max,',
1167 'GPRINT:inc_avg:LAST:%6.2lf Last\l'
1169 disk_ops => ['-v', 'Ops/s',
1170 'DEF:out_min={file}:write:MIN',
1171 'DEF:out_avg={file}:write:AVERAGE',
1172 'DEF:out_max={file}:write:MAX',
1173 'DEF:inc_min={file}:read:MIN',
1174 'DEF:inc_avg={file}:read:AVERAGE',
1175 'DEF:inc_max={file}:read:MAX',
1176 'CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF',
1177 "AREA:out_avg#$HalfGreen",
1178 "AREA:inc_avg#$HalfBlue",
1179 "AREA:overlap#$HalfBlueGreen",
1180 "LINE1:out_avg#$FullGreen:Written",
1181 'GPRINT:out_avg:AVERAGE:%6.2lf Avg,',
1182 'GPRINT:out_max:MAX:%6.2lf Max,',
1183 'GPRINT:out_avg:LAST:%6.2lf Last\l',
1184 "LINE1:inc_avg#$FullBlue:Read ",
1185 'GPRINT:inc_avg:AVERAGE:%6.2lf Avg,',
1186 'GPRINT:inc_max:MAX:%6.2lf Max,',
1187 'GPRINT:inc_avg:LAST:%6.2lf Last\l'
1189 disk_time => ['-v', 'Seconds/s',
1190 'DEF:out_min_raw={file}:write:MIN',
1191 'DEF:out_avg_raw={file}:write:AVERAGE',
1192 'DEF:out_max_raw={file}:write:MAX',
1193 'DEF:inc_min_raw={file}:read:MIN',
1194 'DEF:inc_avg_raw={file}:read:AVERAGE',
1195 'DEF:inc_max_raw={file}:read:MAX',
1196 'CDEF:out_min=out_min_raw,1000,/',
1197 'CDEF:out_avg=out_avg_raw,1000,/',
1198 'CDEF:out_max=out_max_raw,1000,/',
1199 'CDEF:inc_min=inc_min_raw,1000,/',
1200 'CDEF:inc_avg=inc_avg_raw,1000,/',
1201 'CDEF:inc_max=inc_max_raw,1000,/',
1202 'CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF',
1203 "AREA:out_avg#$HalfGreen",
1204 "AREA:inc_avg#$HalfBlue",
1205 "AREA:overlap#$HalfBlueGreen",
1206 "LINE1:out_avg#$FullGreen:Written",
1207 'GPRINT:out_avg:AVERAGE:%5.1lf%ss Avg,',
1208 'GPRINT:out_max:MAX:%5.1lf%ss Max,',
1209 'GPRINT:out_avg:LAST:%5.1lf%ss Last\l',
1210 "LINE1:inc_avg#$FullBlue:Read ",
1211 'GPRINT:inc_avg:AVERAGE:%5.1lf%ss Avg,',
1212 'GPRINT:inc_max:MAX:%5.1lf%ss Max,',
1213 'GPRINT:inc_avg:LAST:%5.1lf%ss Last\l'
1215 dns_octets => ['DEF:rsp_min_raw={file}:responses:MIN',
1216 'DEF:rsp_avg_raw={file}:responses:AVERAGE',
1217 'DEF:rsp_max_raw={file}:responses:MAX',
1218 'DEF:qry_min_raw={file}:queries:MIN',
1219 'DEF:qry_avg_raw={file}:queries:AVERAGE',
1220 'DEF:qry_max_raw={file}:queries:MAX',
1221 'CDEF:rsp_min=rsp_min_raw,8,*',
1222 'CDEF:rsp_avg=rsp_avg_raw,8,*',
1223 'CDEF:rsp_max=rsp_max_raw,8,*',
1224 'CDEF:qry_min=qry_min_raw,8,*',
1225 'CDEF:qry_avg=qry_avg_raw,8,*',
1226 'CDEF:qry_max=qry_max_raw,8,*',
1227 'CDEF:overlap=rsp_avg,qry_avg,GT,qry_avg,rsp_avg,IF',
1228 'CDEF:mytime=rsp_avg_raw,TIME,TIME,IF',
1229 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1230 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1231 'CDEF:rsp_avg_sample=rsp_avg_raw,UN,0,rsp_avg_raw,IF,sample_len,*',
1232 'CDEF:rsp_avg_sum=PREV,UN,0,PREV,IF,rsp_avg_sample,+',
1233 'CDEF:qry_avg_sample=qry_avg_raw,UN,0,qry_avg_raw,IF,sample_len,*',
1234 'CDEF:qry_avg_sum=PREV,UN,0,PREV,IF,qry_avg_sample,+',
1235 "AREA:rsp_avg#$HalfGreen",
1236 "AREA:qry_avg#$HalfBlue",
1237 "AREA:overlap#$HalfBlueGreen",
1238 "LINE1:rsp_avg#$FullGreen:Responses",
1239 'GPRINT:rsp_avg:AVERAGE:%5.1lf%s Avg,',
1240 'GPRINT:rsp_max:MAX:%5.1lf%s Max,',
1241 'GPRINT:rsp_avg:LAST:%5.1lf%s Last',
1242 'GPRINT:rsp_avg_sum:LAST:(ca. %5.1lf%sB Total)\l',
1243 "LINE1:qry_avg#$FullBlue:Queries ",
1244 #'GPRINT:qry_min:MIN:%5.1lf %s Min,',
1245 'GPRINT:qry_avg:AVERAGE:%5.1lf%s Avg,',
1246 'GPRINT:qry_max:MAX:%5.1lf%s Max,',
1247 'GPRINT:qry_avg:LAST:%5.1lf%s Last',
1248 'GPRINT:qry_avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
1251 'DEF:avg={file}:value:AVERAGE',
1252 'DEF:min={file}:value:MIN',
1253 'DEF:max={file}:value:MAX',
1254 "AREA:max#$HalfBlue",
1256 "LINE1:avg#$FullBlue:Queries/s",
1257 'GPRINT:min:MIN:%9.3lf Min,',
1258 'GPRINT:avg:AVERAGE:%9.3lf Average,',
1259 'GPRINT:max:MAX:%9.3lf Max,',
1260 'GPRINT:avg:LAST:%9.3lf Last\l'
1262 email_count => ['-v', 'Mails',
1263 'DEF:avg={file}:value:AVERAGE',
1264 'DEF:min={file}:value:MIN',
1265 'DEF:max={file}:value:MAX',
1266 "AREA:max#$HalfMagenta",
1268 "LINE1:avg#$FullMagenta:Count ",
1269 'GPRINT:min:MIN:%4.1lf Min,',
1270 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1271 'GPRINT:max:MAX:%4.1lf Max,',
1272 'GPRINT:avg:LAST:%4.1lf Last\l'
1274 email_size => ['-v', 'Bytes',
1275 'DEF:avg={file}:value:AVERAGE',
1276 'DEF:min={file}:value:MIN',
1277 'DEF:max={file}:value:MAX',
1278 "AREA:max#$HalfMagenta",
1280 "LINE1:avg#$FullMagenta:Count ",
1281 'GPRINT:min:MIN:%4.1lf Min,',
1282 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1283 'GPRINT:max:MAX:%4.1lf Max,',
1284 'GPRINT:avg:LAST:%4.1lf Last\l'
1286 spam_score => ['-v', 'Score',
1287 'DEF:avg={file}:value:AVERAGE',
1288 'DEF:min={file}:value:MIN',
1289 'DEF:max={file}:value:MAX',
1290 "AREA:max#$HalfBlue",
1292 "LINE1:avg#$FullBlue:Score ",
1293 'GPRINT:min:MIN:%4.1lf Min,',
1294 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1295 'GPRINT:max:MAX:%4.1lf Max,',
1296 'GPRINT:avg:LAST:%4.1lf Last\l'
1299 'DEF:avg={file}:value:AVERAGE',
1300 'DEF:min={file}:value:MIN',
1301 'DEF:max={file}:value:MAX',
1302 "AREA:max#$HalfMagenta",
1304 "LINE1:avg#$FullMagenta:Count ",
1305 'GPRINT:min:MIN:%4.1lf Min,',
1306 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1307 'GPRINT:max:MAX:%4.1lf Max,',
1308 'GPRINT:avg:LAST:%4.1lf Last\l'
1310 conntrack => ['-v', 'Entries',
1311 'DEF:avg={file}:entropy:AVERAGE',
1312 'DEF:min={file}:entropy:MIN',
1313 'DEF:max={file}:entropy:MAX',
1314 "AREA:max#$HalfBlue",
1316 "LINE1:avg#$FullBlue:Count",
1317 'GPRINT:min:MIN:%4.0lf Min,',
1318 'GPRINT:avg:AVERAGE:%4.0lf Avg,',
1319 'GPRINT:max:MAX:%4.0lf Max,',
1320 'GPRINT:avg:LAST:%4.0lf Last\l'
1322 entropy => ['-v', 'Bits',
1323 'DEF:avg={file}:entropy:AVERAGE',
1324 'DEF:min={file}:entropy:MIN',
1325 'DEF:max={file}:entropy:MAX',
1326 "AREA:max#$HalfBlue",
1328 "LINE1:avg#$FullBlue:Bits",
1329 'GPRINT:min:MIN:%4.0lfbit Min,',
1330 'GPRINT:avg:AVERAGE:%4.0lfbit Avg,',
1331 'GPRINT:max:MAX:%4.0lfbit Max,',
1332 'GPRINT:avg:LAST:%4.0lfbit Last\l'
1334 fanspeed => ['-v', 'RPM',
1335 'DEF:avg={file}:value:AVERAGE',
1336 'DEF:min={file}:value:MIN',
1337 'DEF:max={file}:value:MAX',
1338 "AREA:max#$HalfMagenta",
1340 "LINE1:avg#$FullMagenta:RPM",
1341 'GPRINT:min:MIN:%4.1lf Min,',
1342 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1343 'GPRINT:max:MAX:%4.1lf Max,',
1344 'GPRINT:avg:LAST:%4.1lf Last\l'
1346 frequency => ['-v', 'Hertz',
1347 'DEF:avg={file}:frequency:AVERAGE',
1348 'DEF:min={file}:frequency:MIN',
1349 'DEF:max={file}:frequency:MAX',
1350 "AREA:max#$HalfBlue",
1352 "LINE1:avg#$FullBlue:Frequency [Hz]",
1353 'GPRINT:min:MIN:%4.1lf Min,',
1354 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1355 'GPRINT:max:MAX:%4.1lf Max,',
1356 'GPRINT:avg:LAST:%4.1lf Last\l'
1358 frequency_offset => [ # NTPd
1359 'DEF:ppm_avg={file}:ppm:AVERAGE',
1360 'DEF:ppm_min={file}:ppm:MIN',
1361 'DEF:ppm_max={file}:ppm:MAX',
1362 "AREA:ppm_max#$HalfBlue",
1363 "AREA:ppm_min#$Canvas",
1364 "LINE1:ppm_avg#$FullBlue:{inst}",
1365 'GPRINT:ppm_min:MIN:%5.2lf Min,',
1366 'GPRINT:ppm_avg:AVERAGE:%5.2lf Avg,',
1367 'GPRINT:ppm_max:MAX:%5.2lf Max,',
1368 'GPRINT:ppm_avg:LAST:%5.2lf Last'
1370 gauge => ['-v', 'Exec value',
1371 'DEF:temp_avg={file}:value:AVERAGE',
1372 'DEF:temp_min={file}:value:MIN',
1373 'DEF:temp_max={file}:value:MAX',
1374 "AREA:temp_max#$HalfBlue",
1375 "AREA:temp_min#$Canvas",
1376 "LINE1:temp_avg#$FullBlue:Exec value",
1377 'GPRINT:temp_min:MIN:%6.2lf Min,',
1378 'GPRINT:temp_avg:AVERAGE:%6.2lf Avg,',
1379 'GPRINT:temp_max:MAX:%6.2lf Max,',
1380 'GPRINT:temp_avg:LAST:%6.2lf Last\l'
1383 'DEF:temp_avg={file}:value:AVERAGE',
1384 'DEF:temp_min={file}:value:MIN',
1385 'DEF:temp_max={file}:value:MAX',
1386 "AREA:temp_max#$HalfRed",
1387 "AREA:temp_min#$Canvas",
1388 "LINE1:temp_avg#$FullRed:Temperature",
1389 'GPRINT:temp_min:MIN:%4.1lf Min,',
1390 'GPRINT:temp_avg:AVERAGE:%4.1lf Avg,',
1391 'GPRINT:temp_max:MAX:%4.1lf Max,',
1392 'GPRINT:temp_avg:LAST:%4.1lf Last\l'
1394 humidity => ['-v', 'Percent',
1395 'DEF:temp_avg={file}:value:AVERAGE',
1396 'DEF:temp_min={file}:value:MIN',
1397 'DEF:temp_max={file}:value:MAX',
1398 "AREA:temp_max#$HalfGreen",
1399 "AREA:temp_min#$Canvas",
1400 "LINE1:temp_avg#$FullGreen:Temperature",
1401 'GPRINT:temp_min:MIN:%4.1lf%% Min,',
1402 'GPRINT:temp_avg:AVERAGE:%4.1lf%% Avg,',
1403 'GPRINT:temp_max:MAX:%4.1lf%% Max,',
1404 'GPRINT:temp_avg:LAST:%4.1lf%% Last\l'
1406 if_errors => ['-v', 'Errors/s',
1407 'DEF:tx_min={file}:tx:MIN',
1408 'DEF:tx_avg={file}:tx:AVERAGE',
1409 'DEF:tx_max={file}:tx:MAX',
1410 'DEF:rx_min={file}:rx:MIN',
1411 'DEF:rx_avg={file}:rx:AVERAGE',
1412 'DEF:rx_max={file}:rx:MAX',
1413 'CDEF:overlap=tx_avg,rx_avg,GT,rx_avg,tx_avg,IF',
1414 'CDEF:mytime=tx_avg,TIME,TIME,IF',
1415 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1416 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1417 'CDEF:tx_avg_sample=tx_avg,UN,0,tx_avg,IF,sample_len,*',
1418 'CDEF:tx_avg_sum=PREV,UN,0,PREV,IF,tx_avg_sample,+',
1419 'CDEF:rx_avg_sample=rx_avg,UN,0,rx_avg,IF,sample_len,*',
1420 'CDEF:rx_avg_sum=PREV,UN,0,PREV,IF,rx_avg_sample,+',
1421 "AREA:tx_avg#$HalfGreen",
1422 "AREA:rx_avg#$HalfBlue",
1423 "AREA:overlap#$HalfBlueGreen",
1424 "LINE1:tx_avg#$FullGreen:TX",
1425 'GPRINT:tx_avg:AVERAGE:%5.1lf%s Avg,',
1426 'GPRINT:tx_max:MAX:%5.1lf%s Max,',
1427 'GPRINT:tx_avg:LAST:%5.1lf%s Last',
1428 'GPRINT:tx_avg_sum:LAST:(ca. %4.0lf%s Total)\l',
1429 "LINE1:rx_avg#$FullBlue:RX",
1430 #'GPRINT:rx_min:MIN:%5.1lf %s Min,',
1431 'GPRINT:rx_avg:AVERAGE:%5.1lf%s Avg,',
1432 'GPRINT:rx_max:MAX:%5.1lf%s Max,',
1433 'GPRINT:rx_avg:LAST:%5.1lf%s Last',
1434 'GPRINT:rx_avg_sum:LAST:(ca. %4.0lf%s Total)\l'
1436 if_collisions => ['-v', 'Collisions/s',
1437 'DEF:min_raw={file}:value:MIN',
1438 'DEF:avg_raw={file}:value:AVERAGE',
1439 'DEF:max_raw={file}:value:MAX',
1440 'CDEF:min=min_raw,8,*',
1441 'CDEF:avg=avg_raw,8,*',
1442 'CDEF:max=max_raw,8,*',
1443 "AREA:max#$HalfBlue",
1445 "LINE1:avg#$FullBlue:Collisions/s",
1446 'GPRINT:min:MIN:%5.1lf %s Min,',
1447 'GPRINT:avg:AVERAGE:%5.1lf%s Avg,',
1448 'GPRINT:max:MAX:%5.1lf%s Max,',
1449 'GPRINT:avg:LAST:%5.1lf%s Last\l'
1451 if_dropped => ['-v', 'Packets/s',
1452 'DEF:tx_min={file}:tx:MIN',
1453 'DEF:tx_avg={file}:tx:AVERAGE',
1454 'DEF:tx_max={file}:tx:MAX',
1455 'DEF:rx_min={file}:rx:MIN',
1456 'DEF:rx_avg={file}:rx:AVERAGE',
1457 'DEF:rx_max={file}:rx:MAX',
1458 'CDEF:overlap=tx_avg,rx_avg,GT,rx_avg,tx_avg,IF',
1459 'CDEF:mytime=tx_avg,TIME,TIME,IF',
1460 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1461 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1462 'CDEF:tx_avg_sample=tx_avg,UN,0,tx_avg,IF,sample_len,*',
1463 'CDEF:tx_avg_sum=PREV,UN,0,PREV,IF,tx_avg_sample,+',
1464 'CDEF:rx_avg_sample=rx_avg,UN,0,rx_avg,IF,sample_len,*',
1465 'CDEF:rx_avg_sum=PREV,UN,0,PREV,IF,rx_avg_sample,+',
1466 "AREA:tx_avg#$HalfGreen",
1467 "AREA:rx_avg#$HalfBlue",
1468 "AREA:overlap#$HalfBlueGreen",
1469 "LINE1:tx_avg#$FullGreen:TX",
1470 'GPRINT:tx_avg:AVERAGE:%5.1lf%s Avg,',
1471 'GPRINT:tx_max:MAX:%5.1lf%s Max,',
1472 'GPRINT:tx_avg:LAST:%5.1lf%s Last',
1473 'GPRINT:tx_avg_sum:LAST:(ca. %4.0lf%s Total)\l',
1474 "LINE1:rx_avg#$FullBlue:RX",
1475 #'GPRINT:rx_min:MIN:%5.1lf %s Min,',
1476 'GPRINT:rx_avg:AVERAGE:%5.1lf%s Avg,',
1477 'GPRINT:rx_max:MAX:%5.1lf%s Max,',
1478 'GPRINT:rx_avg:LAST:%5.1lf%s Last',
1479 'GPRINT:rx_avg_sum:LAST:(ca. %4.0lf%s Total)\l'
1481 if_packets => ['-v', 'Packets/s',
1482 'DEF:tx_min={file}:tx:MIN',
1483 'DEF:tx_avg={file}:tx:AVERAGE',
1484 'DEF:tx_max={file}:tx:MAX',
1485 'DEF:rx_min={file}:rx:MIN',
1486 'DEF:rx_avg={file}:rx:AVERAGE',
1487 'DEF:rx_max={file}:rx:MAX',
1488 'CDEF:overlap=tx_avg,rx_avg,GT,rx_avg,tx_avg,IF',
1489 'CDEF:mytime=tx_avg,TIME,TIME,IF',
1490 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1491 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1492 'CDEF:tx_avg_sample=tx_avg,UN,0,tx_avg,IF,sample_len,*',
1493 'CDEF:tx_avg_sum=PREV,UN,0,PREV,IF,tx_avg_sample,+',
1494 'CDEF:rx_avg_sample=rx_avg,UN,0,rx_avg,IF,sample_len,*',
1495 'CDEF:rx_avg_sum=PREV,UN,0,PREV,IF,rx_avg_sample,+',
1496 "AREA:tx_avg#$HalfGreen",
1497 "AREA:rx_avg#$HalfBlue",
1498 "AREA:overlap#$HalfBlueGreen",
1499 "LINE1:tx_avg#$FullGreen:TX",
1500 'GPRINT:tx_avg:AVERAGE:%5.1lf%s Avg,',
1501 'GPRINT:tx_max:MAX:%5.1lf%s Max,',
1502 'GPRINT:tx_avg:LAST:%5.1lf%s Last',
1503 'GPRINT:tx_avg_sum:LAST:(ca. %4.0lf%s Total)\l',
1504 "LINE1:rx_avg#$FullBlue:RX",
1505 #'GPRINT:rx_min:MIN:%5.1lf %s Min,',
1506 'GPRINT:rx_avg:AVERAGE:%5.1lf%s Avg,',
1507 'GPRINT:rx_max:MAX:%5.1lf%s Max,',
1508 'GPRINT:rx_avg:LAST:%5.1lf%s Last',
1509 'GPRINT:rx_avg_sum:LAST:(ca. %4.0lf%s Total)\l'
1511 if_rx_errors => ['-v', 'Errors/s',
1512 'DEF:min={file}:value:MIN',
1513 'DEF:avg={file}:value:AVERAGE',
1514 'DEF:max={file}:value:MAX',
1515 'CDEF:mytime=avg,TIME,TIME,IF',
1516 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1517 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1518 'CDEF:avg_sample=avg,UN,0,avg,IF,sample_len,*',
1519 'CDEF:avg_sum=PREV,UN,0,PREV,IF,avg_sample,+',
1520 "AREA:avg#$HalfBlue",
1521 "LINE1:avg#$FullBlue:Errors/s",
1522 'GPRINT:avg:AVERAGE:%3.1lf%s Avg,',
1523 'GPRINT:max:MAX:%3.1lf%s Max,',
1524 'GPRINT:avg:LAST:%3.1lf%s Last',
1525 'GPRINT:avg_sum:LAST:(ca. %2.0lf%s Total)\l'
1527 ipt_bytes => ['-v', 'Bits/s',
1528 'DEF:min_raw={file}:value:MIN',
1529 'DEF:avg_raw={file}:value:AVERAGE',
1530 'DEF:max_raw={file}:value:MAX',
1531 'CDEF:min=min_raw,8,*',
1532 'CDEF:avg=avg_raw,8,*',
1533 'CDEF:max=max_raw,8,*',
1534 'CDEF:mytime=avg_raw,TIME,TIME,IF',
1535 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1536 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1537 'CDEF:avg_sample=avg_raw,UN,0,avg_raw,IF,sample_len,*',
1538 'CDEF:avg_sum=PREV,UN,0,PREV,IF,avg_sample,+',
1539 "AREA:max#$HalfBlue",
1541 "LINE1:avg#$FullBlue:Bits/s",
1542 #'GPRINT:min:MIN:%5.1lf %s Min,',
1543 'GPRINT:avg:AVERAGE:%5.1lf%s Avg,',
1544 'GPRINT:max:MAX:%5.1lf%s Max,',
1545 'GPRINT:avg:LAST:%5.1lf%s Last',
1546 'GPRINT:avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
1548 ipt_packets => ['-v', 'Packets/s',
1549 'DEF:min_raw={file}:value:MIN',
1550 'DEF:avg_raw={file}:value:AVERAGE',
1551 'DEF:max_raw={file}:value:MAX',
1552 'CDEF:min=min_raw,8,*',
1553 'CDEF:avg=avg_raw,8,*',
1554 'CDEF:max=max_raw,8,*',
1555 "AREA:max#$HalfBlue",
1557 "LINE1:avg#$FullBlue:Packets/s",
1558 'GPRINT:min:MIN:%5.1lf %s Min,',
1559 'GPRINT:avg:AVERAGE:%5.1lf%s Avg,',
1560 'GPRINT:max:MAX:%5.1lf%s Max,',
1561 'GPRINT:avg:LAST:%5.1lf%s Last\l'
1563 irq => ['-v', 'Issues/s',
1564 'DEF:avg={file}:value:AVERAGE',
1565 'DEF:min={file}:value:MIN',
1566 'DEF:max={file}:value:MAX',
1567 "AREA:max#$HalfBlue",
1569 "LINE1:avg#$FullBlue:Issues/s",
1570 'GPRINT:min:MIN:%6.2lf Min,',
1571 'GPRINT:avg:AVERAGE:%6.2lf Avg,',
1572 'GPRINT:max:MAX:%6.2lf Max,',
1573 'GPRINT:avg:LAST:%6.2lf Last\l'
1575 load => ['-v', 'System load',
1576 'DEF:s_avg={file}:shortterm:AVERAGE',
1577 'DEF:s_min={file}:shortterm:MIN',
1578 'DEF:s_max={file}:shortterm:MAX',
1579 'DEF:m_avg={file}:midterm:AVERAGE',
1580 'DEF:m_min={file}:midterm:MIN',
1581 'DEF:m_max={file}:midterm:MAX',
1582 'DEF:l_avg={file}:longterm:AVERAGE',
1583 'DEF:l_min={file}:longterm:MIN',
1584 'DEF:l_max={file}:longterm:MAX',
1585 "AREA:s_max#$HalfGreen",
1586 "AREA:s_min#$Canvas",
1587 "LINE1:s_avg#$FullGreen: 1m average",
1588 'GPRINT:s_min:MIN:%4.2lf Min,',
1589 'GPRINT:s_avg:AVERAGE:%4.2lf Avg,',
1590 'GPRINT:s_max:MAX:%4.2lf Max,',
1591 'GPRINT:s_avg:LAST:%4.2lf Last\n',
1592 "LINE1:m_avg#$FullBlue: 5m average",
1593 'GPRINT:m_min:MIN:%4.2lf Min,',
1594 'GPRINT:m_avg:AVERAGE:%4.2lf Avg,',
1595 'GPRINT:m_max:MAX:%4.2lf Max,',
1596 'GPRINT:m_avg:LAST:%4.2lf Last\n',
1597 "LINE1:l_avg#$FullRed:15m average",
1598 'GPRINT:l_min:MIN:%4.2lf Min,',
1599 'GPRINT:l_avg:AVERAGE:%4.2lf Avg,',
1600 'GPRINT:l_max:MAX:%4.2lf Max,',
1601 'GPRINT:l_avg:LAST:%4.2lf Last'
1604 'DEF:avg={file}:percent:AVERAGE',
1605 'DEF:min={file}:percent:MIN',
1606 'DEF:max={file}:percent:MAX',
1607 "AREA:max#$HalfBlue",
1609 "LINE1:avg#$FullBlue:Load",
1610 'GPRINT:min:MIN:%5.1lf%s%% Min,',
1611 'GPRINT:avg:AVERAGE:%5.1lf%s%% Avg,',
1612 'GPRINT:max:MAX:%5.1lf%s%% Max,',
1613 'GPRINT:avg:LAST:%5.1lf%s%% Last\l'
1615 mails => ['DEF:rawgood={file}:good:AVERAGE',
1616 'DEF:rawspam={file}:spam:AVERAGE',
1617 'CDEF:good=rawgood,UN,0,rawgood,IF',
1618 'CDEF:spam=rawspam,UN,0,rawspam,IF',
1619 'CDEF:negspam=spam,-1,*',
1620 "AREA:good#$HalfGreen",
1621 "LINE1:good#$FullGreen:Good mails",
1622 'GPRINT:good:AVERAGE:%4.1lf Avg,',
1623 'GPRINT:good:MAX:%4.1lf Max,',
1624 'GPRINT:good:LAST:%4.1lf Last\n',
1625 "AREA:negspam#$HalfRed",
1626 "LINE1:negspam#$FullRed:Spam mails",
1627 'GPRINT:spam:AVERAGE:%4.1lf Avg,',
1628 'GPRINT:spam:MAX:%4.1lf Max,',
1629 'GPRINT:spam:LAST:%4.1lf Last',
1632 memcached_command => ['-v', 'Commands',
1633 'DEF:avg={file}:value:AVERAGE',
1634 'DEF:min={file}:value:MIN',
1635 'DEF:max={file}:value:MAX',
1636 "AREA:max#$HalfBlue",
1638 "LINE1:avg#$FullBlue:Commands",
1639 'GPRINT:min:MIN:%5.1lf%s Min,',
1640 'GPRINT:avg:AVERAGE:%5.1lf Avg,',
1641 'GPRINT:max:MAX:%5.1lf Max,',
1642 'GPRINT:avg:LAST:%5.1lf Last\l'
1644 memcached_connections => ['-v', 'Connections',
1645 'DEF:avg={file}:value:AVERAGE',
1646 'DEF:min={file}:value:MIN',
1647 'DEF:max={file}:value:MAX',
1648 "AREA:max#$HalfBlue",
1650 "LINE1:avg#$FullBlue:Connections",
1651 'GPRINT:min:MIN:%4.1lf Min,',
1652 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1653 'GPRINT:max:MAX:%4.1lf Max,',
1654 'GPRINT:avg:LAST:%4.1lf Last\l'
1656 memcached_items => ['-v', 'Items',
1657 'DEF:avg={file}:value:AVERAGE',
1658 'DEF:min={file}:value:MIN',
1659 'DEF:max={file}:value:MAX',
1660 "AREA:max#$HalfBlue",
1662 "LINE1:avg#$FullBlue:Items",
1663 'GPRINT:min:MIN:%4.1lf Min,',
1664 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1665 'GPRINT:max:MAX:%4.1lf Max,',
1666 'GPRINT:avg:LAST:%4.1lf Last\l'
1668 memcached_octets => ['-v', 'Bits/s',
1669 'DEF:out_min={file}:tx:MIN',
1670 'DEF:out_avg={file}:tx:AVERAGE',
1671 'DEF:out_max={file}:tx:MAX',
1672 'DEF:inc_min={file}:rx:MIN',
1673 'DEF:inc_avg={file}:rx:AVERAGE',
1674 'DEF:inc_max={file}:rx:MAX',
1675 'CDEF:mytime=out_avg,TIME,TIME,IF',
1676 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1677 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1678 'CDEF:out_avg_sample=out_avg,UN,0,out_avg,IF,sample_len,*',
1679 'CDEF:out_avg_sum=PREV,UN,0,PREV,IF,out_avg_sample,+',
1680 'CDEF:inc_avg_sample=inc_avg,UN,0,inc_avg,IF,sample_len,*',
1681 'CDEF:inc_avg_sum=PREV,UN,0,PREV,IF,inc_avg_sample,+',
1682 'CDEF:out_bit_min=out_min,8,*',
1683 'CDEF:out_bit_avg=out_avg,8,*',
1684 'CDEF:out_bit_max=out_max,8,*',
1685 'CDEF:inc_bit_min=inc_min,8,*',
1686 'CDEF:inc_bit_avg=inc_avg,8,*',
1687 'CDEF:inc_bit_max=inc_max,8,*',
1688 'CDEF:overlap=out_bit_avg,inc_bit_avg,GT,inc_bit_avg,out_bit_avg,IF',
1689 "AREA:out_bit_avg#$HalfGreen",
1690 "AREA:inc_bit_avg#$HalfBlue",
1691 "AREA:overlap#$HalfBlueGreen",
1692 "LINE1:out_bit_avg#$FullGreen:Written",
1693 'GPRINT:out_bit_avg:AVERAGE:%5.1lf%s Avg,',
1694 'GPRINT:out_bit_max:MAX:%5.1lf%s Max,',
1695 'GPRINT:out_bit_avg:LAST:%5.1lf%s Last',
1696 'GPRINT:out_avg_sum:LAST:(ca. %5.1lf%sB Total)\l',
1697 "LINE1:inc_bit_avg#$FullBlue:Read ",
1698 'GPRINT:inc_bit_avg:AVERAGE:%5.1lf%s Avg,',
1699 'GPRINT:inc_bit_max:MAX:%5.1lf%s Max,',
1700 'GPRINT:inc_bit_avg:LAST:%5.1lf%s Last',
1701 'GPRINT:inc_avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
1703 memcached_ops => ['-v', 'Ops',
1704 'DEF:avg={file}:value:AVERAGE',
1705 'DEF:min={file}:value:MIN',
1706 'DEF:max={file}:value:MAX',
1707 "AREA:max#$HalfBlue",
1709 "LINE1:avg#$FullBlue:Ops",
1710 'GPRINT:min:MIN:%4.1lf Min,',
1711 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1712 'GPRINT:max:MAX:%4.1lf Max,',
1713 'GPRINT:avg:LAST:%4.1lf Last\l'
1715 memory => ['-b', '1024', '-v', 'Bytes',
1716 'DEF:avg={file}:value:AVERAGE',
1717 'DEF:min={file}:value:MIN',
1718 'DEF:max={file}:value:MAX',
1719 "AREA:max#$HalfBlue",
1721 "LINE1:avg#$FullBlue:Memory",
1722 'GPRINT:min:MIN:%5.1lf%sbyte Min,',
1723 'GPRINT:avg:AVERAGE:%5.1lf%sbyte Avg,',
1724 'GPRINT:max:MAX:%5.1lf%sbyte Max,',
1725 'GPRINT:avg:LAST:%5.1lf%sbyte Last\l'
1728 'DEF:used_avg={file}:used:AVERAGE',
1729 'DEF:free_avg={file}:free:AVERAGE',
1730 'DEF:buffers_avg={file}:buffers:AVERAGE',
1731 'DEF:cached_avg={file}:cached:AVERAGE',
1732 'DEF:used_min={file}:used:MIN',
1733 'DEF:free_min={file}:free:MIN',
1734 'DEF:buffers_min={file}:buffers:MIN',
1735 'DEF:cached_min={file}:cached:MIN',
1736 'DEF:used_max={file}:used:MAX',
1737 'DEF:free_max={file}:free:MAX',
1738 'DEF:buffers_max={file}:buffers:MAX',
1739 'DEF:cached_max={file}:cached:MAX',
1740 'CDEF:cached_avg_nn=cached_avg,UN,0,cached_avg,IF',
1741 'CDEF:buffers_avg_nn=buffers_avg,UN,0,buffers_avg,IF',
1742 'CDEF:free_cached_buffers_used=free_avg,cached_avg_nn,+,buffers_avg_nn,+,used_avg,+',
1743 'CDEF:cached_buffers_used=cached_avg,buffers_avg_nn,+,used_avg,+',
1744 'CDEF:buffers_used=buffers_avg,used_avg,+',
1745 "AREA:free_cached_buffers_used#$HalfGreen",
1746 "AREA:cached_buffers_used#$HalfBlue",
1747 "AREA:buffers_used#$HalfYellow",
1748 "AREA:used_avg#$HalfRed",
1749 "LINE1:free_cached_buffers_used#$FullGreen:Free ",
1750 'GPRINT:free_min:MIN:%5.1lf%s Min,',
1751 'GPRINT:free_avg:AVERAGE:%5.1lf%s Avg,',
1752 'GPRINT:free_max:MAX:%5.1lf%s Max,',
1753 'GPRINT:free_avg:LAST:%5.1lf%s Last\n',
1754 "LINE1:cached_buffers_used#$FullBlue:Page cache ",
1755 'GPRINT:cached_min:MIN:%5.1lf%s Min,',
1756 'GPRINT:cached_avg:AVERAGE:%5.1lf%s Avg,',
1757 'GPRINT:cached_max:MAX:%5.1lf%s Max,',
1758 'GPRINT:cached_avg:LAST:%5.1lf%s Last\n',
1759 "LINE1:buffers_used#$FullYellow:Buffer cache",
1760 'GPRINT:buffers_min:MIN:%5.1lf%s Min,',
1761 'GPRINT:buffers_avg:AVERAGE:%5.1lf%s Avg,',
1762 'GPRINT:buffers_max:MAX:%5.1lf%s Max,',
1763 'GPRINT:buffers_avg:LAST:%5.1lf%s Last\n',
1764 "LINE1:used_avg#$FullRed:Used ",
1765 'GPRINT:used_min:MIN:%5.1lf%s Min,',
1766 'GPRINT:used_avg:AVERAGE:%5.1lf%s Avg,',
1767 'GPRINT:used_max:MAX:%5.1lf%s Max,',
1768 'GPRINT:used_avg:LAST:%5.1lf%s Last'
1770 mysql_commands => ['-v', 'Issues/s',
1771 "DEF:val_avg={file}:value:AVERAGE",
1772 "DEF:val_min={file}:value:MIN",
1773 "DEF:val_max={file}:value:MAX",
1774 "AREA:val_max#$HalfBlue",
1775 "AREA:val_min#$Canvas",
1776 "LINE1:val_avg#$FullBlue:Issues/s",
1777 'GPRINT:val_min:MIN:%5.2lf Min,',
1778 'GPRINT:val_avg:AVERAGE:%5.2lf Avg,',
1779 'GPRINT:val_max:MAX:%5.2lf Max,',
1780 'GPRINT:val_avg:LAST:%5.2lf Last'
1782 mysql_handler => ['-v', 'Issues/s',
1783 "DEF:val_avg={file}:value:AVERAGE",
1784 "DEF:val_min={file}:value:MIN",
1785 "DEF:val_max={file}:value:MAX",
1786 "AREA:val_max#$HalfBlue",
1787 "AREA:val_min#$Canvas",
1788 "LINE1:val_avg#$FullBlue:Issues/s",
1789 'GPRINT:val_min:MIN:%5.2lf Min,',
1790 'GPRINT:val_avg:AVERAGE:%5.2lf Avg,',
1791 'GPRINT:val_max:MAX:%5.2lf Max,',
1792 'GPRINT:val_avg:LAST:%5.2lf Last'
1794 mysql_octets => ['-v', 'Bits/s',
1795 'DEF:out_min={file}:tx:MIN',
1796 'DEF:out_avg={file}:tx:AVERAGE',
1797 'DEF:out_max={file}:tx:MAX',
1798 'DEF:inc_min={file}:rx:MIN',
1799 'DEF:inc_avg={file}:rx:AVERAGE',
1800 'DEF:inc_max={file}:rx:MAX',
1801 'CDEF:mytime=out_avg,TIME,TIME,IF',
1802 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1803 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1804 'CDEF:out_avg_sample=out_avg,UN,0,out_avg,IF,sample_len,*',
1805 'CDEF:out_avg_sum=PREV,UN,0,PREV,IF,out_avg_sample,+',
1806 'CDEF:inc_avg_sample=inc_avg,UN,0,inc_avg,IF,sample_len,*',
1807 'CDEF:inc_avg_sum=PREV,UN,0,PREV,IF,inc_avg_sample,+',
1808 'CDEF:out_bit_min=out_min,8,*',
1809 'CDEF:out_bit_avg=out_avg,8,*',
1810 'CDEF:out_bit_max=out_max,8,*',
1811 'CDEF:inc_bit_min=inc_min,8,*',
1812 'CDEF:inc_bit_avg=inc_avg,8,*',
1813 'CDEF:inc_bit_max=inc_max,8,*',
1814 'CDEF:overlap=out_bit_avg,inc_bit_avg,GT,inc_bit_avg,out_bit_avg,IF',
1815 "AREA:out_bit_avg#$HalfGreen",
1816 "AREA:inc_bit_avg#$HalfBlue",
1817 "AREA:overlap#$HalfBlueGreen",
1818 "LINE1:out_bit_avg#$FullGreen:Written",
1819 'GPRINT:out_bit_avg:AVERAGE:%5.1lf%s Avg,',
1820 'GPRINT:out_bit_max:MAX:%5.1lf%s Max,',
1821 'GPRINT:out_bit_avg:LAST:%5.1lf%s Last',
1822 'GPRINT:out_avg_sum:LAST:(ca. %5.1lf%sB Total)\l',
1823 "LINE1:inc_bit_avg#$FullBlue:Read ",
1824 'GPRINT:inc_bit_avg:AVERAGE:%5.1lf%s Avg,',
1825 'GPRINT:inc_bit_max:MAX:%5.1lf%s Max,',
1826 'GPRINT:inc_bit_avg:LAST:%5.1lf%s Last',
1827 'GPRINT:inc_avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
1829 mysql_qcache => ['-v', 'Queries/s',
1830 "DEF:hits_min={file}:hits:MIN",
1831 "DEF:hits_avg={file}:hits:AVERAGE",
1832 "DEF:hits_max={file}:hits:MAX",
1833 "DEF:inserts_min={file}:inserts:MIN",
1834 "DEF:inserts_avg={file}:inserts:AVERAGE",
1835 "DEF:inserts_max={file}:inserts:MAX",
1836 "DEF:not_cached_min={file}:not_cached:MIN",
1837 "DEF:not_cached_avg={file}:not_cached:AVERAGE",
1838 "DEF:not_cached_max={file}:not_cached:MAX",
1839 "DEF:lowmem_prunes_min={file}:lowmem_prunes:MIN",
1840 "DEF:lowmem_prunes_avg={file}:lowmem_prunes:AVERAGE",
1841 "DEF:lowmem_prunes_max={file}:lowmem_prunes:MAX",
1842 "DEF:queries_min={file}:queries_in_cache:MIN",
1843 "DEF:queries_avg={file}:queries_in_cache:AVERAGE",
1844 "DEF:queries_max={file}:queries_in_cache:MAX",
1845 "CDEF:unknown=queries_avg,UNKN,+",
1846 "CDEF:not_cached_agg=hits_avg,inserts_avg,+,not_cached_avg,+",
1847 "CDEF:inserts_agg=hits_avg,inserts_avg,+",
1848 "CDEF:hits_agg=hits_avg",
1849 "AREA:not_cached_agg#$HalfYellow",
1850 "AREA:inserts_agg#$HalfBlue",
1851 "AREA:hits_agg#$HalfGreen",
1852 "LINE1:not_cached_agg#$FullYellow:Not Cached ",
1853 'GPRINT:not_cached_min:MIN:%5.2lf Min,',
1854 'GPRINT:not_cached_avg:AVERAGE:%5.2lf Avg,',
1855 'GPRINT:not_cached_max:MAX:%5.2lf Max,',
1856 'GPRINT:not_cached_avg:LAST:%5.2lf Last\l',
1857 "LINE1:inserts_agg#$FullBlue:Inserts ",
1858 'GPRINT:inserts_min:MIN:%5.2lf Min,',
1859 'GPRINT:inserts_avg:AVERAGE:%5.2lf Avg,',
1860 'GPRINT:inserts_max:MAX:%5.2lf Max,',
1861 'GPRINT:inserts_avg:LAST:%5.2lf Last\l',
1862 "LINE1:hits_agg#$FullGreen:Hits ",
1863 'GPRINT:hits_min:MIN:%5.2lf Min,',
1864 'GPRINT:hits_avg:AVERAGE:%5.2lf Avg,',
1865 'GPRINT:hits_max:MAX:%5.2lf Max,',
1866 'GPRINT:hits_avg:LAST:%5.2lf Last\l',
1867 "LINE1:lowmem_prunes_avg#$FullRed:Lowmem Prunes ",
1868 'GPRINT:lowmem_prunes_min:MIN:%5.2lf Min,',
1869 'GPRINT:lowmem_prunes_avg:AVERAGE:%5.2lf Avg,',
1870 'GPRINT:lowmem_prunes_max:MAX:%5.2lf Max,',
1871 'GPRINT:lowmem_prunes_avg:LAST:%5.2lf Last\l',
1872 "LINE1:unknown#$Canvas:Queries in cache",
1873 'GPRINT:queries_min:MIN:%5.0lf Min,',
1874 'GPRINT:queries_avg:AVERAGE:%5.0lf Avg,',
1875 'GPRINT:queries_max:MAX:%5.0lf Max,',
1876 'GPRINT:queries_avg:LAST:%5.0lf Last\l'
1878 mysql_threads => ['-v', 'Threads',
1879 "DEF:running_min={file}:running:MIN",
1880 "DEF:running_avg={file}:running:AVERAGE",
1881 "DEF:running_max={file}:running:MAX",
1882 "DEF:connected_min={file}:connected:MIN",
1883 "DEF:connected_avg={file}:connected:AVERAGE",
1884 "DEF:connected_max={file}:connected:MAX",
1885 "DEF:cached_min={file}:cached:MIN",
1886 "DEF:cached_avg={file}:cached:AVERAGE",
1887 "DEF:cached_max={file}:cached:MAX",
1888 "DEF:created_min={file}:created:MIN",
1889 "DEF:created_avg={file}:created:AVERAGE",
1890 "DEF:created_max={file}:created:MAX",
1891 "CDEF:unknown=created_avg,UNKN,+",
1892 "CDEF:cached_agg=connected_avg,cached_avg,+",
1893 "AREA:cached_agg#$HalfGreen",
1894 "AREA:connected_avg#$HalfBlue",
1895 "AREA:running_avg#$HalfRed",
1896 "LINE1:cached_agg#$FullGreen:Cached ",
1897 'GPRINT:cached_min:MIN:%5.1lf Min,',
1898 'GPRINT:cached_avg:AVERAGE:%5.1lf Avg,',
1899 'GPRINT:cached_max:MAX:%5.1lf Max,',
1900 'GPRINT:cached_avg:LAST:%5.1lf Last\l',
1901 "LINE1:connected_avg#$FullBlue:Connected",
1902 'GPRINT:connected_min:MIN:%5.1lf Min,',
1903 'GPRINT:connected_avg:AVERAGE:%5.1lf Avg,',
1904 'GPRINT:connected_max:MAX:%5.1lf Max,',
1905 'GPRINT:connected_avg:LAST:%5.1lf Last\l',
1906 "LINE1:running_avg#$FullRed:Running ",
1907 'GPRINT:running_min:MIN:%5.1lf Min,',
1908 'GPRINT:running_avg:AVERAGE:%5.1lf Avg,',
1909 'GPRINT:running_max:MAX:%5.1lf Max,',
1910 'GPRINT:running_avg:LAST:%5.1lf Last\l',
1911 "LINE1:unknown#$Canvas:Created ",
1912 'GPRINT:created_min:MIN:%5.0lf Min,',
1913 'GPRINT:created_avg:AVERAGE:%5.0lf Avg,',
1914 'GPRINT:created_max:MAX:%5.0lf Max,',
1915 'GPRINT:created_avg:LAST:%5.0lf Last\l'
1917 nfs_procedure => ['-v', 'Issues/s',
1918 'DEF:avg={file}:value:AVERAGE',
1919 'DEF:min={file}:value:MIN',
1920 'DEF:max={file}:value:MAX',
1921 "AREA:max#$HalfBlue",
1923 "LINE1:avg#$FullBlue:Issues/s",
1924 'GPRINT:min:MIN:%6.2lf Min,',
1925 'GPRINT:avg:AVERAGE:%6.2lf Avg,',
1926 'GPRINT:max:MAX:%6.2lf Max,',
1927 'GPRINT:avg:LAST:%6.2lf Last\l'
1929 nfs3_procedures => [
1930 "DEF:null_avg={file}:null:AVERAGE",
1931 "DEF:getattr_avg={file}:getattr:AVERAGE",
1932 "DEF:setattr_avg={file}:setattr:AVERAGE",
1933 "DEF:lookup_avg={file}:lookup:AVERAGE",
1934 "DEF:access_avg={file}:access:AVERAGE",
1935 "DEF:readlink_avg={file}:readlink:AVERAGE",
1936 "DEF:read_avg={file}:read:AVERAGE",
1937 "DEF:write_avg={file}:write:AVERAGE",
1938 "DEF:create_avg={file}:create:AVERAGE",
1939 "DEF:mkdir_avg={file}:mkdir:AVERAGE",
1940 "DEF:symlink_avg={file}:symlink:AVERAGE",
1941 "DEF:mknod_avg={file}:mknod:AVERAGE",
1942 "DEF:remove_avg={file}:remove:AVERAGE",
1943 "DEF:rmdir_avg={file}:rmdir:AVERAGE",
1944 "DEF:rename_avg={file}:rename:AVERAGE",
1945 "DEF:link_avg={file}:link:AVERAGE",
1946 "DEF:readdir_avg={file}:readdir:AVERAGE",
1947 "DEF:readdirplus_avg={file}:readdirplus:AVERAGE",
1948 "DEF:fsstat_avg={file}:fsstat:AVERAGE",
1949 "DEF:fsinfo_avg={file}:fsinfo:AVERAGE",
1950 "DEF:pathconf_avg={file}:pathconf:AVERAGE",
1951 "DEF:commit_avg={file}:commit:AVERAGE",
1952 "DEF:null_max={file}:null:MAX",
1953 "DEF:getattr_max={file}:getattr:MAX",
1954 "DEF:setattr_max={file}:setattr:MAX",
1955 "DEF:lookup_max={file}:lookup:MAX",
1956 "DEF:access_max={file}:access:MAX",
1957 "DEF:readlink_max={file}:readlink:MAX",
1958 "DEF:read_max={file}:read:MAX",
1959 "DEF:write_max={file}:write:MAX",
1960 "DEF:create_max={file}:create:MAX",
1961 "DEF:mkdir_max={file}:mkdir:MAX",
1962 "DEF:symlink_max={file}:symlink:MAX",
1963 "DEF:mknod_max={file}:mknod:MAX",
1964 "DEF:remove_max={file}:remove:MAX",
1965 "DEF:rmdir_max={file}:rmdir:MAX",
1966 "DEF:rename_max={file}:rename:MAX",
1967 "DEF:link_max={file}:link:MAX",
1968 "DEF:readdir_max={file}:readdir:MAX",
1969 "DEF:readdirplus_max={file}:readdirplus:MAX",
1970 "DEF:fsstat_max={file}:fsstat:MAX",
1971 "DEF:fsinfo_max={file}:fsinfo:MAX",
1972 "DEF:pathconf_max={file}:pathconf:MAX",
1973 "DEF:commit_max={file}:commit:MAX",
1974 "CDEF:other_avg=null_avg,readlink_avg,create_avg,mkdir_avg,symlink_avg,mknod_avg,remove_avg,rmdir_avg,rename_avg,link_avg,readdir_avg,readdirplus_avg,fsstat_avg,fsinfo_avg,pathconf_avg,+,+,+,+,+,+,+,+,+,+,+,+,+,+",
1975 "CDEF:other_max=null_max,readlink_max,create_max,mkdir_max,symlink_max,mknod_max,remove_max,rmdir_max,rename_max,link_max,readdir_max,readdirplus_max,fsstat_max,fsinfo_max,pathconf_max,+,+,+,+,+,+,+,+,+,+,+,+,+,+",
1976 "CDEF:stack_read=read_avg",
1977 "CDEF:stack_getattr=stack_read,getattr_avg,+",
1978 "CDEF:stack_access=stack_getattr,access_avg,+",
1979 "CDEF:stack_lookup=stack_access,lookup_avg,+",
1980 "CDEF:stack_write=stack_lookup,write_avg,+",
1981 "CDEF:stack_commit=stack_write,commit_avg,+",
1982 "CDEF:stack_setattr=stack_commit,setattr_avg,+",
1983 "CDEF:stack_other=stack_setattr,other_avg,+",
1984 "AREA:stack_other#$HalfRed",
1985 "AREA:stack_setattr#$HalfGreen",
1986 "AREA:stack_commit#$HalfYellow",
1987 "AREA:stack_write#$HalfGreen",
1988 "AREA:stack_lookup#$HalfBlue",
1989 "AREA:stack_access#$HalfMagenta",
1990 "AREA:stack_getattr#$HalfCyan",
1991 "AREA:stack_read#$HalfBlue",
1992 "LINE1:stack_other#$FullRed:Other ",
1993 'GPRINT:other_max:MAX:%5.1lf Max,',
1994 'GPRINT:other_avg:AVERAGE:%5.1lf Avg,',
1995 'GPRINT:other_avg:LAST:%5.1lf Last\l',
1996 "LINE1:stack_setattr#$FullGreen:setattr",
1997 'GPRINT:setattr_max:MAX:%5.1lf Max,',
1998 'GPRINT:setattr_avg:AVERAGE:%5.1lf Avg,',
1999 'GPRINT:setattr_avg:LAST:%5.1lf Last\l',
2000 "LINE1:stack_commit#$FullYellow:commit ",
2001 'GPRINT:commit_max:MAX:%5.1lf Max,',
2002 'GPRINT:commit_avg:AVERAGE:%5.1lf Avg,',
2003 'GPRINT:commit_avg:LAST:%5.1lf Last\l',
2004 "LINE1:stack_write#$FullGreen:write ",
2005 'GPRINT:write_max:MAX:%5.1lf Max,',
2006 'GPRINT:write_avg:AVERAGE:%5.1lf Avg,',
2007 'GPRINT:write_avg:LAST:%5.1lf Last\l',
2008 "LINE1:stack_lookup#$FullBlue:lookup ",
2009 'GPRINT:lookup_max:MAX:%5.1lf Max,',
2010 'GPRINT:lookup_avg:AVERAGE:%5.1lf Avg,',
2011 'GPRINT:lookup_avg:LAST:%5.1lf Last\l',
2012 "LINE1:stack_access#$FullMagenta:access ",
2013 'GPRINT:access_max:MAX:%5.1lf Max,',
2014 'GPRINT:access_avg:AVERAGE:%5.1lf Avg,',
2015 'GPRINT:access_avg:LAST:%5.1lf Last\l',
2016 "LINE1:stack_getattr#$FullCyan:getattr",
2017 'GPRINT:getattr_max:MAX:%5.1lf Max,',
2018 'GPRINT:getattr_avg:AVERAGE:%5.1lf Avg,',
2019 'GPRINT:getattr_avg:LAST:%5.1lf Last\l',
2020 "LINE1:stack_read#$FullBlue:read ",
2021 'GPRINT:read_max:MAX:%5.1lf Max,',
2022 'GPRINT:read_avg:AVERAGE:%5.1lf Avg,',
2023 'GPRINT:read_avg:LAST:%5.1lf Last\l'
2026 "DEF:rbyte_avg={file}:rbytes:AVERAGE",
2027 "DEF:rbyte_min={file}:rbytes:MIN",
2028 "DEF:rbyte_max={file}:rbytes:MAX",
2029 "DEF:wbyte_avg={file}:wbytes:AVERAGE",
2030 "DEF:wbyte_min={file}:wbytes:MIN",
2031 "DEF:wbyte_max={file}:wbytes:MAX",
2032 'CDEF:overlap=wbyte_avg,rbyte_avg,GT,rbyte_avg,wbyte_avg,IF',
2033 "AREA:wbyte_avg#$HalfGreen",
2034 "AREA:rbyte_avg#$HalfBlue",
2035 "AREA:overlap#$HalfBlueGreen",
2036 "LINE1:wbyte_avg#$FullGreen:Write",
2037 'GPRINT:wbyte_min:MIN:%5.1lf%s Min,',
2038 'GPRINT:wbyte_avg:AVERAGE:%5.1lf%s Avg,',
2039 'GPRINT:wbyte_max:MAX:%5.1lf%s Max,',
2040 'GPRINT:wbyte_avg:LAST:%5.1lf%s Last\l',
2041 "LINE1:rbyte_avg#$FullBlue:Read ",
2042 'GPRINT:rbyte_min:MIN:%5.1lf%s Min,',
2043 'GPRINT:rbyte_avg:AVERAGE:%5.1lf%s Avg,',
2044 'GPRINT:rbyte_max:MAX:%5.1lf%s Max,',
2045 'GPRINT:rbyte_avg:LAST:%5.1lf%s Last\l'
2047 percent => ['-v', 'Percent',
2048 'DEF:avg={file}:percent:AVERAGE',
2049 'DEF:min={file}:percent:MIN',
2050 'DEF:max={file}:percent:MAX',
2051 "AREA:max#$HalfBlue",
2053 "LINE1:avg#$FullBlue:Percent",
2054 'GPRINT:min:MIN:%5.1lf%% Min,',
2055 'GPRINT:avg:AVERAGE:%5.1lf%% Avg,',
2056 'GPRINT:max:MAX:%5.1lf%% Max,',
2057 'GPRINT:avg:LAST:%5.1lf%% Last\l'
2059 ping => ['DEF:ping_avg={file}:ping:AVERAGE',
2060 'DEF:ping_min={file}:ping:MIN',
2061 'DEF:ping_max={file}:ping:MAX',
2062 "AREA:ping_max#$HalfBlue",
2063 "AREA:ping_min#$Canvas",
2064 "LINE1:ping_avg#$FullBlue:Ping",
2065 'GPRINT:ping_min:MIN:%4.1lf ms Min,',
2066 'GPRINT:ping_avg:AVERAGE:%4.1lf ms Avg,',
2067 'GPRINT:ping_max:MAX:%4.1lf ms Max,',
2068 'GPRINT:ping_avg:LAST:%4.1lf ms Last'],
2069 pg_blks => ['DEF:pg_blks_avg={file}:value:AVERAGE',
2070 'DEF:pg_blks_min={file}:value:MIN',
2071 'DEF:pg_blks_max={file}:value:MAX',
2072 "AREA:pg_blks_max#$HalfBlue",
2073 "AREA:pg_blks_min#$Canvas",
2074 "LINE1:pg_blks_avg#$FullBlue:Blocks",
2075 'GPRINT:pg_blks_min:MIN:%4.1lf%s Min,',
2076 'GPRINT:pg_blks_avg:AVERAGE:%4.1lf%s Avg,',
2077 'GPRINT:pg_blks_max:MAX:%4.1lf%s Max,',
2078 'GPRINT:pg_blks_avg:LAST:%4.1lf%s Last'],
2079 pg_db_size => ['DEF:pg_db_size_avg={file}:value:AVERAGE',
2080 'DEF:pg_db_size_min={file}:value:MIN',
2081 'DEF:pg_db_size_max={file}:value:MAX',
2082 "AREA:pg_db_size_max#$HalfBlue",
2083 "AREA:pg_db_size_min#$Canvas",
2084 "LINE1:pg_db_size_avg#$FullBlue:Bytes",
2085 'GPRINT:pg_db_size_min:MIN:%4.1lf%s Min,',
2086 'GPRINT:pg_db_size_avg:AVERAGE:%4.1lf%s Avg,',
2087 'GPRINT:pg_db_size_max:MAX:%4.1lf%s Max,',
2088 'GPRINT:pg_db_size_avg:LAST:%4.1lf%s Last'],
2089 pg_n_tup_c => ['DEF:pg_n_tup_avg={file}:value:AVERAGE',
2090 'DEF:pg_n_tup_min={file}:value:MIN',
2091 'DEF:pg_n_tup_max={file}:value:MAX',
2092 "AREA:pg_n_tup_max#$HalfBlue",
2093 "AREA:pg_n_tup_min#$Canvas",
2094 "LINE1:pg_n_tup_avg#$FullBlue:Tuples",
2095 'GPRINT:pg_n_tup_min:MIN:%4.1lf%s Min,',
2096 'GPRINT:pg_n_tup_avg:AVERAGE:%4.1lf%s Avg,',
2097 'GPRINT:pg_n_tup_max:MAX:%4.1lf%s Max,',
2098 'GPRINT:pg_n_tup_avg:LAST:%4.1lf%s Last'],
2099 pg_n_tup_g => ['DEF:pg_n_tup_avg={file}:value:AVERAGE',
2100 'DEF:pg_n_tup_min={file}:value:MIN',
2101 'DEF:pg_n_tup_max={file}:value:MAX',
2102 "AREA:pg_n_tup_max#$HalfBlue",
2103 "AREA:pg_n_tup_min#$Canvas",
2104 "LINE1:pg_n_tup_avg#$FullBlue:Tuples",
2105 'GPRINT:pg_n_tup_min:MIN:%4.1lf%s Min,',
2106 'GPRINT:pg_n_tup_avg:AVERAGE:%4.1lf%s Avg,',
2107 'GPRINT:pg_n_tup_max:MAX:%4.1lf%s Max,',
2108 'GPRINT:pg_n_tup_avg:LAST:%4.1lf%s Last'],
2109 pg_numbackends => ['DEF:pg_numbackends_avg={file}:value:AVERAGE',
2110 'DEF:pg_numbackends_min={file}:value:MIN',
2111 'DEF:pg_numbackends_max={file}:value:MAX',
2112 "AREA:pg_numbackends_max#$HalfBlue",
2113 "AREA:pg_numbackends_min#$Canvas",
2114 "LINE1:pg_numbackends_avg#$FullBlue:Backends",
2115 'GPRINT:pg_numbackends_min:MIN:%4.1lf%s Min,',
2116 'GPRINT:pg_numbackends_avg:AVERAGE:%4.1lf%s Avg,',
2117 'GPRINT:pg_numbackends_max:MAX:%4.1lf%s Max,',
2118 'GPRINT:pg_numbackends_avg:LAST:%4.1lf%s Last'],
2119 pg_scan => ['DEF:pg_scan_avg={file}:value:AVERAGE',
2120 'DEF:pg_scan_min={file}:value:MIN',
2121 'DEF:pg_scan_max={file}:value:MAX',
2122 "AREA:pg_scan_max#$HalfBlue",
2123 "AREA:pg_scan_min#$Canvas",
2124 "LINE1:pg_scan_avg#$FullBlue:Scans",
2125 'GPRINT:pg_scan_min:MIN:%4.1lf%s Min,',
2126 'GPRINT:pg_scan_avg:AVERAGE:%4.1lf%s Avg,',
2127 'GPRINT:pg_scan_max:MAX:%4.1lf%s Max,',
2128 'GPRINT:pg_scan_avg:LAST:%4.1lf%s Last'],
2129 pg_xact => ['DEF:pg_xact_avg={file}:value:AVERAGE',
2130 'DEF:pg_xact_min={file}:value:MIN',
2131 'DEF:pg_xact_max={file}:value:MAX',
2132 "AREA:pg_xact_max#$HalfBlue",
2133 "AREA:pg_xact_min#$Canvas",
2134 "LINE1:pg_xact_avg#$FullBlue:Transactions",
2135 'GPRINT:pg_xact_min:MIN:%4.1lf%s Min,',
2136 'GPRINT:pg_xact_avg:AVERAGE:%4.1lf%s Avg,',
2137 'GPRINT:pg_xact_max:MAX:%4.1lf%s Max,',
2138 'GPRINT:pg_xact_avg:LAST:%4.1lf%s Last'],
2139 power => ['-v', 'Watt',
2140 'DEF:avg={file}:value:AVERAGE',
2141 'DEF:min={file}:value:MIN',
2142 'DEF:max={file}:value:MAX',
2143 "AREA:max#$HalfBlue",
2145 "LINE1:avg#$FullBlue:Watt",
2146 'GPRINT:min:MIN:%5.1lf%sW Min,',
2147 'GPRINT:avg:AVERAGE:%5.1lf%sW Avg,',
2148 'GPRINT:max:MAX:%5.1lf%sW Max,',
2149 'GPRINT:avg:LAST:%5.1lf%sW Last\l'
2152 "DEF:running_avg={file}:running:AVERAGE",
2153 "DEF:running_min={file}:running:MIN",
2154 "DEF:running_max={file}:running:MAX",
2155 "DEF:sleeping_avg={file}:sleeping:AVERAGE",
2156 "DEF:sleeping_min={file}:sleeping:MIN",
2157 "DEF:sleeping_max={file}:sleeping:MAX",
2158 "DEF:zombies_avg={file}:zombies:AVERAGE",
2159 "DEF:zombies_min={file}:zombies:MIN",
2160 "DEF:zombies_max={file}:zombies:MAX",
2161 "DEF:stopped_avg={file}:stopped:AVERAGE",
2162 "DEF:stopped_min={file}:stopped:MIN",
2163 "DEF:stopped_max={file}:stopped:MAX",
2164 "DEF:paging_avg={file}:paging:AVERAGE",
2165 "DEF:paging_min={file}:paging:MIN",
2166 "DEF:paging_max={file}:paging:MAX",
2167 "DEF:blocked_avg={file}:blocked:AVERAGE",
2168 "DEF:blocked_min={file}:blocked:MIN",
2169 "DEF:blocked_max={file}:blocked:MAX",
2170 'CDEF:paging_acc=sleeping_avg,running_avg,stopped_avg,zombies_avg,blocked_avg,paging_avg,+,+,+,+,+',
2171 'CDEF:blocked_acc=sleeping_avg,running_avg,stopped_avg,zombies_avg,blocked_avg,+,+,+,+',
2172 'CDEF:zombies_acc=sleeping_avg,running_avg,stopped_avg,zombies_avg,+,+,+',
2173 'CDEF:stopped_acc=sleeping_avg,running_avg,stopped_avg,+,+',
2174 'CDEF:running_acc=sleeping_avg,running_avg,+',
2175 'CDEF:sleeping_acc=sleeping_avg',
2176 "AREA:paging_acc#$HalfYellow",
2177 "AREA:blocked_acc#$HalfCyan",
2178 "AREA:zombies_acc#$HalfRed",
2179 "AREA:stopped_acc#$HalfMagenta",
2180 "AREA:running_acc#$HalfGreen",
2181 "AREA:sleeping_acc#$HalfBlue",
2182 "LINE1:paging_acc#$FullYellow:Paging ",
2183 'GPRINT:paging_min:MIN:%5.1lf Min,',
2184 'GPRINT:paging_avg:AVERAGE:%5.1lf Average,',
2185 'GPRINT:paging_max:MAX:%5.1lf Max,',
2186 'GPRINT:paging_avg:LAST:%5.1lf Last\l',
2187 "LINE1:blocked_acc#$FullCyan:Blocked ",
2188 'GPRINT:blocked_min:MIN:%5.1lf Min,',
2189 'GPRINT:blocked_avg:AVERAGE:%5.1lf Average,',
2190 'GPRINT:blocked_max:MAX:%5.1lf Max,',
2191 'GPRINT:blocked_avg:LAST:%5.1lf Last\l',
2192 "LINE1:zombies_acc#$FullRed:Zombies ",
2193 'GPRINT:zombies_min:MIN:%5.1lf Min,',
2194 'GPRINT:zombies_avg:AVERAGE:%5.1lf Average,',
2195 'GPRINT:zombies_max:MAX:%5.1lf Max,',
2196 'GPRINT:zombies_avg:LAST:%5.1lf Last\l',
2197 "LINE1:stopped_acc#$FullMagenta:Stopped ",
2198 'GPRINT:stopped_min:MIN:%5.1lf Min,',
2199 'GPRINT:stopped_avg:AVERAGE:%5.1lf Average,',
2200 'GPRINT:stopped_max:MAX:%5.1lf Max,',
2201 'GPRINT:stopped_avg:LAST:%5.1lf Last\l',
2202 "LINE1:running_acc#$FullGreen:Running ",
2203 'GPRINT:running_min:MIN:%5.1lf Min,',
2204 'GPRINT:running_avg:AVERAGE:%5.1lf Average,',
2205 'GPRINT:running_max:MAX:%5.1lf Max,',
2206 'GPRINT:running_avg:LAST:%5.1lf Last\l',
2207 "LINE1:sleeping_acc#$FullBlue:Sleeping",
2208 'GPRINT:sleeping_min:MIN:%5.1lf Min,',
2209 'GPRINT:sleeping_avg:AVERAGE:%5.1lf Average,',
2210 'GPRINT:sleeping_max:MAX:%5.1lf Max,',
2211 'GPRINT:sleeping_avg:LAST:%5.1lf Last\l'
2213 ps_count => ['-v', 'Processes',
2214 'DEF:procs_avg={file}:processes:AVERAGE',
2215 'DEF:procs_min={file}:processes:MIN',
2216 'DEF:procs_max={file}:processes:MAX',
2217 'DEF:thrds_avg={file}:threads:AVERAGE',
2218 'DEF:thrds_min={file}:threads:MIN',
2219 'DEF:thrds_max={file}:threads:MAX',
2220 "AREA:thrds_avg#$HalfBlue",
2221 "AREA:procs_avg#$HalfRed",
2222 "LINE1:thrds_avg#$FullBlue:Threads ",
2223 'GPRINT:thrds_min:MIN:%5.1lf Min,',
2224 'GPRINT:thrds_avg:AVERAGE:%5.1lf Avg,',
2225 'GPRINT:thrds_max:MAX:%5.1lf Max,',
2226 'GPRINT:thrds_avg:LAST:%5.1lf Last\l',
2227 "LINE1:procs_avg#$FullRed:Processes",
2228 'GPRINT:procs_min:MIN:%5.1lf Min,',
2229 'GPRINT:procs_avg:AVERAGE:%5.1lf Avg,',
2230 'GPRINT:procs_max:MAX:%5.1lf Max,',
2231 'GPRINT:procs_avg:LAST:%5.1lf Last\l'
2233 ps_cputime => ['-v', 'Jiffies',
2234 'DEF:user_avg_raw={file}:user:AVERAGE',
2235 'DEF:user_min_raw={file}:user:MIN',
2236 'DEF:user_max_raw={file}:user:MAX',
2237 'DEF:syst_avg_raw={file}:syst:AVERAGE',
2238 'DEF:syst_min_raw={file}:syst:MIN',
2239 'DEF:syst_max_raw={file}:syst:MAX',
2240 'CDEF:user_avg=user_avg_raw,1000000,/',
2241 'CDEF:user_min=user_min_raw,1000000,/',
2242 'CDEF:user_max=user_max_raw,1000000,/',
2243 'CDEF:syst_avg=syst_avg_raw,1000000,/',
2244 'CDEF:syst_min=syst_min_raw,1000000,/',
2245 'CDEF:syst_max=syst_max_raw,1000000,/',
2246 'CDEF:user_syst=syst_avg,UN,0,syst_avg,IF,user_avg,+',
2247 "AREA:user_syst#$HalfBlue",
2248 "AREA:syst_avg#$HalfRed",
2249 "LINE1:user_syst#$FullBlue:User ",
2250 'GPRINT:user_min:MIN:%5.1lf%s Min,',
2251 'GPRINT:user_avg:AVERAGE:%5.1lf%s Avg,',
2252 'GPRINT:user_max:MAX:%5.1lf%s Max,',
2253 'GPRINT:user_avg:LAST:%5.1lf%s Last\l',
2254 "LINE1:syst_avg#$FullRed:System",
2255 'GPRINT:syst_min:MIN:%5.1lf%s Min,',
2256 'GPRINT:syst_avg:AVERAGE:%5.1lf%s Avg,',
2257 'GPRINT:syst_max:MAX:%5.1lf%s Max,',
2258 'GPRINT:syst_avg:LAST:%5.1lf%s Last\l'
2260 ps_pagefaults => ['-v', 'Pagefaults/s',
2261 'DEF:minor_avg={file}:minflt:AVERAGE',
2262 'DEF:minor_min={file}:minflt:MIN',
2263 'DEF:minor_max={file}:minflt:MAX',
2264 'DEF:major_avg={file}:majflt:AVERAGE',
2265 'DEF:major_min={file}:majflt:MIN',
2266 'DEF:major_max={file}:majflt:MAX',
2267 'CDEF:minor_major=major_avg,UN,0,major_avg,IF,minor_avg,+',
2268 "AREA:minor_major#$HalfBlue",
2269 "AREA:major_avg#$HalfRed",
2270 "LINE1:minor_major#$FullBlue:Minor",
2271 'GPRINT:minor_min:MIN:%5.1lf%s Min,',
2272 'GPRINT:minor_avg:AVERAGE:%5.1lf%s Avg,',
2273 'GPRINT:minor_max:MAX:%5.1lf%s Max,',
2274 'GPRINT:minor_avg:LAST:%5.1lf%s Last\l',
2275 "LINE1:major_avg#$FullRed:Major",
2276 'GPRINT:major_min:MIN:%5.1lf%s Min,',
2277 'GPRINT:major_avg:AVERAGE:%5.1lf%s Avg,',
2278 'GPRINT:major_max:MAX:%5.1lf%s Max,',
2279 'GPRINT:major_avg:LAST:%5.1lf%s Last\l'
2281 ps_rss => ['-v', 'Bytes',
2282 'DEF:avg={file}:value:AVERAGE',
2283 'DEF:min={file}:value:MIN',
2284 'DEF:max={file}:value:MAX',
2285 "AREA:avg#$HalfBlue",
2286 "LINE1:avg#$FullBlue:RSS",
2287 'GPRINT:min:MIN:%5.1lf%s Min,',
2288 'GPRINT:avg:AVERAGE:%5.1lf%s Avg,',
2289 'GPRINT:max:MAX:%5.1lf%s Max,',
2290 'GPRINT:avg:LAST:%5.1lf%s Last\l'
2292 ps_state => ['-v', 'Processes',
2293 'DEF:avg={file}:value:AVERAGE',
2294 'DEF:min={file}:value:MIN',
2295 'DEF:max={file}:value:MAX',
2296 "AREA:max#$HalfBlue",
2298 "LINE1:avg#$FullBlue:Processes",
2299 'GPRINT:min:MIN:%6.2lf Min,',
2300 'GPRINT:avg:AVERAGE:%6.2lf Avg,',
2301 'GPRINT:max:MAX:%6.2lf Max,',
2302 'GPRINT:avg:LAST:%6.2lf Last\l'
2304 signal_noise => ['-v', 'dBm',
2305 'DEF:avg={file}:value:AVERAGE',
2306 'DEF:min={file}:value:MIN',
2307 'DEF:max={file}:value:MAX',
2308 "AREA:max#$HalfBlue",
2310 "LINE1:avg#$FullBlue:Noise",
2311 'GPRINT:min:MIN:%5.1lf%sdBm Min,',
2312 'GPRINT:avg:AVERAGE:%5.1lf%sdBm Avg,',
2313 'GPRINT:max:MAX:%5.1lf%sdBm Max,',
2314 'GPRINT:avg:LAST:%5.1lf%sdBm Last\l'
2316 signal_power => ['-v', 'dBm',
2317 'DEF:avg={file}:value:AVERAGE',
2318 'DEF:min={file}:value:MIN',
2319 'DEF:max={file}:value:MAX',
2320 "AREA:max#$HalfBlue",
2322 "LINE1:avg#$FullBlue:Power",
2323 'GPRINT:min:MIN:%5.1lf%sdBm Min,',
2324 'GPRINT:avg:AVERAGE:%5.1lf%sdBm Avg,',
2325 'GPRINT:max:MAX:%5.1lf%sdBm Max,',
2326 'GPRINT:avg:LAST:%5.1lf%sdBm Last\l'
2328 signal_quality => ['-v', '%',
2329 'DEF:avg={file}:value:AVERAGE',
2330 'DEF:min={file}:value:MIN',
2331 'DEF:max={file}:value:MAX',
2332 "AREA:max#$HalfBlue",
2334 "LINE1:avg#$FullBlue:Quality",
2335 'GPRINT:min:MIN:%5.1lf%s%% Min,',
2336 'GPRINT:avg:AVERAGE:%5.1lf%s%% Avg,',
2337 'GPRINT:max:MAX:%5.1lf%s%% Max,',
2338 'GPRINT:avg:LAST:%5.1lf%s%% Last\l'
2340 swap => ['-v', 'Bytes', '-b', '1024',
2341 'DEF:avg={file}:value:AVERAGE',
2342 'DEF:min={file}:value:MIN',
2343 'DEF:max={file}:value:MAX',
2344 "AREA:max#$HalfBlue",
2346 "LINE1:avg#$FullBlue:Bytes",
2347 'GPRINT:min:MIN:%6.2lf%sByte Min,',
2348 'GPRINT:avg:AVERAGE:%6.2lf%sByte Avg,',
2349 'GPRINT:max:MAX:%6.2lf%sByte Max,',
2350 'GPRINT:avg:LAST:%6.2lf%sByte Last\l'
2353 'DEF:used_avg={file}:used:AVERAGE',
2354 'DEF:used_min={file}:used:MIN',
2355 'DEF:used_max={file}:used:MAX',
2356 'DEF:free_avg={file}:free:AVERAGE',
2357 'DEF:free_min={file}:free:MIN',
2358 'DEF:free_max={file}:free:MAX',
2359 'DEF:cach_avg={file}:cached:AVERAGE',
2360 'DEF:cach_min={file}:cached:MIN',
2361 'DEF:cach_max={file}:cached:MAX',
2362 'DEF:resv_avg={file}:resv:AVERAGE',
2363 'DEF:resv_min={file}:resv:MIN',
2364 'DEF:resv_max={file}:resv:MAX',
2365 'CDEF:cach_avg_notnull=cach_avg,UN,0,cach_avg,IF',
2366 'CDEF:resv_avg_notnull=resv_avg,UN,0,resv_avg,IF',
2367 'CDEF:used_acc=used_avg',
2368 'CDEF:resv_acc=used_acc,resv_avg_notnull,+',
2369 'CDEF:cach_acc=resv_acc,cach_avg_notnull,+',
2370 'CDEF:free_acc=cach_acc,free_avg,+',
2371 "AREA:free_acc#$HalfGreen",
2372 "AREA:cach_acc#$HalfBlue",
2373 "AREA:resv_acc#$HalfYellow",
2374 "AREA:used_acc#$HalfRed",
2375 "LINE1:free_acc#$FullGreen:Free ",
2376 'GPRINT:free_min:MIN:%5.1lf%s Min,',
2377 'GPRINT:free_avg:AVERAGE:%5.1lf%s Avg,',
2378 'GPRINT:free_max:MAX:%5.1lf%s Max,',
2379 'GPRINT:free_avg:LAST:%5.1lf%s Last\n',
2380 "LINE1:cach_acc#$FullBlue:Cached ",
2381 'GPRINT:cach_min:MIN:%5.1lf%s Min,',
2382 'GPRINT:cach_avg:AVERAGE:%5.1lf%s Avg,',
2383 'GPRINT:cach_max:MAX:%5.1lf%s Max,',
2384 'GPRINT:cach_avg:LAST:%5.1lf%s Last\l',
2385 "LINE1:resv_acc#$FullYellow:Reserved",
2386 'GPRINT:resv_min:MIN:%5.1lf%s Min,',
2387 'GPRINT:resv_avg:AVERAGE:%5.1lf%s Avg,',
2388 'GPRINT:resv_max:MAX:%5.1lf%s Max,',
2389 'GPRINT:resv_avg:LAST:%5.1lf%s Last\n',
2390 "LINE1:used_acc#$FullRed:Used ",
2391 'GPRINT:used_min:MIN:%5.1lf%s Min,',
2392 'GPRINT:used_avg:AVERAGE:%5.1lf%s Avg,',
2393 'GPRINT:used_max:MAX:%5.1lf%s Max,',
2394 'GPRINT:used_avg:LAST:%5.1lf%s Last\l'
2396 tcp_connections => ['-v', 'Connections',
2397 'DEF:avg={file}:value:AVERAGE',
2398 'DEF:min={file}:value:MIN',
2399 'DEF:max={file}:value:MAX',
2400 "AREA:max#$HalfBlue",
2402 "LINE1:avg#$FullBlue:Connections",
2403 'GPRINT:min:MIN:%4.1lf Min,',
2404 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
2405 'GPRINT:max:MAX:%4.1lf Max,',
2406 'GPRINT:avg:LAST:%4.1lf Last\l'
2408 temperature => ['-v', 'Celsius',
2409 'DEF:temp_avg={file}:value:AVERAGE',
2410 'DEF:temp_min={file}:value:MIN',
2411 'DEF:temp_max={file}:value:MAX',
2412 'CDEF:average=temp_avg,0.2,*,PREV,UN,temp_avg,PREV,IF,0.8,*,+',
2413 "AREA:temp_max#$HalfRed",
2414 "AREA:temp_min#$Canvas",
2415 "LINE1:temp_avg#$FullRed:Temperature",
2416 'GPRINT:temp_min:MIN:%4.1lf Min,',
2417 'GPRINT:temp_avg:AVERAGE:%4.1lf Avg,',
2418 'GPRINT:temp_max:MAX:%4.1lf Max,',
2419 'GPRINT:temp_avg:LAST:%4.1lf Last\l'
2421 timeleft => ['-v', 'Minutes',
2422 'DEF:avg={file}:timeleft:AVERAGE',
2423 'DEF:min={file}:timeleft:MIN',
2424 'DEF:max={file}:timeleft:MAX',
2425 "AREA:max#$HalfBlue",
2427 "LINE1:avg#$FullBlue:Time left [min]",
2428 'GPRINT:min:MIN:%5.1lf%s Min,',
2429 'GPRINT:avg:AVERAGE:%5.1lf%s Avg,',
2430 'GPRINT:max:MAX:%5.1lf%s Max,',
2431 'GPRINT:avg:LAST:%5.1lf%s Last\l'
2433 time_offset => [ # NTPd
2434 'DEF:s_avg={file}:seconds:AVERAGE',
2435 'DEF:s_min={file}:seconds:MIN',
2436 'DEF:s_max={file}:seconds:MAX',
2437 "AREA:s_max#$HalfBlue",
2438 "AREA:s_min#$Canvas",
2439 "LINE1:s_avg#$FullBlue:{inst}",
2440 'GPRINT:s_min:MIN:%7.3lf%s Min,',
2441 'GPRINT:s_avg:AVERAGE:%7.3lf%s Avg,',
2442 'GPRINT:s_max:MAX:%7.3lf%s Max,',
2443 'GPRINT:s_avg:LAST:%7.3lf%s Last'
2445 if_octets => ['-v', 'Bits/s', '-l', '0',
2446 'DEF:out_min_raw={file}:tx:MIN',
2447 'DEF:out_avg_raw={file}:tx:AVERAGE',
2448 'DEF:out_max_raw={file}:tx:MAX',
2449 'DEF:inc_min_raw={file}:rx:MIN',
2450 'DEF:inc_avg_raw={file}:rx:AVERAGE',
2451 'DEF:inc_max_raw={file}:rx:MAX',
2452 'CDEF:out_min=out_min_raw,8,*',
2453 'CDEF:out_avg=out_avg_raw,8,*',
2454 'CDEF:out_max=out_max_raw,8,*',
2455 'CDEF:inc_min=inc_min_raw,8,*',
2456 'CDEF:inc_avg=inc_avg_raw,8,*',
2457 'CDEF:inc_max=inc_max_raw,8,*',
2458 'CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF',
2459 'CDEF:mytime=out_avg_raw,TIME,TIME,IF',
2460 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
2461 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
2462 'CDEF:out_avg_sample=out_avg_raw,UN,0,out_avg_raw,IF,sample_len,*',
2463 'CDEF:out_avg_sum=PREV,UN,0,PREV,IF,out_avg_sample,+',
2464 'CDEF:inc_avg_sample=inc_avg_raw,UN,0,inc_avg_raw,IF,sample_len,*',
2465 'CDEF:inc_avg_sum=PREV,UN,0,PREV,IF,inc_avg_sample,+',
2466 "AREA:out_avg#$HalfGreen",
2467 "AREA:inc_avg#$HalfBlue",
2468 "AREA:overlap#$HalfBlueGreen",
2469 "LINE1:out_avg#$FullGreen:Outgoing",
2470 'GPRINT:out_avg:AVERAGE:%5.1lf%s Avg,',
2471 'GPRINT:out_max:MAX:%5.1lf%s Max,',
2472 'GPRINT:out_avg:LAST:%5.1lf%s Last',
2473 'GPRINT:out_avg_sum:LAST:(ca. %5.1lf%sB Total)\l',
2474 "LINE1:inc_avg#$FullBlue:Incoming",
2475 #'GPRINT:inc_min:MIN:%5.1lf %s Min,',
2476 'GPRINT:inc_avg:AVERAGE:%5.1lf%s Avg,',
2477 'GPRINT:inc_max:MAX:%5.1lf%s Max,',
2478 'GPRINT:inc_avg:LAST:%5.1lf%s Last',
2479 'GPRINT:inc_avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
2482 'DEF:cpufreq_avg={file}:value:AVERAGE',
2483 'DEF:cpufreq_min={file}:value:MIN',
2484 'DEF:cpufreq_max={file}:value:MAX',
2485 "AREA:cpufreq_max#$HalfBlue",
2486 "AREA:cpufreq_min#$Canvas",
2487 "LINE1:cpufreq_avg#$FullBlue:Frequency",
2488 'GPRINT:cpufreq_min:MIN:%5.1lf%s Min,',
2489 'GPRINT:cpufreq_avg:AVERAGE:%5.1lf%s Avg,',
2490 'GPRINT:cpufreq_max:MAX:%5.1lf%s Max,',
2491 'GPRINT:cpufreq_avg:LAST:%5.1lf%s Last\l'
2494 'DEF:multimeter_avg={file}:value:AVERAGE',
2495 'DEF:multimeter_min={file}:value:MIN',
2496 'DEF:multimeter_max={file}:value:MAX',
2497 "AREA:multimeter_max#$HalfBlue",
2498 "AREA:multimeter_min#$Canvas",
2499 "LINE1:multimeter_avg#$FullBlue:Multimeter",
2500 'GPRINT:multimeter_min:MIN:%4.1lf Min,',
2501 'GPRINT:multimeter_avg:AVERAGE:%4.1lf Average,',
2502 'GPRINT:multimeter_max:MAX:%4.1lf Max,',
2503 'GPRINT:multimeter_avg:LAST:%4.1lf Last\l'
2505 users => ['-v', 'Users',
2506 'DEF:users_avg={file}:users:AVERAGE',
2507 'DEF:users_min={file}:users:MIN',
2508 'DEF:users_max={file}:users:MAX',
2509 "AREA:users_max#$HalfBlue",
2510 "AREA:users_min#$Canvas",
2511 "LINE1:users_avg#$FullBlue:Users",
2512 'GPRINT:users_min:MIN:%4.1lf Min,',
2513 'GPRINT:users_avg:AVERAGE:%4.1lf Average,',
2514 'GPRINT:users_max:MAX:%4.1lf Max,',
2515 'GPRINT:users_avg:LAST:%4.1lf Last\l'
2517 voltage => ['-v', 'Voltage',
2518 'DEF:avg={file}:value:AVERAGE',
2519 'DEF:min={file}:value:MIN',
2520 'DEF:max={file}:value:MAX',
2521 "AREA:max#$HalfBlue",
2523 "LINE1:avg#$FullBlue:Voltage",
2524 'GPRINT:min:MIN:%5.1lf%sV Min,',
2525 'GPRINT:avg:AVERAGE:%5.1lf%sV Avg,',
2526 'GPRINT:max:MAX:%5.1lf%sV Max,',
2527 'GPRINT:avg:LAST:%5.1lf%sV Last\l'
2530 "DEF:avg={file}:value:AVERAGE",
2531 "DEF:min={file}:value:MIN",
2532 "DEF:max={file}:value:MAX",
2533 "AREA:max#$HalfBlue",
2535 "LINE1:avg#$FullBlue:Threads",
2536 'GPRINT:min:MIN:%5.1lf Min,',
2537 'GPRINT:avg:AVERAGE:%5.1lf Avg.,',
2538 'GPRINT:max:MAX:%5.1lf Max,',
2539 'GPRINT:avg:LAST:%5.1lf Last\l',
2541 vs_memory => ['-b', '1024', '-v', 'Bytes',
2542 "DEF:avg={file}:value:AVERAGE",
2543 "DEF:min={file}:value:MIN",
2544 "DEF:max={file}:value:MAX",
2545 "AREA:max#$HalfBlue",
2547 "LINE1:avg#$FullBlue:",
2548 'GPRINT:min:MIN:%5.1lf%sbytes Min,',
2549 'GPRINT:avg:AVERAGE:%5.1lf%sbytes Avg.,',
2550 'GPRINT:max:MAX:%5.1lf%sbytes Max,',
2551 'GPRINT:avg:LAST:%5.1lf%sbytes Last\l',
2554 "DEF:avg={file}:value:AVERAGE",
2555 "DEF:min={file}:value:MIN",
2556 "DEF:max={file}:value:MAX",
2557 "AREA:max#$HalfBlue",
2559 "LINE1:avg#$FullBlue:Processes",
2560 'GPRINT:min:MIN:%5.1lf Min,',
2561 'GPRINT:avg:AVERAGE:%5.1lf Avg.,',
2562 'GPRINT:max:MAX:%5.1lf Max,',
2563 'GPRINT:avg:LAST:%5.1lf Last\l',
2565 vmpage_number => ['-v', 'Pages',
2566 'DEF:avg={file}:value:AVERAGE',
2567 'DEF:min={file}:value:MIN',
2568 'DEF:max={file}:value:MAX',
2569 "AREA:max#$HalfBlue",
2571 "LINE1:avg#$FullBlue:Number",
2572 'GPRINT:min:MIN:%4.1lf Min,',
2573 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
2574 'GPRINT:max:MAX:%4.1lf Max,',
2575 'GPRINT:avg:LAST:%4.1lf Last\l'
2578 "DEF:minf_avg={file}:minflt:AVERAGE",
2579 "DEF:minf_min={file}:minflt:MIN",
2580 "DEF:minf_max={file}:minflt:MAX",
2581 "DEF:majf_avg={file}:majflt:AVERAGE",
2582 "DEF:majf_min={file}:majflt:MIN",
2583 "DEF:majf_max={file}:majflt:MAX",
2584 'CDEF:overlap=majf_avg,minf_avg,GT,minf_avg,majf_avg,IF',
2585 "AREA:majf_avg#$HalfGreen",
2586 "AREA:minf_avg#$HalfBlue",
2587 "AREA:overlap#$HalfBlueGreen",
2588 "LINE1:majf_avg#$FullGreen:Major",
2589 'GPRINT:majf_min:MIN:%5.1lf%s Min,',
2590 'GPRINT:majf_avg:AVERAGE:%5.1lf%s Avg,',
2591 'GPRINT:majf_max:MAX:%5.1lf%s Max,',
2592 'GPRINT:majf_avg:LAST:%5.1lf%s Last\l',
2593 "LINE1:minf_avg#$FullBlue:Minor",
2594 'GPRINT:minf_min:MIN:%5.1lf%s Min,',
2595 'GPRINT:minf_avg:AVERAGE:%5.1lf%s Avg,',
2596 'GPRINT:minf_max:MAX:%5.1lf%s Max,',
2597 'GPRINT:minf_avg:LAST:%5.1lf%s Last\l'
2600 "DEF:rpag_avg={file}:in:AVERAGE",
2601 "DEF:rpag_min={file}:in:MIN",
2602 "DEF:rpag_max={file}:in:MAX",
2603 "DEF:wpag_avg={file}:out:AVERAGE",
2604 "DEF:wpag_min={file}:out:MIN",
2605 "DEF:wpag_max={file}:out:MAX",
2606 'CDEF:overlap=wpag_avg,rpag_avg,GT,rpag_avg,wpag_avg,IF',
2607 "AREA:wpag_avg#$HalfGreen",
2608 "AREA:rpag_avg#$HalfBlue",
2609 "AREA:overlap#$HalfBlueGreen",
2610 "LINE1:wpag_avg#$FullGreen:OUT",
2611 'GPRINT:wpag_min:MIN:%5.1lf%s Min,',
2612 'GPRINT:wpag_avg:AVERAGE:%5.1lf%s Avg,',
2613 'GPRINT:wpag_max:MAX:%5.1lf%s Max,',
2614 'GPRINT:wpag_avg:LAST:%5.1lf%s Last\l',
2615 "LINE1:rpag_avg#$FullBlue:IN ",
2616 'GPRINT:rpag_min:MIN:%5.1lf%s Min,',
2617 'GPRINT:rpag_avg:AVERAGE:%5.1lf%s Avg,',
2618 'GPRINT:rpag_max:MAX:%5.1lf%s Max,',
2619 'GPRINT:rpag_avg:LAST:%5.1lf%s Last\l'
2621 vmpage_action => ['-v', 'Pages',
2622 'DEF:avg={file}:value:AVERAGE',
2623 'DEF:min={file}:value:MIN',
2624 'DEF:max={file}:value:MAX',
2625 "AREA:max#$HalfBlue",
2627 "LINE1:avg#$FullBlue:Number",
2628 'GPRINT:min:MIN:%4.1lf Min,',
2629 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
2630 'GPRINT:max:MAX:%4.1lf Max,',
2631 'GPRINT:avg:LAST:%4.1lf Last\l'
2633 virt_cpu_total => ['-v', 'Milliseconds',
2634 'DEF:avg_raw={file}:ns:AVERAGE',
2635 'DEF:min_raw={file}:ns:MIN',
2636 'DEF:max_raw={file}:ns:MAX',
2637 'CDEF:avg=avg_raw,1000000,/',
2638 'CDEF:min=min_raw,1000000,/',
2639 'CDEF:max=max_raw,1000000,/',
2640 "AREA:avg#$HalfBlue",
2641 "LINE1:avg#$FullBlue:CPU time",
2642 'GPRINT:min:MIN:%4.1lf Min,',
2643 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
2644 'GPRINT:max:MAX:%4.1lf Max,',
2645 'GPRINT:avg:LAST:%4.1lf Last\l'
2648 $GraphDefs->{'if_multicast'} = $GraphDefs->{'ipt_packets'};
2649 $GraphDefs->{'if_tx_errors'} = $GraphDefs->{'if_rx_errors'};
2650 $GraphDefs->{'dns_qtype'} = $GraphDefs->{'dns_opcode'};
2651 $GraphDefs->{'dns_rcode'} = $GraphDefs->{'dns_opcode'};
2652 $GraphDefs->{'vmpage_io-memory'} = $GraphDefs->{'vmpage_io'};
2653 $GraphDefs->{'vmpage_io-swap'} = $GraphDefs->{'vmpage_io'};
2654 $GraphDefs->{'virt_cpu_total'} = $GraphDefs->{'virt_cpu_total'};
2656 $MetaGraphDefs->{'cpu'} = \&meta_graph_cpu;
2657 $MetaGraphDefs->{'dns_qtype'} = \&meta_graph_dns;
2658 $MetaGraphDefs->{'dns_rcode'} = \&meta_graph_dns;
2659 $MetaGraphDefs->{'if_rx_errors'} = \&meta_graph_if_rx_errors;
2660 $MetaGraphDefs->{'if_tx_errors'} = \&meta_graph_if_rx_errors;
2661 $MetaGraphDefs->{'memory'} = \&meta_graph_memory;
2662 $MetaGraphDefs->{'nfs_procedure'} = \&meta_graph_nfs_procedure;
2663 $MetaGraphDefs->{'ps_state'} = \&meta_graph_ps_state;
2664 $MetaGraphDefs->{'swap'} = \&meta_graph_swap;
2665 $MetaGraphDefs->{'mysql_commands'} = \&meta_graph_mysql_commands;
2666 $MetaGraphDefs->{'mysql_handler'} = \&meta_graph_mysql_commands;
2667 $MetaGraphDefs->{'tcp_connections'} = \&meta_graph_tcp_connections;
2668 $MetaGraphDefs->{'vmpage_number'} = \&meta_graph_vmpage_number;
2669 $MetaGraphDefs->{'vmpage_action'} = \&meta_graph_vmpage_action;
2670 } # load_graph_definitions
2672 sub meta_graph_generic_stack
2674 confess ("Wrong number of arguments") if (@_ != 2);
2677 my $sources = shift;
2680 my $timespan_str = _get_param_timespan ();
2681 my $timespan_int = (-1) * $ValidTimespan->{$timespan_str};
2683 $opts->{'title'} ||= 'Unknown title';
2684 $opts->{'rrd_opts'} ||= [];
2685 $opts->{'colors'} ||= {};
2687 my @cmd = ('-', '-a', 'PNG', '-s', $timespan_int,
2688 '-t', $opts->{'title'} || 'Unknown title',
2689 @RRDDefaultArgs, @{$opts->{'rrd_opts'}});
2691 my $max_inst_name = 0;
2694 for ($i = 0; $i < @$sources; $i++)
2696 my $tmp = $sources->[$i]->{'name'};
2697 $tmp =~ tr/A-Za-z0-9\-_/_/c;
2698 $vnames[$i] = $i . $tmp;
2701 for ($i = 0; $i < @$sources; $i++)
2703 my $inst_data = $sources->[$i];
2704 my $inst_name = $inst_data->{'name'} || confess;
2705 my $file = $inst_data->{'file'} || confess;
2706 my $vname = $vnames[$i];
2708 if (length ($inst_name) > $max_inst_name)
2710 $max_inst_name = length ($inst_name);
2713 confess ("No such file: $file") if (!-e $file);
2716 qq#DEF:${vname}_min=$file:value:MIN#,
2717 qq#DEF:${vname}_avg=$file:value:AVERAGE#,
2718 qq#DEF:${vname}_max=$file:value:MAX#,
2719 qq#CDEF:${vname}_nnl=${vname}_avg,UN,0,${vname}_avg,IF#);
2723 my $vname = $vnames[@vnames - 1];
2725 push (@cmd, qq#CDEF:${vname}_stk=${vname}_nnl#);
2727 for (my $i = 1; $i < @$sources; $i++)
2729 my $vname0 = $vnames[@vnames - ($i + 1)];
2730 my $vname1 = $vnames[@vnames - $i];
2732 push (@cmd, qq#CDEF:${vname0}_stk=${vname0}_nnl,${vname1}_stk,+#);
2735 for (my $i = 0; $i < @$sources; $i++)
2737 my $inst_data = $sources->[$i];
2738 my $inst_name = $inst_data->{'name'};
2740 my $vname = $vnames[$i];
2742 my $legend = sprintf ('%-*s', $max_inst_name, $inst_name);
2747 my $number_format = $opts->{'number_format'} || '%6.1lf';
2749 if (exists ($opts->{'colors'}{$inst_name}))
2751 $line_color = $opts->{'colors'}{$inst_name};
2752 $area_color = _string_to_color ($line_color);
2756 $area_color = _get_random_color ();
2757 $line_color = _color_to_string ($area_color);
2759 $area_color = _color_to_string (_get_faded_color ($area_color));
2761 push (@cmd, qq(AREA:${vname}_stk#$area_color),
2762 qq(LINE1:${vname}_stk#$line_color:$legend),
2763 qq(GPRINT:${vname}_min:MIN:$number_format Min,),
2764 qq(GPRINT:${vname}_avg:AVERAGE:$number_format Avg,),
2765 qq(GPRINT:${vname}_max:MAX:$number_format Max,),
2766 qq(GPRINT:${vname}_avg:LAST:$number_format Last\\l),
2771 if (my $errmsg = RRDs::error ())
2773 confess ("RRDs::graph: $errmsg");
2775 } # meta_graph_generic_stack
2779 confess ("Wrong number of arguments") if (@_ != 5);
2783 my $plugin_instance = shift;
2785 my $type_instances = shift;
2790 $opts->{'title'} = "$host/$plugin"
2791 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
2793 $opts->{'rrd_opts'} = ['-v', 'Percent'];
2803 'system' => 'ff0000',
2804 'softirq' => 'ff00ff',
2805 'interrupt' => 'a000a0',
2809 _custom_sort_arrayref ($type_instances,
2810 [qw(idle nice user wait system softirq interrupt steal)]);
2812 for (@$type_instances)
2816 my $title = $opts->{'title'};
2820 if (-e "$_/$title-$inst.rrd")
2822 $file = "$_/$title-$inst.rrd";
2826 confess ("No file found for $title") if ($file eq '');
2834 } # for (@$type_instances)
2836 return (meta_graph_generic_stack ($opts, $sources));
2841 confess ("Wrong number of arguments") if (@_ != 5);
2845 my $plugin_instance = shift;
2847 my $type_instances = shift;
2852 $opts->{'title'} = "$host/$plugin"
2853 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
2855 $opts->{'rrd_opts'} = ['-v', 'Queries/s'];
2859 @$type_instances = sort @$type_instances;
2861 $opts->{'colors'} = _get_n_colors ($type_instances);
2863 for (@$type_instances)
2867 my $title = $opts->{'title'};
2871 if (-e "$_/$title-$inst.rrd")
2873 $file = "$_/$title-$inst.rrd";
2877 confess ("No file found for $title") if ($file eq '');
2885 } # for (@$type_instances)
2887 return (meta_graph_generic_stack ($opts, $sources));
2890 sub meta_graph_memory
2892 confess ("Wrong number of arguments") if (@_ != 5);
2896 my $plugin_instance = shift;
2898 my $type_instances = shift;
2903 $opts->{'title'} = "$host/$plugin"
2904 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
2905 $opts->{'number_format'} = '%5.1lf%s';
2907 $opts->{'rrd_opts'} = ['-b', '1024', '-v', 'Bytes'];
2914 'cached' => '0000ff',
2915 'buffered' => 'ffb000',
2919 _custom_sort_arrayref ($type_instances,
2920 [qw(free cached buffered used)]);
2922 for (@$type_instances)
2926 my $title = $opts->{'title'};
2930 if (-e "$_/$title-$inst.rrd")
2932 $file = "$_/$title-$inst.rrd";
2936 confess ("No file found for $title") if ($file eq '');
2944 } # for (@$type_instances)
2946 return (meta_graph_generic_stack ($opts, $sources));
2947 } # meta_graph_memory
2949 sub meta_graph_if_rx_errors
2951 confess ("Wrong number of arguments") if (@_ != 5);
2955 my $plugin_instance = shift;
2957 my $type_instances = shift;
2962 $opts->{'title'} = "$host/$plugin"
2963 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
2964 $opts->{'number_format'} = '%5.2lf';
2965 $opts->{'rrd_opts'} = ['-v', 'Errors/s'];
2969 for (sort @$type_instances)
2973 my $title = $opts->{'title'};
2977 if (-e "$_/$title-$inst.rrd")
2979 $file = "$_/$title-$inst.rrd";
2983 confess ("No file found for $title") if ($file eq '');
2991 } # for (@$type_instances)
2993 return (meta_graph_generic_stack ($opts, $sources));
2994 } # meta_graph_if_rx_errors
2996 sub meta_graph_mysql_commands
2998 confess ("Wrong number of arguments") if (@_ != 5);
3002 my $plugin_instance = shift;
3004 my $type_instances = shift;
3009 $opts->{'title'} = "$host/$plugin"
3010 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3011 $opts->{'number_format'} = '%5.2lf';
3015 for (sort @$type_instances)
3019 my $title = $opts->{'title'};
3023 if (-e "$_/$title-$inst.rrd")
3025 $file = "$_/$title-$inst.rrd";
3029 confess ("No file found for $title") if ($file eq '');
3037 } # for (@$type_instances)
3039 return (meta_graph_generic_stack ($opts, $sources));
3040 } # meta_graph_mysql_commands
3042 sub meta_graph_nfs_procedure
3044 confess ("Wrong number of arguments") if (@_ != 5);
3048 my $plugin_instance = shift;
3050 my $type_instances = shift;
3055 $opts->{'title'} = "$host/$plugin"
3056 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3057 $opts->{'number_format'} = '%5.1lf%s';
3061 for (sort @$type_instances)
3065 my $title = $opts->{'title'};
3069 if (-e "$_/$title-$inst.rrd")
3071 $file = "$_/$title-$inst.rrd";
3075 confess ("No file found for $title") if ($file eq '');
3083 } # for (@$type_instances)
3085 return (meta_graph_generic_stack ($opts, $sources));
3086 } # meta_graph_nfs_procedure
3088 sub meta_graph_ps_state
3090 confess ("Wrong number of arguments") if (@_ != 5);
3094 my $plugin_instance = shift;
3096 my $type_instances = shift;
3101 $opts->{'title'} = "$host/$plugin"
3102 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3103 $opts->{'rrd_opts'} = ['-v', 'Processes'];
3109 'Running' => '00e000',
3110 'Sleeping' => '0000ff',
3111 'Paging' => 'ffb000',
3112 'Zombies' => 'ff0000',
3113 'Blocked' => 'ff00ff',
3114 'Stopped' => 'a000a0'
3117 _custom_sort_arrayref ($type_instances,
3118 [qw(paging blocked zombies stopped running sleeping)]);
3120 for (@$type_instances)
3124 my $title = $opts->{'title'};
3128 if (-e "$_/$title-$inst.rrd")
3130 $file = "$_/$title-$inst.rrd";
3134 confess ("No file found for $title") if ($file eq '');
3138 name => ucfirst ($inst),
3142 } # for (@$type_instances)
3144 return (meta_graph_generic_stack ($opts, $sources));
3145 } # meta_graph_ps_state
3149 confess ("Wrong number of arguments") if (@_ != 5);
3153 my $plugin_instance = shift;
3155 my $type_instances = shift;
3160 $opts->{'title'} = "$host/$plugin"
3161 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3162 $opts->{'number_format'} = '%5.1lf%s';
3163 $opts->{'rrd_opts'} = ['-v', 'Bytes'];
3170 'Cached' => '0000ff',
3171 'Reserved' => 'ffb000',
3175 _custom_sort_arrayref ($type_instances,
3176 [qw(free cached reserved used)]);
3178 for (@$type_instances)
3182 my $title = $opts->{'title'};
3186 if (-e "$_/$title-$inst.rrd")
3188 $file = "$_/$title-$inst.rrd";
3192 confess ("No file found for $title") if ($file eq '');
3196 name => ucfirst ($inst),
3200 } # for (@$type_instances)
3202 return (meta_graph_generic_stack ($opts, $sources));
3205 sub meta_graph_tcp_connections
3207 confess ("Wrong number of arguments") if (@_ != 5);
3211 my $plugin_instance = shift;
3213 my $type_instances = shift;
3218 $opts->{'title'} = "$host/$plugin"
3219 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3220 $opts->{'number_format'} = '%6.2lf';
3222 $opts->{'rrd_opts'} = ['-v', 'Connections'];
3228 ESTABLISHED => '00e000',
3229 SYN_SENT => '00e0ff',
3230 SYN_RECV => '00e0a0',
3231 FIN_WAIT1 => 'f000f0',
3232 FIN_WAIT2 => 'f000a0',
3233 TIME_WAIT => 'ffb000',
3235 CLOSE_WAIT => '0000a0',
3236 LAST_ACK => '000080',
3241 _custom_sort_arrayref ($type_instances,
3242 [reverse qw(ESTABLISHED SYN_SENT SYN_RECV FIN_WAIT1 FIN_WAIT2 TIME_WAIT CLOSE
3243 CLOSE_WAIT LAST_ACK CLOSING LISTEN)]);
3245 for (@$type_instances)
3249 my $title = $opts->{'title'};
3253 if (-e "$_/$title-$inst.rrd")
3255 $file = "$_/$title-$inst.rrd";
3259 confess ("No file found for $title") if ($file eq '');
3267 } # for (@$type_instances)
3269 return (meta_graph_generic_stack ($opts, $sources));
3270 } # meta_graph_tcp_connections
3272 sub meta_graph_vmpage_number
3274 confess ("Wrong number of arguments") if (@_ != 5);
3278 my $plugin_instance = shift;
3280 my $type_instances = shift;
3285 $opts->{'title'} = "$host/$plugin"
3286 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3287 $opts->{'number_format'} = '%6.2lf';
3289 $opts->{'rrd_opts'} = ['-v', 'Pages'];
3295 anon_pages => '00e000',
3298 file_pages => 'f000f0',
3300 page_table_pages => 'ffb000',
3302 unstable => '0000a0',
3303 writeback => 'ff0000',
3306 _custom_sort_arrayref ($type_instances,
3307 [reverse qw(anon_pages bounce dirty file_pages mapped page_table_pages slab unstable writeback)]);
3309 for (@$type_instances)
3313 my $title = $opts->{'title'};
3317 if (-e "$_/$title-$inst.rrd")
3319 $file = "$_/$title-$inst.rrd";
3323 confess ("No file found for $title") if ($file eq '');
3331 } # for (@$type_instances)
3333 return (meta_graph_generic_stack ($opts, $sources));
3334 } # meta_graph_vmpage_number
3336 sub meta_graph_vmpage_action
3338 confess ("Wrong number of arguments") if (@_ != 5);
3342 my $plugin_instance = shift;
3344 my $type_instances = shift;
3349 $opts->{'title'} = "$host/$plugin"
3350 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3351 $opts->{'number_format'} = '%6.2lf';
3353 $opts->{'rrd_opts'} = ['-v', 'Pages'];
3359 activate => '00e000',
3360 deactivate => '00e0ff',
3364 scan_direct => 'ffb000',
3365 scan_kswapd => '0000f0',
3369 _custom_sort_arrayref ($type_instances,
3370 [reverse qw(activate deactivate alloc free refill scan_direct scan_kswapd steal)]);
3372 for (@$type_instances)
3376 my $title = $opts->{'title'};
3380 if (-e "$_/$title-$inst.rrd")
3382 $file = "$_/$title-$inst.rrd";
3386 confess ("No file found for $title") if ($file eq '');
3394 } # for (@$type_instances)
3396 return (meta_graph_generic_stack ($opts, $sources));
3397 } # meta_graph_vmpage_action
3398 # vim: shiftwidth=2:softtabstop=2:tabstop=8