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";
27 our @RRDDefaultArgs = ('-w', '400');
32 our $MetaGraphDefs = {};
33 load_graph_definitions ();
35 for (qw(action host plugin plugin_instance type type_instance timespan))
37 $Args->{$_} = param ($_);
45 open ($fh, "< $Config") or confess ("open ($Config): $!");
46 while (my $line = <$fh>)
50 next if ($line =~ m/^\s*#/);
51 next if ($line =~ m/^\s*$/);
56 if ($line =~ m/^([A-Za-z]+):\s*"((?:[^"\\]+|\\.)*)"$/)
58 $key = lc ($1); $value = $2;
59 $value =~ s/\\(.)/$1/g;
61 elsif ($line =~ m/([A-Za-z]+):\s*([0-9]+)$/)
63 $key = lc ($1); $value = 0 + $2;
67 print STDERR "Cannot parse line: $line\n";
71 if ($key eq 'datadir')
74 push (@DataDirs, $value);
76 elsif ($key eq 'libdir')
83 print STDERR "Unknown key: $key\n";
91 if ($Args->{'action'} && ($Args->{'action'} =~ m/^(overview|show_host|show_plugin|show_type|show_graph)$/))
93 $Args->{'action'} = $1;
97 $Args->{'action'} = 'overview';
100 if ($Args->{'host'} && ($Args->{'host'} =~ m#/#))
102 delete ($Args->{'host'});
105 if ($Args->{'plugin'} && ($Args->{'plugin'} =~ m#/#))
107 delete ($Args->{'plugin'});
110 if ($Args->{'type'} && ($Args->{'type'} =~ m#/#))
112 delete ($Args->{'type'});
115 if (!$Args->{'plugin'} || ($Args->{'plugin_instance'}
116 && ($Args->{'plugin_instance'} =~ m#/#)))
118 delete ($Args->{'plugin_instance'});
121 if (!$Args->{'type'} || ($Args->{'type_instance'}
122 && ($Args->{'type_instance'} =~ m#/#)))
124 delete ($Args->{'type_instance'});
127 if (defined ($Args->{'timespan'})
128 && ($Args->{'timespan'} =~ m/^(hour|day|week|month|year)$/))
130 $Args->{'timespan'} = $1;
134 $Args->{'timespan'} = 'day';
142 if (defined ($hosts))
144 return (keys %$hosts);
149 for (my $i = 0; $i < @DataDirs; $i++)
154 opendir ($dh, $DataDirs[$i]) or next;
155 @tmp = grep { ($_ !~ m/^\./) && (-d $DataDirs[$i] . '/' . $_) } (readdir ($dh));
158 $hosts->{$_} = 1 for (@tmp);
161 return (keys %$hosts);
167 my %all_hosts = map { $_ => 1 } (_find_hosts ());
168 my @selected_hosts = ();
171 if (defined ($all_hosts{$_}))
173 push (@selected_hosts, "$_");
176 return (@selected_hosts);
179 sub _get_param_timespan
181 my $timespan = param ('timespan');
184 $timespan = lc ($timespan);
186 if (!defined ($ValidTimespan->{$timespan}))
192 } # _get_param_timespan
199 for (my $i = 0; $i < @DataDirs; $i++)
201 my $dir = $DataDirs[$i] . "/$host";
205 opendir ($dh, $dir) or next;
206 @tmp = grep { ($_ !~ m/^\./) && (-d "$dir/$_") } (readdir ($dh));
211 my ($plugin, $instance) = split (m/-/, $_, 2);
212 $plugins{$plugin} = [] if (!exists $plugins{$plugin});
213 push (@{$plugins{$plugin}}, $instance);
224 my $plugin_instance = shift;
227 for (my $i = 0; $i < @DataDirs; $i++)
229 my $dir = $DataDirs[$i] . "/$host/$plugin" . (defined ($plugin_instance) ? "-$plugin_instance" : '');
233 opendir ($dh, $dir) or next;
234 @tmp = grep { ($_ !~ m/^\./) && ($_ =~ m/\.rrd$/i) && (-f "$dir/$_") } (readdir ($dh));
240 $name =~ s/\.rrd$//i;
241 my ($type, $instance) = split (m/-/, $name, 2);
242 $types{$type} = [] if (!$types{$type});
243 push (@{$types{$type}}, $instance) if (defined ($instance));
250 sub _find_files_for_host
255 my %plugins = _find_plugins ($host);
259 my $plugin_instances = $plugins{$plugin};
261 if (!$plugin_instances || !@$plugin_instances)
263 $plugin_instances = ['-'];
266 $ret->{$plugin} = {};
268 for (@$plugin_instances)
270 my $plugin_instance = defined ($_) ? $_ : '-';
271 my %types = _find_types ($host, $plugin,
272 ($plugin_instance ne '-')
276 $ret->{$plugin}{$plugin_instance} = {};
281 my $type_instances = $types{$type};
283 $ret->{$plugin}{$plugin_instance}{$type} = {};
285 for (@$type_instances)
287 $ret->{$plugin}{$plugin_instance}{$type}{$_} = 1;
290 if (!@$type_instances)
292 $ret->{$plugin}{$plugin_instance}{$type}{'-'} = 1;
294 } # for (keys %types)
295 } # for (@$plugin_instances)
296 } # for (keys %plugins)
299 } # _find_files_for_host
301 sub _find_files_for_hosts
304 my $all_plugins = {};
306 for (my $i = 0; $i < @hosts; $i++)
308 my $tmp = _find_files_for_host ($hosts[$i]);
309 _files_union ($all_plugins, $tmp);
312 return ($all_plugins);
313 } # _find_files_for_hosts
323 $dest->{$plugin} ||= {};
325 for (keys %{$src->{$plugin}})
328 $dest->{$plugin}{$pinst} ||= {};
330 for (keys %{$src->{$plugin}{$pinst}})
333 $dest->{$plugin}{$pinst}{$type} ||= {};
335 for (keys %{$src->{$plugin}{$pinst}{$type}})
338 $dest->{$plugin}{$pinst}{$type}{$tinst} = 1;
345 sub _files_plugin_inst_count
352 if (exists ($MetaGraphDefs->{$_}))
358 $i = $i + keys %{$src->{$_}};
362 } # _files_plugin_count
366 my @hosts = _find_hosts ();
367 @hosts = sort (@hosts);
370 for (my $i = 0; $i < @hosts; $i++)
372 my $host_html = encode_entities ($hosts[$i]);
373 my $host_url = uri_escape ($hosts[$i]);
375 print qq( <li><a href="${\script_name ()}?action=show_host;host=$host_url">$host_html</a></li>\n);
383 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])/)
385 return ([hex ($1) / 255.0, hex ($2) / 255.0, hex ($3) / 255.0]);
392 confess ("Wrong number of arguments") if (@_ != 1);
393 return (sprintf ('%02hx%02hx%02hx', map { int (255.0 * $_) } @{$_[0]}));
396 sub _get_random_color
398 my ($r, $g, $b) = (rand (), rand ());
404 $min = 1.0 - ($r + $g);
408 $max = 2.0 - ($r + $g);
411 $b = $min + (rand () * ($max - $min));
413 return ([$r, $g, $b]);
414 } # _get_random_color
418 my $instances = shift;
419 my $num = scalar @$instances;
422 for (my $i = 0; $i < $num; $i++)
424 my $pos = 6 * $i / $num;
467 $color = sprintf ("%02x%02x%02x", $red, $green, $blue);
468 $ret->{$instances->[$i]} = $color;
479 my $ret = [undef, undef, undef];
481 $opts{'background'} ||= [1.0, 1.0, 1.0];
482 $opts{'alpha'} ||= 0.25;
484 if (!ref ($opts{'background'}))
486 $opts{'background'} = _string_to_color ($opts{'background'})
487 or confess ("Cannot parse background color " . $opts{'background'});
489 $bg = $opts{'background'};
491 for (my $i = 0; $i < 3; $i++)
493 $ret->[$i] = ($opts{'alpha'} * $fg->[$i])
494 + ((1.0 - $opts{'alpha'}) * $bg->[$i]);
500 sub _custom_sort_arrayref
502 my $array_ref = shift;
503 my $array_sort = shift;
505 my %elements = map { $_ => 1 } (@$array_ref);
506 splice (@$array_ref, 0);
510 next if (!exists ($elements{$_}));
511 push (@$array_ref, $_);
512 delete ($elements{$_});
514 push (@$array_ref, sort (keys %elements));
515 } # _custom_sort_arrayref
519 my @hosts = _get_param_host ();
520 @hosts = sort (@hosts);
522 my $timespan = _get_param_timespan ();
523 my $all_plugins = _find_files_for_hosts (@hosts);
525 my $url_prefix = script_name () . '?action=show_plugin'
526 . join ('', map { ';host=' . uri_escape ($_) } (@hosts))
527 . ';timespan=' . uri_escape ($timespan);
529 print qq( <div><a href="${\script_name ()}?action=overview">Back to list of hosts</a></div>\n);
531 print " <p>Available plugins:</p>\n"
533 for (sort (keys %$all_plugins))
536 my $plugin_html = encode_entities ($plugin);
537 my $url_plugin = $url_prefix . ';plugin=' . uri_escape ($plugin);
538 print qq( <li><a href="$url_plugin">$plugin_html</a></li>\n);
543 sub action_show_plugin
545 my @hosts = _get_param_host ();
547 my $plugin_instance = shift;
548 my $timespan = _get_param_timespan ();
550 my $hosts_url = join (';', map { 'host=' . uri_escape ($_) } (@hosts));
551 my $url_prefix = script_name () . "?$hosts_url";
553 my $all_plugins = {};
554 my $plugins_per_host = {};
555 my $selected_plugins = {};
557 for (my $i = 0; $i < @hosts; $i++)
559 $plugins_per_host->{$hosts[$i]} = _find_files_for_host ($hosts[$i]);
560 _files_union ($all_plugins, $plugins_per_host->{$hosts[$i]});
563 for (param ('plugin'))
565 if (defined ($all_plugins->{$_}))
567 $selected_plugins->{$_} = 1;
571 print qq( <div><a href="${\script_name ()}?action=show_host;$hosts_url">Back to list of plugins</a></div>\n);
575 <table class="graphs">
581 print "\t<th>", encode_entities ($_), "</th>\n";
585 for (sort (keys %$selected_plugins))
588 my $plugin_html = encode_entities ($plugin);
589 my $plugin_url = "$url_prefix;plugin=" . uri_escape ($plugin);
590 my $all_pinst = $all_plugins->{$plugin};
592 for (sort (keys %$all_pinst))
596 my $pinst_url = $plugin_url;
600 $pinst_html = encode_entities ($pinst);
601 $pinst_url .= ';plugin_instance=' . uri_escape ($pinst);
604 my $files_printed = 0;
605 my $files_num = _files_plugin_inst_count ($all_pinst->{$pinst});
610 my $rowspan = ($files_num == 1) ? '' : qq( rowspan="$files_num");
612 for (sort (keys %{$all_plugins->{$plugin}{$pinst}}))
615 my $type_html = encode_entities ($type);
616 my $type_url = "$pinst_url;type=" . uri_escape ($type);
618 if ($files_printed == 0)
620 my $title = $plugin_html;
623 $title .= " ($pinst_html)";
626 print "\t<td$rowspan>$title</td>\n";
629 if (exists ($MetaGraphDefs->{$type}))
631 my $graph_url = script_name () . '?action=show_graph'
632 . ';plugin=' . uri_escape ($plugin)
633 . ';type=' . uri_escape ($type)
634 . ';timespan=' . uri_escape ($timespan);
637 $graph_url .= ';plugin_instance=' . uri_escape ($pinst);
640 if ($files_printed != 0)
648 my $host_graph_url = $graph_url . ';host=' . uri_escape ($host);
651 if (exists $plugins_per_host->{$host}{$plugin}{$pinst}{$type})
653 print qq(<img src="$host_graph_url" />);
654 #print encode_entities (qq(<img src="${\script_name ()}?action=show_graph;host=$host_esc;$param_plugin;$param_type;timespan=$timespan" />));
657 } # for (my $k = 0; $k < @hosts; $k++)
663 } # if (exists ($MetaGraphDefs->{$type}))
665 for (sort (keys %{$all_plugins->{$plugin}{$pinst}{$type}}))
668 my $tinst_esc = encode_entities ($tinst);
669 my $graph_url = script_name () . '?action=show_graph'
670 . ';plugin=' . uri_escape ($plugin)
671 . ';type=' . uri_escape ($type)
672 . ';timespan=' . uri_escape ($timespan);
675 $graph_url .= ';plugin_instance=' . uri_escape ($pinst);
679 $graph_url .= ';type_instance=' . uri_escape ($tinst);
682 if ($files_printed != 0)
687 for (my $k = 0; $k < @hosts; $k++)
689 my $host = $hosts[$k];
690 my $host_graph_url = $graph_url . ';host=' . uri_escape ($host);
693 if ($plugins_per_host->{$host}{$plugin}{$pinst}{$type}{$tinst})
695 print qq(<img src="$host_graph_url" />);
696 #print encode_entities (qq(<img src="${\script_name ()}?action=show_graph;host=$host_esc;$param_plugin;$param_type;timespan=$timespan" />));
699 } # for (my $k = 0; $k < @hosts; $k++)
709 } # action_show_plugin
715 my $plugin_instance = shift;
717 my $type_instance = shift;
719 my $host_url = uri_escape ($host);
720 my $plugin_url = uri_escape ($plugin);
721 my $plugin_html = encode_entities ($plugin);
722 my $plugin_instance_url = defined ($plugin_instance) ? uri_escape ($plugin_instance) : undef;
723 my $type_url = uri_escape ($type);
724 my $type_instance_url = defined ($type_instance) ? uri_escape ($type_instance) : undef;
726 my $url_prefix = script_name () . "?action=show_plugin;host=$host_url;plugin=$plugin_url";
727 $url_prefix .= ";plugin_instance=$plugin_instance_url" if (defined ($plugin_instance));
729 print qq( <div><a href="$url_prefix">Back to plugin "$plugin_html"</a></div>\n);
731 $url_prefix = script_name () . "?action=show_graph;host=$host_url;plugin=$plugin_url";
732 $url_prefix .= ";plugin_instance=$plugin_instance_url" if (defined ($plugin_instance));
733 $url_prefix .= ";type=$type_url";
734 $url_prefix .= ";type_instance=$type_instance_url" if (defined ($type_instance));
736 for (qw(hour day week month year))
740 print qq# <div><img src="$url_prefix;timespan=$timespan" /></div>\n#;
744 sub action_show_graph
748 my $plugin_instance = shift;
750 my $type_instance = shift;
754 my %times = (hour => -3600, day => -86400, week => 7 * -86400, month => 31 * -86400, year => 366 * -86400);
755 my $start_time = $times{$Args->{'timespan'}} || -86400;
757 #print STDERR Data::Dumper->Dump ([$Args], ['Args']);
760 if (exists ($MetaGraphDefs->{$type}))
762 my %types = _find_types ($host, $plugin, $plugin_instance);
763 return $MetaGraphDefs->{$type}->($host, $plugin, $plugin_instance, $type, $types{$type});
766 return if (!defined ($GraphDefs->{$type}));
767 @rrd_args = @{$GraphDefs->{$type}};
769 $title = "$host/$plugin" . (defined ($plugin_instance) ? "-$plugin_instance" : '')
770 . "/$type" . (defined ($type_instance) ? "-$type_instance" : '');
772 for (my $i = 0; $i < @DataDirs; $i++)
774 my $file = $DataDirs[$i] . "/$title.rrd";
778 s/{file}/$file/ for (@rrd_args);
780 RRDs::graph ('-', '-a', 'PNG', '-s', $start_time, '-t', $title, @RRDDefaultArgs, @rrd_args);
781 if (my $err = RRDs::error ())
783 die ("RRDs::graph: $err");
786 } # action_show_graph
790 my @hosts = _find_hosts ();
791 @hosts = sort (@hosts);
793 my %selected_hosts = map { $_ => 1 } (_get_param_host ());
794 my $timespan_selected = _get_param_timespan ();
797 <form action="${\script_name ()}" method="get">
799 <legend>Selector</legend>
800 <select name="host" multiple="multiple" size="10">
802 for (my $i = 0; $i < @hosts; $i++)
804 my $host = encode_entities ($hosts[$i]);
805 my $selected = defined ($selected_hosts{$hosts[$i]}) ? ' selected="selected"' : '';
806 print qq(\t <option value="$host"$selected>$host</option>\n);
808 print "\t</select>\n";
810 if (keys %selected_hosts)
812 my $all_plugins = _find_files_for_hosts (keys %selected_hosts);
813 my %selected_plugins = map { $_ => 1 } (param ('plugin'));
815 print qq(\t<select name="plugin" multiple="multiple" size="10">\n);
816 for (sort (keys %$all_plugins))
819 my $plugin_html = encode_entities ($plugin);
820 my $selected = (defined ($selected_plugins{$plugin})
821 ? ' selected="selected"' : '');
822 print qq(\t <option value="$plugin_html"$selected>$plugin</option>\n);
825 } # if (keys %selected_hosts)
827 print qq(\t<select name="timespan">\n);
828 for (qw(Hour Day Week Month Year))
830 my $timespan_uc = $_;
831 my $timespan_lc = lc ($_);
832 my $selected = ($timespan_selected eq $timespan_lc)
833 ? ' selected="selected"' : '';
834 print qq(\t <option value="$timespan_lc"$selected>$timespan_uc</option>\n);
838 <input type="submit" name="button" value="Ok" />
847 Content-Type: application/xhtml+xml; charset=utf-8
848 Cache-Control: no-cache
850 <?xml version="1.0" encoding="utf-8"?>
851 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
852 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
854 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
856 <title>collection.cgi, Version 2</title>
857 <style type="text/css">
864 border-collapse: collapse;
869 border: 1px solid black;
893 if (defined ($Args->{'host'})
894 && defined ($Args->{'plugin'})
895 && defined ($Args->{'type'})
896 && ($Args->{'action'} eq 'show_graph'))
899 print STDOUT header (-Content_Type => 'image/png');
900 action_show_graph ($Args->{'host'},
901 $Args->{'plugin'}, $Args->{'plugin_instance'},
902 $Args->{'type'}, $Args->{'type_instance'});
908 if (!$Args->{'host'})
912 elsif (!$Args->{'plugin'})
914 action_show_host ($Args->{'host'});
916 elsif (!$Args->{'type'})
918 action_show_plugin ($Args->{'plugin'}, $Args->{'plugin_instance'});
922 action_show_type ($Args->{'host'},
923 $Args->{'plugin'}, $Args->{'plugin_instance'},
924 $Args->{'type'}, $Args->{'type_instance'});
932 sub load_graph_definitions
934 my $Canvas = 'FFFFFF';
936 my $FullRed = 'FF0000';
937 my $FullGreen = '00E000';
938 my $FullBlue = '0000FF';
939 my $FullYellow = 'F0A000';
940 my $FullCyan = '00A0FF';
941 my $FullMagenta= 'A000FF';
943 my $HalfRed = 'F7B7B7';
944 my $HalfGreen = 'B7EFB7';
945 my $HalfBlue = 'B7B7F7';
946 my $HalfYellow = 'F3DFB7';
947 my $HalfCyan = 'B7DFF7';
948 my $HalfMagenta= 'DFB7F7';
950 my $HalfBlueGreen = '89B3C9';
954 apache_bytes => ['DEF:min_raw={file}:count:MIN',
955 'DEF:avg_raw={file}:count:AVERAGE',
956 'DEF:max_raw={file}:count:MAX',
957 'CDEF:min=min_raw,8,*',
958 'CDEF:avg=avg_raw,8,*',
959 'CDEF:max=max_raw,8,*',
960 'CDEF:mytime=avg_raw,TIME,TIME,IF',
961 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
962 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
963 'CDEF:avg_sample=avg_raw,UN,0,avg_raw,IF,sample_len,*',
964 'CDEF:avg_sum=PREV,UN,0,PREV,IF,avg_sample,+',
965 "AREA:avg#$HalfBlue",
966 "LINE1:avg#$FullBlue:Bit/s",
967 'GPRINT:min:MIN:%5.1lf%s Min,',
968 'GPRINT:avg:AVERAGE:%5.1lf%s Avg,',
969 'GPRINT:max:MAX:%5.1lf%s Max,',
970 'GPRINT:avg:LAST:%5.1lf%s Last',
971 'GPRINT:avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
973 apache_requests => ['DEF:min={file}:count:MIN',
974 'DEF:avg={file}:count:AVERAGE',
975 'DEF:max={file}:count:MAX',
976 "AREA:max#$HalfBlue",
978 "LINE1:avg#$FullBlue:Requests/s",
979 'GPRINT:min:MIN:%6.2lf Min,',
980 'GPRINT:avg:AVERAGE:%6.2lf Avg,',
981 'GPRINT:max:MAX:%6.2lf Max,',
982 'GPRINT:avg:LAST:%6.2lf Last'
984 apache_scoreboard => ['DEF:min={file}:count:MIN',
985 'DEF:avg={file}:count:AVERAGE',
986 'DEF:max={file}:count:MAX',
987 "AREA:max#$HalfBlue",
989 "LINE1:avg#$FullBlue:Processes",
990 'GPRINT:min:MIN:%6.2lf Min,',
991 'GPRINT:avg:AVERAGE:%6.2lf Avg,',
992 'GPRINT:max:MAX:%6.2lf Max,',
993 'GPRINT:avg:LAST:%6.2lf Last'
995 bitrate => ['-v', 'Bits/s',
996 'DEF:avg={file}:value:AVERAGE',
997 'DEF:min={file}:value:MIN',
998 'DEF:max={file}:value:MAX',
999 "AREA:max#$HalfBlue",
1001 "LINE1:avg#$FullBlue:Bits/s",
1002 'GPRINT:min:MIN:%5.1lf%s Min,',
1003 'GPRINT:avg:AVERAGE:%5.1lf%s Average,',
1004 'GPRINT:max:MAX:%5.1lf%s Max,',
1005 'GPRINT:avg:LAST:%5.1lf%s Last\l'
1007 charge => ['-v', 'Ah',
1008 'DEF:avg={file}:value:AVERAGE',
1009 'DEF:min={file}:value:MIN',
1010 'DEF:max={file}:value:MAX',
1011 "AREA:max#$HalfBlue",
1013 "LINE1:avg#$FullBlue:Charge",
1014 'GPRINT:min:MIN:%5.1lf%sAh Min,',
1015 'GPRINT:avg:AVERAGE:%5.1lf%sAh Avg,',
1016 'GPRINT:max:MAX:%5.1lf%sAh Max,',
1017 'GPRINT:avg:LAST:%5.1lf%sAh Last\l'
1019 connections => ['-v', 'Connections',
1020 'DEF:avg={file}:value:AVERAGE',
1021 'DEF:min={file}:value:MIN',
1022 'DEF:max={file}:value:MAX',
1023 "AREA:max#$HalfBlue",
1025 "LINE1:avg#$FullBlue:Connections",
1026 'GPRINT:min:MIN:%4.1lf Min,',
1027 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1028 'GPRINT:max:MAX:%4.1lf Max,',
1029 'GPRINT:avg:LAST:%4.1lf Last\l'
1031 cpu => ['-v', 'CPU load',
1032 'DEF:avg={file}:value:AVERAGE',
1033 'DEF:min={file}:value:MIN',
1034 'DEF:max={file}:value:MAX',
1035 "AREA:max#$HalfBlue",
1037 "LINE1:avg#$FullBlue:Percent",
1038 'GPRINT:min:MIN:%6.2lf%% Min,',
1039 'GPRINT:avg:AVERAGE:%6.2lf%% Avg,',
1040 'GPRINT:max:MAX:%6.2lf%% Max,',
1041 'GPRINT:avg:LAST:%6.2lf%% Last\l'
1043 current => ['-v', 'Ampere',
1044 'DEF:avg={file}:value:AVERAGE',
1045 'DEF:min={file}:value:MIN',
1046 'DEF:max={file}:value:MAX',
1047 "AREA:max#$HalfBlue",
1049 "LINE1:avg#$FullBlue:Current",
1050 'GPRINT:min:MIN:%5.1lf%sA Min,',
1051 'GPRINT:avg:AVERAGE:%5.1lf%sA Avg,',
1052 'GPRINT:max:MAX:%5.1lf%sA Max,',
1053 'GPRINT:avg:LAST:%5.1lf%sA Last\l'
1055 df => ['-v', 'Percent', '-l', '0',
1056 'DEF:free_avg={file}:free:AVERAGE',
1057 'DEF:free_min={file}:free:MIN',
1058 'DEF:free_max={file}:free:MAX',
1059 'DEF:used_avg={file}:used:AVERAGE',
1060 'DEF:used_min={file}:used:MIN',
1061 'DEF:used_max={file}:used:MAX',
1062 'CDEF:total=free_avg,used_avg,+',
1063 'CDEF:free_pct=100,free_avg,*,total,/',
1064 'CDEF:used_pct=100,used_avg,*,total,/',
1065 'CDEF:free_acc=free_pct,used_pct,+',
1066 'CDEF:used_acc=used_pct',
1067 "AREA:free_acc#$HalfGreen",
1068 "AREA:used_acc#$HalfRed",
1069 "LINE1:free_acc#$FullGreen:Free",
1070 'GPRINT:free_min:MIN:%5.1lf%sB Min,',
1071 'GPRINT:free_avg:AVERAGE:%5.1lf%sB Avg,',
1072 'GPRINT:free_max:MAX:%5.1lf%sB Max,',
1073 'GPRINT:free_avg:LAST:%5.1lf%sB Last\l',
1074 "LINE1:used_acc#$FullRed:Used",
1075 'GPRINT:used_min:MIN:%5.1lf%sB Min,',
1076 'GPRINT:used_avg:AVERAGE:%5.1lf%sB Avg,',
1077 'GPRINT:used_max:MAX:%5.1lf%sB Max,',
1078 'GPRINT:used_avg:LAST:%5.1lf%sB Last\l'
1081 'DEF:rtime_avg={file}:rtime:AVERAGE',
1082 'DEF:rtime_min={file}:rtime:MIN',
1083 'DEF:rtime_max={file}:rtime:MAX',
1084 'DEF:wtime_avg={file}:wtime:AVERAGE',
1085 'DEF:wtime_min={file}:wtime:MIN',
1086 'DEF:wtime_max={file}:wtime:MAX',
1087 'CDEF:rtime_avg_ms=rtime_avg,1000,/',
1088 'CDEF:rtime_min_ms=rtime_min,1000,/',
1089 'CDEF:rtime_max_ms=rtime_max,1000,/',
1090 'CDEF:wtime_avg_ms=wtime_avg,1000,/',
1091 'CDEF:wtime_min_ms=wtime_min,1000,/',
1092 'CDEF:wtime_max_ms=wtime_max,1000,/',
1093 'CDEF:total_avg_ms=rtime_avg_ms,wtime_avg_ms,+',
1094 'CDEF:total_min_ms=rtime_min_ms,wtime_min_ms,+',
1095 'CDEF:total_max_ms=rtime_max_ms,wtime_max_ms,+',
1096 "AREA:total_max_ms#$HalfRed",
1097 "AREA:total_min_ms#$Canvas",
1098 "LINE1:wtime_avg_ms#$FullGreen:Write",
1099 'GPRINT:wtime_min_ms:MIN:%5.1lf%s Min,',
1100 'GPRINT:wtime_avg_ms:AVERAGE:%5.1lf%s Avg,',
1101 'GPRINT:wtime_max_ms:MAX:%5.1lf%s Max,',
1102 'GPRINT:wtime_avg_ms:LAST:%5.1lf%s Last\n',
1103 "LINE1:rtime_avg_ms#$FullBlue:Read ",
1104 'GPRINT:rtime_min_ms:MIN:%5.1lf%s Min,',
1105 'GPRINT:rtime_avg_ms:AVERAGE:%5.1lf%s Avg,',
1106 'GPRINT:rtime_max_ms:MAX:%5.1lf%s Max,',
1107 'GPRINT:rtime_avg_ms:LAST:%5.1lf%s Last\n',
1108 "LINE1:total_avg_ms#$FullRed:Total",
1109 'GPRINT:total_min_ms:MIN:%5.1lf%s Min,',
1110 'GPRINT:total_avg_ms:AVERAGE:%5.1lf%s Avg,',
1111 'GPRINT:total_max_ms:MAX:%5.1lf%s Max,',
1112 'GPRINT:total_avg_ms:LAST:%5.1lf%s Last'
1114 disk_octets => ['-v', 'Bytes/s',
1115 'DEF:out_min={file}:write:MIN',
1116 'DEF:out_avg={file}:write:AVERAGE',
1117 'DEF:out_max={file}:write:MAX',
1118 'DEF:inc_min={file}:read:MIN',
1119 'DEF:inc_avg={file}:read:AVERAGE',
1120 'DEF:inc_max={file}:read:MAX',
1121 'CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF',
1122 'CDEF:mytime=out_avg,TIME,TIME,IF',
1123 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1124 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1125 'CDEF:out_avg_sample=out_avg,UN,0,out_avg,IF,sample_len,*',
1126 'CDEF:out_avg_sum=PREV,UN,0,PREV,IF,out_avg_sample,+',
1127 'CDEF:inc_avg_sample=inc_avg,UN,0,inc_avg,IF,sample_len,*',
1128 'CDEF:inc_avg_sum=PREV,UN,0,PREV,IF,inc_avg_sample,+',
1129 "AREA:out_avg#$HalfGreen",
1130 "AREA:inc_avg#$HalfBlue",
1131 "AREA:overlap#$HalfBlueGreen",
1132 "LINE1:out_avg#$FullGreen:Written",
1133 'GPRINT:out_avg:AVERAGE:%5.1lf%s Avg,',
1134 'GPRINT:out_max:MAX:%5.1lf%s Max,',
1135 'GPRINT:out_avg:LAST:%5.1lf%s Last',
1136 'GPRINT:out_avg_sum:LAST:(ca. %5.1lf%sB Total)\l',
1137 "LINE1:inc_avg#$FullBlue:Read ",
1138 'GPRINT:inc_avg:AVERAGE:%5.1lf%s Avg,',
1139 'GPRINT:inc_max:MAX:%5.1lf%s Max,',
1140 'GPRINT:inc_avg:LAST:%5.1lf%s Last',
1141 'GPRINT:inc_avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
1143 disk_merged => ['-v', 'Merged Ops/s',
1144 'DEF:out_min={file}:write:MIN',
1145 'DEF:out_avg={file}:write:AVERAGE',
1146 'DEF:out_max={file}:write:MAX',
1147 'DEF:inc_min={file}:read:MIN',
1148 'DEF:inc_avg={file}:read:AVERAGE',
1149 'DEF:inc_max={file}:read:MAX',
1150 'CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF',
1151 "AREA:out_avg#$HalfGreen",
1152 "AREA:inc_avg#$HalfBlue",
1153 "AREA:overlap#$HalfBlueGreen",
1154 "LINE1:out_avg#$FullGreen:Written",
1155 'GPRINT:out_avg:AVERAGE:%6.2lf Avg,',
1156 'GPRINT:out_max:MAX:%6.2lf Max,',
1157 'GPRINT:out_avg:LAST:%6.2lf Last\l',
1158 "LINE1:inc_avg#$FullBlue:Read ",
1159 'GPRINT:inc_avg:AVERAGE:%6.2lf Avg,',
1160 'GPRINT:inc_max:MAX:%6.2lf Max,',
1161 'GPRINT:inc_avg:LAST:%6.2lf Last\l'
1163 disk_ops => ['-v', 'Ops/s',
1164 'DEF:out_min={file}:write:MIN',
1165 'DEF:out_avg={file}:write:AVERAGE',
1166 'DEF:out_max={file}:write:MAX',
1167 'DEF:inc_min={file}:read:MIN',
1168 'DEF:inc_avg={file}:read:AVERAGE',
1169 'DEF:inc_max={file}:read:MAX',
1170 'CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF',
1171 "AREA:out_avg#$HalfGreen",
1172 "AREA:inc_avg#$HalfBlue",
1173 "AREA:overlap#$HalfBlueGreen",
1174 "LINE1:out_avg#$FullGreen:Written",
1175 'GPRINT:out_avg:AVERAGE:%6.2lf Avg,',
1176 'GPRINT:out_max:MAX:%6.2lf Max,',
1177 'GPRINT:out_avg:LAST:%6.2lf Last\l',
1178 "LINE1:inc_avg#$FullBlue:Read ",
1179 'GPRINT:inc_avg:AVERAGE:%6.2lf Avg,',
1180 'GPRINT:inc_max:MAX:%6.2lf Max,',
1181 'GPRINT:inc_avg:LAST:%6.2lf Last\l'
1183 disk_time => ['-v', 'Seconds/s',
1184 'DEF:out_min_raw={file}:write:MIN',
1185 'DEF:out_avg_raw={file}:write:AVERAGE',
1186 'DEF:out_max_raw={file}:write:MAX',
1187 'DEF:inc_min_raw={file}:read:MIN',
1188 'DEF:inc_avg_raw={file}:read:AVERAGE',
1189 'DEF:inc_max_raw={file}:read:MAX',
1190 'CDEF:out_min=out_min_raw,1000,/',
1191 'CDEF:out_avg=out_avg_raw,1000,/',
1192 'CDEF:out_max=out_max_raw,1000,/',
1193 'CDEF:inc_min=inc_min_raw,1000,/',
1194 'CDEF:inc_avg=inc_avg_raw,1000,/',
1195 'CDEF:inc_max=inc_max_raw,1000,/',
1196 'CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF',
1197 "AREA:out_avg#$HalfGreen",
1198 "AREA:inc_avg#$HalfBlue",
1199 "AREA:overlap#$HalfBlueGreen",
1200 "LINE1:out_avg#$FullGreen:Written",
1201 'GPRINT:out_avg:AVERAGE:%5.1lf%ss Avg,',
1202 'GPRINT:out_max:MAX:%5.1lf%ss Max,',
1203 'GPRINT:out_avg:LAST:%5.1lf%ss Last\l',
1204 "LINE1:inc_avg#$FullBlue:Read ",
1205 'GPRINT:inc_avg:AVERAGE:%5.1lf%ss Avg,',
1206 'GPRINT:inc_max:MAX:%5.1lf%ss Max,',
1207 'GPRINT:inc_avg:LAST:%5.1lf%ss Last\l'
1209 dns_octets => ['DEF:rsp_min_raw={file}:responses:MIN',
1210 'DEF:rsp_avg_raw={file}:responses:AVERAGE',
1211 'DEF:rsp_max_raw={file}:responses:MAX',
1212 'DEF:qry_min_raw={file}:queries:MIN',
1213 'DEF:qry_avg_raw={file}:queries:AVERAGE',
1214 'DEF:qry_max_raw={file}:queries:MAX',
1215 'CDEF:rsp_min=rsp_min_raw,8,*',
1216 'CDEF:rsp_avg=rsp_avg_raw,8,*',
1217 'CDEF:rsp_max=rsp_max_raw,8,*',
1218 'CDEF:qry_min=qry_min_raw,8,*',
1219 'CDEF:qry_avg=qry_avg_raw,8,*',
1220 'CDEF:qry_max=qry_max_raw,8,*',
1221 'CDEF:overlap=rsp_avg,qry_avg,GT,qry_avg,rsp_avg,IF',
1222 'CDEF:mytime=rsp_avg_raw,TIME,TIME,IF',
1223 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1224 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1225 'CDEF:rsp_avg_sample=rsp_avg_raw,UN,0,rsp_avg_raw,IF,sample_len,*',
1226 'CDEF:rsp_avg_sum=PREV,UN,0,PREV,IF,rsp_avg_sample,+',
1227 'CDEF:qry_avg_sample=qry_avg_raw,UN,0,qry_avg_raw,IF,sample_len,*',
1228 'CDEF:qry_avg_sum=PREV,UN,0,PREV,IF,qry_avg_sample,+',
1229 "AREA:rsp_avg#$HalfGreen",
1230 "AREA:qry_avg#$HalfBlue",
1231 "AREA:overlap#$HalfBlueGreen",
1232 "LINE1:rsp_avg#$FullGreen:Responses",
1233 'GPRINT:rsp_avg:AVERAGE:%5.1lf%s Avg,',
1234 'GPRINT:rsp_max:MAX:%5.1lf%s Max,',
1235 'GPRINT:rsp_avg:LAST:%5.1lf%s Last',
1236 'GPRINT:rsp_avg_sum:LAST:(ca. %5.1lf%sB Total)\l',
1237 "LINE1:qry_avg#$FullBlue:Queries ",
1238 #'GPRINT:qry_min:MIN:%5.1lf %s Min,',
1239 'GPRINT:qry_avg:AVERAGE:%5.1lf%s Avg,',
1240 'GPRINT:qry_max:MAX:%5.1lf%s Max,',
1241 'GPRINT:qry_avg:LAST:%5.1lf%s Last',
1242 'GPRINT:qry_avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
1245 'DEF:avg={file}:value:AVERAGE',
1246 'DEF:min={file}:value:MIN',
1247 'DEF:max={file}:value:MAX',
1248 "AREA:max#$HalfBlue",
1250 "LINE1:avg#$FullBlue:Queries/s",
1251 'GPRINT:min:MIN:%9.3lf Min,',
1252 'GPRINT:avg:AVERAGE:%9.3lf Average,',
1253 'GPRINT:max:MAX:%9.3lf Max,',
1254 'GPRINT:avg:LAST:%9.3lf Last\l'
1256 email_count => ['-v', 'Mails',
1257 'DEF:avg={file}:value:AVERAGE',
1258 'DEF:min={file}:value:MIN',
1259 'DEF:max={file}:value:MAX',
1260 "AREA:max#$HalfMagenta",
1262 "LINE1:avg#$FullMagenta:Count ",
1263 'GPRINT:min:MIN:%4.1lf Min,',
1264 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1265 'GPRINT:max:MAX:%4.1lf Max,',
1266 'GPRINT:avg:LAST:%4.1lf Last\l'
1268 email_size => ['-v', 'Bytes',
1269 'DEF:avg={file}:value:AVERAGE',
1270 'DEF:min={file}:value:MIN',
1271 'DEF:max={file}:value:MAX',
1272 "AREA:max#$HalfMagenta",
1274 "LINE1:avg#$FullMagenta:Count ",
1275 'GPRINT:min:MIN:%4.1lf Min,',
1276 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1277 'GPRINT:max:MAX:%4.1lf Max,',
1278 'GPRINT:avg:LAST:%4.1lf Last\l'
1280 spam_score => ['-v', 'Score',
1281 'DEF:avg={file}:value:AVERAGE',
1282 'DEF:min={file}:value:MIN',
1283 'DEF:max={file}:value:MAX',
1284 "AREA:max#$HalfBlue",
1286 "LINE1:avg#$FullBlue:Score ",
1287 'GPRINT:min:MIN:%4.1lf Min,',
1288 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1289 'GPRINT:max:MAX:%4.1lf Max,',
1290 'GPRINT:avg:LAST:%4.1lf Last\l'
1293 'DEF:avg={file}:value:AVERAGE',
1294 'DEF:min={file}:value:MIN',
1295 'DEF:max={file}:value:MAX',
1296 "AREA:max#$HalfMagenta",
1298 "LINE1:avg#$FullMagenta:Count ",
1299 'GPRINT:min:MIN:%4.1lf Min,',
1300 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1301 'GPRINT:max:MAX:%4.1lf Max,',
1302 'GPRINT:avg:LAST:%4.1lf Last\l'
1304 conntrack => ['-v', 'Entries',
1305 'DEF:avg={file}:entropy:AVERAGE',
1306 'DEF:min={file}:entropy:MIN',
1307 'DEF:max={file}:entropy:MAX',
1308 "AREA:max#$HalfBlue",
1310 "LINE1:avg#$FullBlue:Count",
1311 'GPRINT:min:MIN:%4.0lf Min,',
1312 'GPRINT:avg:AVERAGE:%4.0lf Avg,',
1313 'GPRINT:max:MAX:%4.0lf Max,',
1314 'GPRINT:avg:LAST:%4.0lf Last\l'
1316 entropy => ['-v', 'Bits',
1317 'DEF:avg={file}:entropy:AVERAGE',
1318 'DEF:min={file}:entropy:MIN',
1319 'DEF:max={file}:entropy:MAX',
1320 "AREA:max#$HalfBlue",
1322 "LINE1:avg#$FullBlue:Bits",
1323 'GPRINT:min:MIN:%4.0lfbit Min,',
1324 'GPRINT:avg:AVERAGE:%4.0lfbit Avg,',
1325 'GPRINT:max:MAX:%4.0lfbit Max,',
1326 'GPRINT:avg:LAST:%4.0lfbit Last\l'
1328 fanspeed => ['-v', 'RPM',
1329 'DEF:avg={file}:value:AVERAGE',
1330 'DEF:min={file}:value:MIN',
1331 'DEF:max={file}:value:MAX',
1332 "AREA:max#$HalfMagenta",
1334 "LINE1:avg#$FullMagenta:RPM",
1335 'GPRINT:min:MIN:%4.1lf Min,',
1336 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1337 'GPRINT:max:MAX:%4.1lf Max,',
1338 'GPRINT:avg:LAST:%4.1lf Last\l'
1340 frequency => ['-v', 'Hertz',
1341 'DEF:avg={file}:frequency:AVERAGE',
1342 'DEF:min={file}:frequency:MIN',
1343 'DEF:max={file}:frequency:MAX',
1344 "AREA:max#$HalfBlue",
1346 "LINE1:avg#$FullBlue:Frequency [Hz]",
1347 'GPRINT:min:MIN:%4.1lf Min,',
1348 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1349 'GPRINT:max:MAX:%4.1lf Max,',
1350 'GPRINT:avg:LAST:%4.1lf Last\l'
1352 frequency_offset => [ # NTPd
1353 'DEF:ppm_avg={file}:ppm:AVERAGE',
1354 'DEF:ppm_min={file}:ppm:MIN',
1355 'DEF:ppm_max={file}:ppm:MAX',
1356 "AREA:ppm_max#$HalfBlue",
1357 "AREA:ppm_min#$Canvas",
1358 "LINE1:ppm_avg#$FullBlue:{inst}",
1359 'GPRINT:ppm_min:MIN:%5.2lf Min,',
1360 'GPRINT:ppm_avg:AVERAGE:%5.2lf Avg,',
1361 'GPRINT:ppm_max:MAX:%5.2lf Max,',
1362 'GPRINT:ppm_avg:LAST:%5.2lf Last'
1364 gauge => ['-v', 'Exec value',
1365 'DEF:temp_avg={file}:value:AVERAGE',
1366 'DEF:temp_min={file}:value:MIN',
1367 'DEF:temp_max={file}:value:MAX',
1368 "AREA:temp_max#$HalfBlue",
1369 "AREA:temp_min#$Canvas",
1370 "LINE1:temp_avg#$FullBlue:Exec value",
1371 'GPRINT:temp_min:MIN:%6.2lf Min,',
1372 'GPRINT:temp_avg:AVERAGE:%6.2lf Avg,',
1373 'GPRINT:temp_max:MAX:%6.2lf Max,',
1374 'GPRINT:temp_avg:LAST:%6.2lf Last\l'
1377 'DEF:temp_avg={file}:value:AVERAGE',
1378 'DEF:temp_min={file}:value:MIN',
1379 'DEF:temp_max={file}:value:MAX',
1380 "AREA:temp_max#$HalfRed",
1381 "AREA:temp_min#$Canvas",
1382 "LINE1:temp_avg#$FullRed:Temperature",
1383 'GPRINT:temp_min:MIN:%4.1lf Min,',
1384 'GPRINT:temp_avg:AVERAGE:%4.1lf Avg,',
1385 'GPRINT:temp_max:MAX:%4.1lf Max,',
1386 'GPRINT:temp_avg:LAST:%4.1lf Last\l'
1388 humidity => ['-v', 'Percent',
1389 'DEF:temp_avg={file}:value:AVERAGE',
1390 'DEF:temp_min={file}:value:MIN',
1391 'DEF:temp_max={file}:value:MAX',
1392 "AREA:temp_max#$HalfGreen",
1393 "AREA:temp_min#$Canvas",
1394 "LINE1:temp_avg#$FullGreen:Temperature",
1395 'GPRINT:temp_min:MIN:%4.1lf%% Min,',
1396 'GPRINT:temp_avg:AVERAGE:%4.1lf%% Avg,',
1397 'GPRINT:temp_max:MAX:%4.1lf%% Max,',
1398 'GPRINT:temp_avg:LAST:%4.1lf%% Last\l'
1400 if_errors => ['-v', 'Errors/s',
1401 'DEF:tx_min={file}:tx:MIN',
1402 'DEF:tx_avg={file}:tx:AVERAGE',
1403 'DEF:tx_max={file}:tx:MAX',
1404 'DEF:rx_min={file}:rx:MIN',
1405 'DEF:rx_avg={file}:rx:AVERAGE',
1406 'DEF:rx_max={file}:rx:MAX',
1407 'CDEF:overlap=tx_avg,rx_avg,GT,rx_avg,tx_avg,IF',
1408 'CDEF:mytime=tx_avg,TIME,TIME,IF',
1409 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1410 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1411 'CDEF:tx_avg_sample=tx_avg,UN,0,tx_avg,IF,sample_len,*',
1412 'CDEF:tx_avg_sum=PREV,UN,0,PREV,IF,tx_avg_sample,+',
1413 'CDEF:rx_avg_sample=rx_avg,UN,0,rx_avg,IF,sample_len,*',
1414 'CDEF:rx_avg_sum=PREV,UN,0,PREV,IF,rx_avg_sample,+',
1415 "AREA:tx_avg#$HalfGreen",
1416 "AREA:rx_avg#$HalfBlue",
1417 "AREA:overlap#$HalfBlueGreen",
1418 "LINE1:tx_avg#$FullGreen:TX",
1419 'GPRINT:tx_avg:AVERAGE:%5.1lf%s Avg,',
1420 'GPRINT:tx_max:MAX:%5.1lf%s Max,',
1421 'GPRINT:tx_avg:LAST:%5.1lf%s Last',
1422 'GPRINT:tx_avg_sum:LAST:(ca. %4.0lf%s Total)\l',
1423 "LINE1:rx_avg#$FullBlue:RX",
1424 #'GPRINT:rx_min:MIN:%5.1lf %s Min,',
1425 'GPRINT:rx_avg:AVERAGE:%5.1lf%s Avg,',
1426 'GPRINT:rx_max:MAX:%5.1lf%s Max,',
1427 'GPRINT:rx_avg:LAST:%5.1lf%s Last',
1428 'GPRINT:rx_avg_sum:LAST:(ca. %4.0lf%s Total)\l'
1430 if_collisions => ['-v', 'Collisions/s',
1431 'DEF:min_raw={file}:value:MIN',
1432 'DEF:avg_raw={file}:value:AVERAGE',
1433 'DEF:max_raw={file}:value:MAX',
1434 'CDEF:min=min_raw,8,*',
1435 'CDEF:avg=avg_raw,8,*',
1436 'CDEF:max=max_raw,8,*',
1437 "AREA:max#$HalfBlue",
1439 "LINE1:avg#$FullBlue:Collisions/s",
1440 'GPRINT:min:MIN:%5.1lf %s Min,',
1441 'GPRINT:avg:AVERAGE:%5.1lf%s Avg,',
1442 'GPRINT:max:MAX:%5.1lf%s Max,',
1443 'GPRINT:avg:LAST:%5.1lf%s Last\l'
1445 if_dropped => ['-v', 'Packets/s',
1446 'DEF:tx_min={file}:tx:MIN',
1447 'DEF:tx_avg={file}:tx:AVERAGE',
1448 'DEF:tx_max={file}:tx:MAX',
1449 'DEF:rx_min={file}:rx:MIN',
1450 'DEF:rx_avg={file}:rx:AVERAGE',
1451 'DEF:rx_max={file}:rx:MAX',
1452 'CDEF:overlap=tx_avg,rx_avg,GT,rx_avg,tx_avg,IF',
1453 'CDEF:mytime=tx_avg,TIME,TIME,IF',
1454 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1455 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1456 'CDEF:tx_avg_sample=tx_avg,UN,0,tx_avg,IF,sample_len,*',
1457 'CDEF:tx_avg_sum=PREV,UN,0,PREV,IF,tx_avg_sample,+',
1458 'CDEF:rx_avg_sample=rx_avg,UN,0,rx_avg,IF,sample_len,*',
1459 'CDEF:rx_avg_sum=PREV,UN,0,PREV,IF,rx_avg_sample,+',
1460 "AREA:tx_avg#$HalfGreen",
1461 "AREA:rx_avg#$HalfBlue",
1462 "AREA:overlap#$HalfBlueGreen",
1463 "LINE1:tx_avg#$FullGreen:TX",
1464 'GPRINT:tx_avg:AVERAGE:%5.1lf%s Avg,',
1465 'GPRINT:tx_max:MAX:%5.1lf%s Max,',
1466 'GPRINT:tx_avg:LAST:%5.1lf%s Last',
1467 'GPRINT:tx_avg_sum:LAST:(ca. %4.0lf%s Total)\l',
1468 "LINE1:rx_avg#$FullBlue:RX",
1469 #'GPRINT:rx_min:MIN:%5.1lf %s Min,',
1470 'GPRINT:rx_avg:AVERAGE:%5.1lf%s Avg,',
1471 'GPRINT:rx_max:MAX:%5.1lf%s Max,',
1472 'GPRINT:rx_avg:LAST:%5.1lf%s Last',
1473 'GPRINT:rx_avg_sum:LAST:(ca. %4.0lf%s Total)\l'
1475 if_packets => ['-v', 'Packets/s',
1476 'DEF:tx_min={file}:tx:MIN',
1477 'DEF:tx_avg={file}:tx:AVERAGE',
1478 'DEF:tx_max={file}:tx:MAX',
1479 'DEF:rx_min={file}:rx:MIN',
1480 'DEF:rx_avg={file}:rx:AVERAGE',
1481 'DEF:rx_max={file}:rx:MAX',
1482 'CDEF:overlap=tx_avg,rx_avg,GT,rx_avg,tx_avg,IF',
1483 'CDEF:mytime=tx_avg,TIME,TIME,IF',
1484 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1485 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1486 'CDEF:tx_avg_sample=tx_avg,UN,0,tx_avg,IF,sample_len,*',
1487 'CDEF:tx_avg_sum=PREV,UN,0,PREV,IF,tx_avg_sample,+',
1488 'CDEF:rx_avg_sample=rx_avg,UN,0,rx_avg,IF,sample_len,*',
1489 'CDEF:rx_avg_sum=PREV,UN,0,PREV,IF,rx_avg_sample,+',
1490 "AREA:tx_avg#$HalfGreen",
1491 "AREA:rx_avg#$HalfBlue",
1492 "AREA:overlap#$HalfBlueGreen",
1493 "LINE1:tx_avg#$FullGreen:TX",
1494 'GPRINT:tx_avg:AVERAGE:%5.1lf%s Avg,',
1495 'GPRINT:tx_max:MAX:%5.1lf%s Max,',
1496 'GPRINT:tx_avg:LAST:%5.1lf%s Last',
1497 'GPRINT:tx_avg_sum:LAST:(ca. %4.0lf%s Total)\l',
1498 "LINE1:rx_avg#$FullBlue:RX",
1499 #'GPRINT:rx_min:MIN:%5.1lf %s Min,',
1500 'GPRINT:rx_avg:AVERAGE:%5.1lf%s Avg,',
1501 'GPRINT:rx_max:MAX:%5.1lf%s Max,',
1502 'GPRINT:rx_avg:LAST:%5.1lf%s Last',
1503 'GPRINT:rx_avg_sum:LAST:(ca. %4.0lf%s Total)\l'
1505 if_rx_errors => ['-v', 'Errors/s',
1506 'DEF:min={file}:value:MIN',
1507 'DEF:avg={file}:value:AVERAGE',
1508 'DEF:max={file}:value:MAX',
1509 'CDEF:mytime=avg,TIME,TIME,IF',
1510 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1511 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1512 'CDEF:avg_sample=avg,UN,0,avg,IF,sample_len,*',
1513 'CDEF:avg_sum=PREV,UN,0,PREV,IF,avg_sample,+',
1514 "AREA:avg#$HalfBlue",
1515 "LINE1:avg#$FullBlue:Errors/s",
1516 'GPRINT:avg:AVERAGE:%3.1lf%s Avg,',
1517 'GPRINT:max:MAX:%3.1lf%s Max,',
1518 'GPRINT:avg:LAST:%3.1lf%s Last',
1519 'GPRINT:avg_sum:LAST:(ca. %2.0lf%s Total)\l'
1521 ipt_bytes => ['-v', 'Bits/s',
1522 'DEF:min_raw={file}:value:MIN',
1523 'DEF:avg_raw={file}:value:AVERAGE',
1524 'DEF:max_raw={file}:value:MAX',
1525 'CDEF:min=min_raw,8,*',
1526 'CDEF:avg=avg_raw,8,*',
1527 'CDEF:max=max_raw,8,*',
1528 'CDEF:mytime=avg_raw,TIME,TIME,IF',
1529 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1530 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1531 'CDEF:avg_sample=avg_raw,UN,0,avg_raw,IF,sample_len,*',
1532 'CDEF:avg_sum=PREV,UN,0,PREV,IF,avg_sample,+',
1533 "AREA:max#$HalfBlue",
1535 "LINE1:avg#$FullBlue:Bits/s",
1536 #'GPRINT:min:MIN:%5.1lf %s Min,',
1537 'GPRINT:avg:AVERAGE:%5.1lf%s Avg,',
1538 'GPRINT:max:MAX:%5.1lf%s Max,',
1539 'GPRINT:avg:LAST:%5.1lf%s Last',
1540 'GPRINT:avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
1542 ipt_packets => ['-v', 'Packets/s',
1543 'DEF:min_raw={file}:value:MIN',
1544 'DEF:avg_raw={file}:value:AVERAGE',
1545 'DEF:max_raw={file}:value:MAX',
1546 'CDEF:min=min_raw,8,*',
1547 'CDEF:avg=avg_raw,8,*',
1548 'CDEF:max=max_raw,8,*',
1549 "AREA:max#$HalfBlue",
1551 "LINE1:avg#$FullBlue:Packets/s",
1552 'GPRINT:min:MIN:%5.1lf %s Min,',
1553 'GPRINT:avg:AVERAGE:%5.1lf%s Avg,',
1554 'GPRINT:max:MAX:%5.1lf%s Max,',
1555 'GPRINT:avg:LAST:%5.1lf%s Last\l'
1557 irq => ['-v', 'Issues/s',
1558 'DEF:avg={file}:value:AVERAGE',
1559 'DEF:min={file}:value:MIN',
1560 'DEF:max={file}:value:MAX',
1561 "AREA:max#$HalfBlue",
1563 "LINE1:avg#$FullBlue:Issues/s",
1564 'GPRINT:min:MIN:%6.2lf Min,',
1565 'GPRINT:avg:AVERAGE:%6.2lf Avg,',
1566 'GPRINT:max:MAX:%6.2lf Max,',
1567 'GPRINT:avg:LAST:%6.2lf Last\l'
1569 load => ['-v', 'System load',
1570 'DEF:s_avg={file}:shortterm:AVERAGE',
1571 'DEF:s_min={file}:shortterm:MIN',
1572 'DEF:s_max={file}:shortterm:MAX',
1573 'DEF:m_avg={file}:midterm:AVERAGE',
1574 'DEF:m_min={file}:midterm:MIN',
1575 'DEF:m_max={file}:midterm:MAX',
1576 'DEF:l_avg={file}:longterm:AVERAGE',
1577 'DEF:l_min={file}:longterm:MIN',
1578 'DEF:l_max={file}:longterm:MAX',
1579 "AREA:s_max#$HalfGreen",
1580 "AREA:s_min#$Canvas",
1581 "LINE1:s_avg#$FullGreen: 1m average",
1582 'GPRINT:s_min:MIN:%4.2lf Min,',
1583 'GPRINT:s_avg:AVERAGE:%4.2lf Avg,',
1584 'GPRINT:s_max:MAX:%4.2lf Max,',
1585 'GPRINT:s_avg:LAST:%4.2lf Last\n',
1586 "LINE1:m_avg#$FullBlue: 5m average",
1587 'GPRINT:m_min:MIN:%4.2lf Min,',
1588 'GPRINT:m_avg:AVERAGE:%4.2lf Avg,',
1589 'GPRINT:m_max:MAX:%4.2lf Max,',
1590 'GPRINT:m_avg:LAST:%4.2lf Last\n',
1591 "LINE1:l_avg#$FullRed:15m average",
1592 'GPRINT:l_min:MIN:%4.2lf Min,',
1593 'GPRINT:l_avg:AVERAGE:%4.2lf Avg,',
1594 'GPRINT:l_max:MAX:%4.2lf Max,',
1595 'GPRINT:l_avg:LAST:%4.2lf Last'
1598 'DEF:avg={file}:percent:AVERAGE',
1599 'DEF:min={file}:percent:MIN',
1600 'DEF:max={file}:percent:MAX',
1601 "AREA:max#$HalfBlue",
1603 "LINE1:avg#$FullBlue:Load",
1604 'GPRINT:min:MIN:%5.1lf%s%% Min,',
1605 'GPRINT:avg:AVERAGE:%5.1lf%s%% Avg,',
1606 'GPRINT:max:MAX:%5.1lf%s%% Max,',
1607 'GPRINT:avg:LAST:%5.1lf%s%% Last\l'
1609 mails => ['DEF:rawgood={file}:good:AVERAGE',
1610 'DEF:rawspam={file}:spam:AVERAGE',
1611 'CDEF:good=rawgood,UN,0,rawgood,IF',
1612 'CDEF:spam=rawspam,UN,0,rawspam,IF',
1613 'CDEF:negspam=spam,-1,*',
1614 "AREA:good#$HalfGreen",
1615 "LINE1:good#$FullGreen:Good mails",
1616 'GPRINT:good:AVERAGE:%4.1lf Avg,',
1617 'GPRINT:good:MAX:%4.1lf Max,',
1618 'GPRINT:good:LAST:%4.1lf Last\n',
1619 "AREA:negspam#$HalfRed",
1620 "LINE1:negspam#$FullRed:Spam mails",
1621 'GPRINT:spam:AVERAGE:%4.1lf Avg,',
1622 'GPRINT:spam:MAX:%4.1lf Max,',
1623 'GPRINT:spam:LAST:%4.1lf Last',
1626 memcached_command => ['-v', 'Commands',
1627 'DEF:avg={file}:value:AVERAGE',
1628 'DEF:min={file}:value:MIN',
1629 'DEF:max={file}:value:MAX',
1630 "AREA:max#$HalfBlue",
1632 "LINE1:avg#$FullBlue:Commands",
1633 'GPRINT:min:MIN:%5.1lf%s Min,',
1634 'GPRINT:avg:AVERAGE:%5.1lf Avg,',
1635 'GPRINT:max:MAX:%5.1lf Max,',
1636 'GPRINT:avg:LAST:%5.1lf Last\l'
1638 memcached_connections => ['-v', 'Connections',
1639 'DEF:avg={file}:value:AVERAGE',
1640 'DEF:min={file}:value:MIN',
1641 'DEF:max={file}:value:MAX',
1642 "AREA:max#$HalfBlue",
1644 "LINE1:avg#$FullBlue:Connections",
1645 'GPRINT:min:MIN:%4.1lf Min,',
1646 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1647 'GPRINT:max:MAX:%4.1lf Max,',
1648 'GPRINT:avg:LAST:%4.1lf Last\l'
1650 memcached_items => ['-v', 'Items',
1651 'DEF:avg={file}:value:AVERAGE',
1652 'DEF:min={file}:value:MIN',
1653 'DEF:max={file}:value:MAX',
1654 "AREA:max#$HalfBlue",
1656 "LINE1:avg#$FullBlue:Items",
1657 'GPRINT:min:MIN:%4.1lf Min,',
1658 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1659 'GPRINT:max:MAX:%4.1lf Max,',
1660 'GPRINT:avg:LAST:%4.1lf Last\l'
1662 memcached_octets => ['-v', 'Bits/s',
1663 'DEF:out_min={file}:tx:MIN',
1664 'DEF:out_avg={file}:tx:AVERAGE',
1665 'DEF:out_max={file}:tx:MAX',
1666 'DEF:inc_min={file}:rx:MIN',
1667 'DEF:inc_avg={file}:rx:AVERAGE',
1668 'DEF:inc_max={file}:rx:MAX',
1669 'CDEF:mytime=out_avg,TIME,TIME,IF',
1670 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1671 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1672 'CDEF:out_avg_sample=out_avg,UN,0,out_avg,IF,sample_len,*',
1673 'CDEF:out_avg_sum=PREV,UN,0,PREV,IF,out_avg_sample,+',
1674 'CDEF:inc_avg_sample=inc_avg,UN,0,inc_avg,IF,sample_len,*',
1675 'CDEF:inc_avg_sum=PREV,UN,0,PREV,IF,inc_avg_sample,+',
1676 'CDEF:out_bit_min=out_min,8,*',
1677 'CDEF:out_bit_avg=out_avg,8,*',
1678 'CDEF:out_bit_max=out_max,8,*',
1679 'CDEF:inc_bit_min=inc_min,8,*',
1680 'CDEF:inc_bit_avg=inc_avg,8,*',
1681 'CDEF:inc_bit_max=inc_max,8,*',
1682 'CDEF:overlap=out_bit_avg,inc_bit_avg,GT,inc_bit_avg,out_bit_avg,IF',
1683 "AREA:out_bit_avg#$HalfGreen",
1684 "AREA:inc_bit_avg#$HalfBlue",
1685 "AREA:overlap#$HalfBlueGreen",
1686 "LINE1:out_bit_avg#$FullGreen:Written",
1687 'GPRINT:out_bit_avg:AVERAGE:%5.1lf%s Avg,',
1688 'GPRINT:out_bit_max:MAX:%5.1lf%s Max,',
1689 'GPRINT:out_bit_avg:LAST:%5.1lf%s Last',
1690 'GPRINT:out_avg_sum:LAST:(ca. %5.1lf%sB Total)\l',
1691 "LINE1:inc_bit_avg#$FullBlue:Read ",
1692 'GPRINT:inc_bit_avg:AVERAGE:%5.1lf%s Avg,',
1693 'GPRINT:inc_bit_max:MAX:%5.1lf%s Max,',
1694 'GPRINT:inc_bit_avg:LAST:%5.1lf%s Last',
1695 'GPRINT:inc_avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
1697 memcached_ops => ['-v', 'Ops',
1698 'DEF:avg={file}:value:AVERAGE',
1699 'DEF:min={file}:value:MIN',
1700 'DEF:max={file}:value:MAX',
1701 "AREA:max#$HalfBlue",
1703 "LINE1:avg#$FullBlue:Ops",
1704 'GPRINT:min:MIN:%4.1lf Min,',
1705 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1706 'GPRINT:max:MAX:%4.1lf Max,',
1707 'GPRINT:avg:LAST:%4.1lf Last\l'
1709 memory => ['-b', '1024', '-v', 'Bytes',
1710 'DEF:avg={file}:value:AVERAGE',
1711 'DEF:min={file}:value:MIN',
1712 'DEF:max={file}:value:MAX',
1713 "AREA:max#$HalfBlue",
1715 "LINE1:avg#$FullBlue:Memory",
1716 'GPRINT:min:MIN:%5.1lf%sbyte Min,',
1717 'GPRINT:avg:AVERAGE:%5.1lf%sbyte Avg,',
1718 'GPRINT:max:MAX:%5.1lf%sbyte Max,',
1719 'GPRINT:avg:LAST:%5.1lf%sbyte Last\l'
1722 'DEF:used_avg={file}:used:AVERAGE',
1723 'DEF:free_avg={file}:free:AVERAGE',
1724 'DEF:buffers_avg={file}:buffers:AVERAGE',
1725 'DEF:cached_avg={file}:cached:AVERAGE',
1726 'DEF:used_min={file}:used:MIN',
1727 'DEF:free_min={file}:free:MIN',
1728 'DEF:buffers_min={file}:buffers:MIN',
1729 'DEF:cached_min={file}:cached:MIN',
1730 'DEF:used_max={file}:used:MAX',
1731 'DEF:free_max={file}:free:MAX',
1732 'DEF:buffers_max={file}:buffers:MAX',
1733 'DEF:cached_max={file}:cached:MAX',
1734 'CDEF:cached_avg_nn=cached_avg,UN,0,cached_avg,IF',
1735 'CDEF:buffers_avg_nn=buffers_avg,UN,0,buffers_avg,IF',
1736 'CDEF:free_cached_buffers_used=free_avg,cached_avg_nn,+,buffers_avg_nn,+,used_avg,+',
1737 'CDEF:cached_buffers_used=cached_avg,buffers_avg_nn,+,used_avg,+',
1738 'CDEF:buffers_used=buffers_avg,used_avg,+',
1739 "AREA:free_cached_buffers_used#$HalfGreen",
1740 "AREA:cached_buffers_used#$HalfBlue",
1741 "AREA:buffers_used#$HalfYellow",
1742 "AREA:used_avg#$HalfRed",
1743 "LINE1:free_cached_buffers_used#$FullGreen:Free ",
1744 'GPRINT:free_min:MIN:%5.1lf%s Min,',
1745 'GPRINT:free_avg:AVERAGE:%5.1lf%s Avg,',
1746 'GPRINT:free_max:MAX:%5.1lf%s Max,',
1747 'GPRINT:free_avg:LAST:%5.1lf%s Last\n',
1748 "LINE1:cached_buffers_used#$FullBlue:Page cache ",
1749 'GPRINT:cached_min:MIN:%5.1lf%s Min,',
1750 'GPRINT:cached_avg:AVERAGE:%5.1lf%s Avg,',
1751 'GPRINT:cached_max:MAX:%5.1lf%s Max,',
1752 'GPRINT:cached_avg:LAST:%5.1lf%s Last\n',
1753 "LINE1:buffers_used#$FullYellow:Buffer cache",
1754 'GPRINT:buffers_min:MIN:%5.1lf%s Min,',
1755 'GPRINT:buffers_avg:AVERAGE:%5.1lf%s Avg,',
1756 'GPRINT:buffers_max:MAX:%5.1lf%s Max,',
1757 'GPRINT:buffers_avg:LAST:%5.1lf%s Last\n',
1758 "LINE1:used_avg#$FullRed:Used ",
1759 'GPRINT:used_min:MIN:%5.1lf%s Min,',
1760 'GPRINT:used_avg:AVERAGE:%5.1lf%s Avg,',
1761 'GPRINT:used_max:MAX:%5.1lf%s Max,',
1762 'GPRINT:used_avg:LAST:%5.1lf%s Last'
1764 mysql_commands => ['-v', 'Issues/s',
1765 "DEF:val_avg={file}:value:AVERAGE",
1766 "DEF:val_min={file}:value:MIN",
1767 "DEF:val_max={file}:value:MAX",
1768 "AREA:val_max#$HalfBlue",
1769 "AREA:val_min#$Canvas",
1770 "LINE1:val_avg#$FullBlue:Issues/s",
1771 'GPRINT:val_min:MIN:%5.2lf Min,',
1772 'GPRINT:val_avg:AVERAGE:%5.2lf Avg,',
1773 'GPRINT:val_max:MAX:%5.2lf Max,',
1774 'GPRINT:val_avg:LAST:%5.2lf Last'
1776 mysql_handler => ['-v', 'Issues/s',
1777 "DEF:val_avg={file}:value:AVERAGE",
1778 "DEF:val_min={file}:value:MIN",
1779 "DEF:val_max={file}:value:MAX",
1780 "AREA:val_max#$HalfBlue",
1781 "AREA:val_min#$Canvas",
1782 "LINE1:val_avg#$FullBlue:Issues/s",
1783 'GPRINT:val_min:MIN:%5.2lf Min,',
1784 'GPRINT:val_avg:AVERAGE:%5.2lf Avg,',
1785 'GPRINT:val_max:MAX:%5.2lf Max,',
1786 'GPRINT:val_avg:LAST:%5.2lf Last'
1788 mysql_octets => ['-v', 'Bits/s',
1789 'DEF:out_min={file}:tx:MIN',
1790 'DEF:out_avg={file}:tx:AVERAGE',
1791 'DEF:out_max={file}:tx:MAX',
1792 'DEF:inc_min={file}:rx:MIN',
1793 'DEF:inc_avg={file}:rx:AVERAGE',
1794 'DEF:inc_max={file}:rx:MAX',
1795 'CDEF:mytime=out_avg,TIME,TIME,IF',
1796 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1797 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1798 'CDEF:out_avg_sample=out_avg,UN,0,out_avg,IF,sample_len,*',
1799 'CDEF:out_avg_sum=PREV,UN,0,PREV,IF,out_avg_sample,+',
1800 'CDEF:inc_avg_sample=inc_avg,UN,0,inc_avg,IF,sample_len,*',
1801 'CDEF:inc_avg_sum=PREV,UN,0,PREV,IF,inc_avg_sample,+',
1802 'CDEF:out_bit_min=out_min,8,*',
1803 'CDEF:out_bit_avg=out_avg,8,*',
1804 'CDEF:out_bit_max=out_max,8,*',
1805 'CDEF:inc_bit_min=inc_min,8,*',
1806 'CDEF:inc_bit_avg=inc_avg,8,*',
1807 'CDEF:inc_bit_max=inc_max,8,*',
1808 'CDEF:overlap=out_bit_avg,inc_bit_avg,GT,inc_bit_avg,out_bit_avg,IF',
1809 "AREA:out_bit_avg#$HalfGreen",
1810 "AREA:inc_bit_avg#$HalfBlue",
1811 "AREA:overlap#$HalfBlueGreen",
1812 "LINE1:out_bit_avg#$FullGreen:Written",
1813 'GPRINT:out_bit_avg:AVERAGE:%5.1lf%s Avg,',
1814 'GPRINT:out_bit_max:MAX:%5.1lf%s Max,',
1815 'GPRINT:out_bit_avg:LAST:%5.1lf%s Last',
1816 'GPRINT:out_avg_sum:LAST:(ca. %5.1lf%sB Total)\l',
1817 "LINE1:inc_bit_avg#$FullBlue:Read ",
1818 'GPRINT:inc_bit_avg:AVERAGE:%5.1lf%s Avg,',
1819 'GPRINT:inc_bit_max:MAX:%5.1lf%s Max,',
1820 'GPRINT:inc_bit_avg:LAST:%5.1lf%s Last',
1821 'GPRINT:inc_avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
1823 mysql_qcache => ['-v', 'Queries/s',
1824 "DEF:hits_min={file}:hits:MIN",
1825 "DEF:hits_avg={file}:hits:AVERAGE",
1826 "DEF:hits_max={file}:hits:MAX",
1827 "DEF:inserts_min={file}:inserts:MIN",
1828 "DEF:inserts_avg={file}:inserts:AVERAGE",
1829 "DEF:inserts_max={file}:inserts:MAX",
1830 "DEF:not_cached_min={file}:not_cached:MIN",
1831 "DEF:not_cached_avg={file}:not_cached:AVERAGE",
1832 "DEF:not_cached_max={file}:not_cached:MAX",
1833 "DEF:lowmem_prunes_min={file}:lowmem_prunes:MIN",
1834 "DEF:lowmem_prunes_avg={file}:lowmem_prunes:AVERAGE",
1835 "DEF:lowmem_prunes_max={file}:lowmem_prunes:MAX",
1836 "DEF:queries_min={file}:queries_in_cache:MIN",
1837 "DEF:queries_avg={file}:queries_in_cache:AVERAGE",
1838 "DEF:queries_max={file}:queries_in_cache:MAX",
1839 "CDEF:unknown=queries_avg,UNKN,+",
1840 "CDEF:not_cached_agg=hits_avg,inserts_avg,+,not_cached_avg,+",
1841 "CDEF:inserts_agg=hits_avg,inserts_avg,+",
1842 "CDEF:hits_agg=hits_avg",
1843 "AREA:not_cached_agg#$HalfYellow",
1844 "AREA:inserts_agg#$HalfBlue",
1845 "AREA:hits_agg#$HalfGreen",
1846 "LINE1:not_cached_agg#$FullYellow:Not Cached ",
1847 'GPRINT:not_cached_min:MIN:%5.2lf Min,',
1848 'GPRINT:not_cached_avg:AVERAGE:%5.2lf Avg,',
1849 'GPRINT:not_cached_max:MAX:%5.2lf Max,',
1850 'GPRINT:not_cached_avg:LAST:%5.2lf Last\l',
1851 "LINE1:inserts_agg#$FullBlue:Inserts ",
1852 'GPRINT:inserts_min:MIN:%5.2lf Min,',
1853 'GPRINT:inserts_avg:AVERAGE:%5.2lf Avg,',
1854 'GPRINT:inserts_max:MAX:%5.2lf Max,',
1855 'GPRINT:inserts_avg:LAST:%5.2lf Last\l',
1856 "LINE1:hits_agg#$FullGreen:Hits ",
1857 'GPRINT:hits_min:MIN:%5.2lf Min,',
1858 'GPRINT:hits_avg:AVERAGE:%5.2lf Avg,',
1859 'GPRINT:hits_max:MAX:%5.2lf Max,',
1860 'GPRINT:hits_avg:LAST:%5.2lf Last\l',
1861 "LINE1:lowmem_prunes_avg#$FullRed:Lowmem Prunes ",
1862 'GPRINT:lowmem_prunes_min:MIN:%5.2lf Min,',
1863 'GPRINT:lowmem_prunes_avg:AVERAGE:%5.2lf Avg,',
1864 'GPRINT:lowmem_prunes_max:MAX:%5.2lf Max,',
1865 'GPRINT:lowmem_prunes_avg:LAST:%5.2lf Last\l',
1866 "LINE1:unknown#$Canvas:Queries in cache",
1867 'GPRINT:queries_min:MIN:%5.0lf Min,',
1868 'GPRINT:queries_avg:AVERAGE:%5.0lf Avg,',
1869 'GPRINT:queries_max:MAX:%5.0lf Max,',
1870 'GPRINT:queries_avg:LAST:%5.0lf Last\l'
1872 mysql_threads => ['-v', 'Threads',
1873 "DEF:running_min={file}:running:MIN",
1874 "DEF:running_avg={file}:running:AVERAGE",
1875 "DEF:running_max={file}:running:MAX",
1876 "DEF:connected_min={file}:connected:MIN",
1877 "DEF:connected_avg={file}:connected:AVERAGE",
1878 "DEF:connected_max={file}:connected:MAX",
1879 "DEF:cached_min={file}:cached:MIN",
1880 "DEF:cached_avg={file}:cached:AVERAGE",
1881 "DEF:cached_max={file}:cached:MAX",
1882 "DEF:created_min={file}:created:MIN",
1883 "DEF:created_avg={file}:created:AVERAGE",
1884 "DEF:created_max={file}:created:MAX",
1885 "CDEF:unknown=created_avg,UNKN,+",
1886 "CDEF:cached_agg=connected_avg,cached_avg,+",
1887 "AREA:cached_agg#$HalfGreen",
1888 "AREA:connected_avg#$HalfBlue",
1889 "AREA:running_avg#$HalfRed",
1890 "LINE1:cached_agg#$FullGreen:Cached ",
1891 'GPRINT:cached_min:MIN:%5.1lf Min,',
1892 'GPRINT:cached_avg:AVERAGE:%5.1lf Avg,',
1893 'GPRINT:cached_max:MAX:%5.1lf Max,',
1894 'GPRINT:cached_avg:LAST:%5.1lf Last\l',
1895 "LINE1:connected_avg#$FullBlue:Connected",
1896 'GPRINT:connected_min:MIN:%5.1lf Min,',
1897 'GPRINT:connected_avg:AVERAGE:%5.1lf Avg,',
1898 'GPRINT:connected_max:MAX:%5.1lf Max,',
1899 'GPRINT:connected_avg:LAST:%5.1lf Last\l',
1900 "LINE1:running_avg#$FullRed:Running ",
1901 'GPRINT:running_min:MIN:%5.1lf Min,',
1902 'GPRINT:running_avg:AVERAGE:%5.1lf Avg,',
1903 'GPRINT:running_max:MAX:%5.1lf Max,',
1904 'GPRINT:running_avg:LAST:%5.1lf Last\l',
1905 "LINE1:unknown#$Canvas:Created ",
1906 'GPRINT:created_min:MIN:%5.0lf Min,',
1907 'GPRINT:created_avg:AVERAGE:%5.0lf Avg,',
1908 'GPRINT:created_max:MAX:%5.0lf Max,',
1909 'GPRINT:created_avg:LAST:%5.0lf Last\l'
1911 nfs_procedure => ['-v', 'Issues/s',
1912 'DEF:avg={file}:value:AVERAGE',
1913 'DEF:min={file}:value:MIN',
1914 'DEF:max={file}:value:MAX',
1915 "AREA:max#$HalfBlue",
1917 "LINE1:avg#$FullBlue:Issues/s",
1918 'GPRINT:min:MIN:%6.2lf Min,',
1919 'GPRINT:avg:AVERAGE:%6.2lf Avg,',
1920 'GPRINT:max:MAX:%6.2lf Max,',
1921 'GPRINT:avg:LAST:%6.2lf Last\l'
1923 nfs3_procedures => [
1924 "DEF:null_avg={file}:null:AVERAGE",
1925 "DEF:getattr_avg={file}:getattr:AVERAGE",
1926 "DEF:setattr_avg={file}:setattr:AVERAGE",
1927 "DEF:lookup_avg={file}:lookup:AVERAGE",
1928 "DEF:access_avg={file}:access:AVERAGE",
1929 "DEF:readlink_avg={file}:readlink:AVERAGE",
1930 "DEF:read_avg={file}:read:AVERAGE",
1931 "DEF:write_avg={file}:write:AVERAGE",
1932 "DEF:create_avg={file}:create:AVERAGE",
1933 "DEF:mkdir_avg={file}:mkdir:AVERAGE",
1934 "DEF:symlink_avg={file}:symlink:AVERAGE",
1935 "DEF:mknod_avg={file}:mknod:AVERAGE",
1936 "DEF:remove_avg={file}:remove:AVERAGE",
1937 "DEF:rmdir_avg={file}:rmdir:AVERAGE",
1938 "DEF:rename_avg={file}:rename:AVERAGE",
1939 "DEF:link_avg={file}:link:AVERAGE",
1940 "DEF:readdir_avg={file}:readdir:AVERAGE",
1941 "DEF:readdirplus_avg={file}:readdirplus:AVERAGE",
1942 "DEF:fsstat_avg={file}:fsstat:AVERAGE",
1943 "DEF:fsinfo_avg={file}:fsinfo:AVERAGE",
1944 "DEF:pathconf_avg={file}:pathconf:AVERAGE",
1945 "DEF:commit_avg={file}:commit:AVERAGE",
1946 "DEF:null_max={file}:null:MAX",
1947 "DEF:getattr_max={file}:getattr:MAX",
1948 "DEF:setattr_max={file}:setattr:MAX",
1949 "DEF:lookup_max={file}:lookup:MAX",
1950 "DEF:access_max={file}:access:MAX",
1951 "DEF:readlink_max={file}:readlink:MAX",
1952 "DEF:read_max={file}:read:MAX",
1953 "DEF:write_max={file}:write:MAX",
1954 "DEF:create_max={file}:create:MAX",
1955 "DEF:mkdir_max={file}:mkdir:MAX",
1956 "DEF:symlink_max={file}:symlink:MAX",
1957 "DEF:mknod_max={file}:mknod:MAX",
1958 "DEF:remove_max={file}:remove:MAX",
1959 "DEF:rmdir_max={file}:rmdir:MAX",
1960 "DEF:rename_max={file}:rename:MAX",
1961 "DEF:link_max={file}:link:MAX",
1962 "DEF:readdir_max={file}:readdir:MAX",
1963 "DEF:readdirplus_max={file}:readdirplus:MAX",
1964 "DEF:fsstat_max={file}:fsstat:MAX",
1965 "DEF:fsinfo_max={file}:fsinfo:MAX",
1966 "DEF:pathconf_max={file}:pathconf:MAX",
1967 "DEF:commit_max={file}:commit:MAX",
1968 "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,+,+,+,+,+,+,+,+,+,+,+,+,+,+",
1969 "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,+,+,+,+,+,+,+,+,+,+,+,+,+,+",
1970 "CDEF:stack_read=read_avg",
1971 "CDEF:stack_getattr=stack_read,getattr_avg,+",
1972 "CDEF:stack_access=stack_getattr,access_avg,+",
1973 "CDEF:stack_lookup=stack_access,lookup_avg,+",
1974 "CDEF:stack_write=stack_lookup,write_avg,+",
1975 "CDEF:stack_commit=stack_write,commit_avg,+",
1976 "CDEF:stack_setattr=stack_commit,setattr_avg,+",
1977 "CDEF:stack_other=stack_setattr,other_avg,+",
1978 "AREA:stack_other#$HalfRed",
1979 "AREA:stack_setattr#$HalfGreen",
1980 "AREA:stack_commit#$HalfYellow",
1981 "AREA:stack_write#$HalfGreen",
1982 "AREA:stack_lookup#$HalfBlue",
1983 "AREA:stack_access#$HalfMagenta",
1984 "AREA:stack_getattr#$HalfCyan",
1985 "AREA:stack_read#$HalfBlue",
1986 "LINE1:stack_other#$FullRed:Other ",
1987 'GPRINT:other_max:MAX:%5.1lf Max,',
1988 'GPRINT:other_avg:AVERAGE:%5.1lf Avg,',
1989 'GPRINT:other_avg:LAST:%5.1lf Last\l',
1990 "LINE1:stack_setattr#$FullGreen:setattr",
1991 'GPRINT:setattr_max:MAX:%5.1lf Max,',
1992 'GPRINT:setattr_avg:AVERAGE:%5.1lf Avg,',
1993 'GPRINT:setattr_avg:LAST:%5.1lf Last\l',
1994 "LINE1:stack_commit#$FullYellow:commit ",
1995 'GPRINT:commit_max:MAX:%5.1lf Max,',
1996 'GPRINT:commit_avg:AVERAGE:%5.1lf Avg,',
1997 'GPRINT:commit_avg:LAST:%5.1lf Last\l',
1998 "LINE1:stack_write#$FullGreen:write ",
1999 'GPRINT:write_max:MAX:%5.1lf Max,',
2000 'GPRINT:write_avg:AVERAGE:%5.1lf Avg,',
2001 'GPRINT:write_avg:LAST:%5.1lf Last\l',
2002 "LINE1:stack_lookup#$FullBlue:lookup ",
2003 'GPRINT:lookup_max:MAX:%5.1lf Max,',
2004 'GPRINT:lookup_avg:AVERAGE:%5.1lf Avg,',
2005 'GPRINT:lookup_avg:LAST:%5.1lf Last\l',
2006 "LINE1:stack_access#$FullMagenta:access ",
2007 'GPRINT:access_max:MAX:%5.1lf Max,',
2008 'GPRINT:access_avg:AVERAGE:%5.1lf Avg,',
2009 'GPRINT:access_avg:LAST:%5.1lf Last\l',
2010 "LINE1:stack_getattr#$FullCyan:getattr",
2011 'GPRINT:getattr_max:MAX:%5.1lf Max,',
2012 'GPRINT:getattr_avg:AVERAGE:%5.1lf Avg,',
2013 'GPRINT:getattr_avg:LAST:%5.1lf Last\l',
2014 "LINE1:stack_read#$FullBlue:read ",
2015 'GPRINT:read_max:MAX:%5.1lf Max,',
2016 'GPRINT:read_avg:AVERAGE:%5.1lf Avg,',
2017 'GPRINT:read_avg:LAST:%5.1lf Last\l'
2020 "DEF:rbyte_avg={file}:rbytes:AVERAGE",
2021 "DEF:rbyte_min={file}:rbytes:MIN",
2022 "DEF:rbyte_max={file}:rbytes:MAX",
2023 "DEF:wbyte_avg={file}:wbytes:AVERAGE",
2024 "DEF:wbyte_min={file}:wbytes:MIN",
2025 "DEF:wbyte_max={file}:wbytes:MAX",
2026 'CDEF:overlap=wbyte_avg,rbyte_avg,GT,rbyte_avg,wbyte_avg,IF',
2027 "AREA:wbyte_avg#$HalfGreen",
2028 "AREA:rbyte_avg#$HalfBlue",
2029 "AREA:overlap#$HalfBlueGreen",
2030 "LINE1:wbyte_avg#$FullGreen:Write",
2031 'GPRINT:wbyte_min:MIN:%5.1lf%s Min,',
2032 'GPRINT:wbyte_avg:AVERAGE:%5.1lf%s Avg,',
2033 'GPRINT:wbyte_max:MAX:%5.1lf%s Max,',
2034 'GPRINT:wbyte_avg:LAST:%5.1lf%s Last\l',
2035 "LINE1:rbyte_avg#$FullBlue:Read ",
2036 'GPRINT:rbyte_min:MIN:%5.1lf%s Min,',
2037 'GPRINT:rbyte_avg:AVERAGE:%5.1lf%s Avg,',
2038 'GPRINT:rbyte_max:MAX:%5.1lf%s Max,',
2039 'GPRINT:rbyte_avg:LAST:%5.1lf%s Last\l'
2041 percent => ['-v', 'Percent',
2042 'DEF:avg={file}:percent:AVERAGE',
2043 'DEF:min={file}:percent:MIN',
2044 'DEF:max={file}:percent:MAX',
2045 "AREA:max#$HalfBlue",
2047 "LINE1:avg#$FullBlue:Percent",
2048 'GPRINT:min:MIN:%5.1lf%% Min,',
2049 'GPRINT:avg:AVERAGE:%5.1lf%% Avg,',
2050 'GPRINT:max:MAX:%5.1lf%% Max,',
2051 'GPRINT:avg:LAST:%5.1lf%% Last\l'
2053 ping => ['DEF:ping_avg={file}:ping:AVERAGE',
2054 'DEF:ping_min={file}:ping:MIN',
2055 'DEF:ping_max={file}:ping:MAX',
2056 "AREA:ping_max#$HalfBlue",
2057 "AREA:ping_min#$Canvas",
2058 "LINE1:ping_avg#$FullBlue:Ping",
2059 'GPRINT:ping_min:MIN:%4.1lf ms Min,',
2060 'GPRINT:ping_avg:AVERAGE:%4.1lf ms Avg,',
2061 'GPRINT:ping_max:MAX:%4.1lf ms Max,',
2062 'GPRINT:ping_avg:LAST:%4.1lf ms Last'],
2063 pg_blks => ['DEF:pg_blks_avg={file}:value:AVERAGE',
2064 'DEF:pg_blks_min={file}:value:MIN',
2065 'DEF:pg_blks_max={file}:value:MAX',
2066 "AREA:pg_blks_max#$HalfBlue",
2067 "AREA:pg_blks_min#$Canvas",
2068 "LINE1:pg_blks_avg#$FullBlue:Blocks",
2069 'GPRINT:pg_blks_min:MIN:%4.1lf%s Min,',
2070 'GPRINT:pg_blks_avg:AVERAGE:%4.1lf%s Avg,',
2071 'GPRINT:pg_blks_max:MAX:%4.1lf%s Max,',
2072 'GPRINT:pg_blks_avg:LAST:%4.1lf%s Last'],
2073 pg_db_size => ['DEF:pg_db_size_avg={file}:value:AVERAGE',
2074 'DEF:pg_db_size_min={file}:value:MIN',
2075 'DEF:pg_db_size_max={file}:value:MAX',
2076 "AREA:pg_db_size_max#$HalfBlue",
2077 "AREA:pg_db_size_min#$Canvas",
2078 "LINE1:pg_db_size_avg#$FullBlue:Bytes",
2079 'GPRINT:pg_db_size_min:MIN:%4.1lf%s Min,',
2080 'GPRINT:pg_db_size_avg:AVERAGE:%4.1lf%s Avg,',
2081 'GPRINT:pg_db_size_max:MAX:%4.1lf%s Max,',
2082 'GPRINT:pg_db_size_avg:LAST:%4.1lf%s Last'],
2083 pg_n_tup_c => ['DEF:pg_n_tup_avg={file}:value:AVERAGE',
2084 'DEF:pg_n_tup_min={file}:value:MIN',
2085 'DEF:pg_n_tup_max={file}:value:MAX',
2086 "AREA:pg_n_tup_max#$HalfBlue",
2087 "AREA:pg_n_tup_min#$Canvas",
2088 "LINE1:pg_n_tup_avg#$FullBlue:Tuples",
2089 'GPRINT:pg_n_tup_min:MIN:%4.1lf%s Min,',
2090 'GPRINT:pg_n_tup_avg:AVERAGE:%4.1lf%s Avg,',
2091 'GPRINT:pg_n_tup_max:MAX:%4.1lf%s Max,',
2092 'GPRINT:pg_n_tup_avg:LAST:%4.1lf%s Last'],
2093 pg_n_tup_g => ['DEF:pg_n_tup_avg={file}:value:AVERAGE',
2094 'DEF:pg_n_tup_min={file}:value:MIN',
2095 'DEF:pg_n_tup_max={file}:value:MAX',
2096 "AREA:pg_n_tup_max#$HalfBlue",
2097 "AREA:pg_n_tup_min#$Canvas",
2098 "LINE1:pg_n_tup_avg#$FullBlue:Tuples",
2099 'GPRINT:pg_n_tup_min:MIN:%4.1lf%s Min,',
2100 'GPRINT:pg_n_tup_avg:AVERAGE:%4.1lf%s Avg,',
2101 'GPRINT:pg_n_tup_max:MAX:%4.1lf%s Max,',
2102 'GPRINT:pg_n_tup_avg:LAST:%4.1lf%s Last'],
2103 pg_numbackends => ['DEF:pg_numbackends_avg={file}:value:AVERAGE',
2104 'DEF:pg_numbackends_min={file}:value:MIN',
2105 'DEF:pg_numbackends_max={file}:value:MAX',
2106 "AREA:pg_numbackends_max#$HalfBlue",
2107 "AREA:pg_numbackends_min#$Canvas",
2108 "LINE1:pg_numbackends_avg#$FullBlue:Backends",
2109 'GPRINT:pg_numbackends_min:MIN:%4.1lf%s Min,',
2110 'GPRINT:pg_numbackends_avg:AVERAGE:%4.1lf%s Avg,',
2111 'GPRINT:pg_numbackends_max:MAX:%4.1lf%s Max,',
2112 'GPRINT:pg_numbackends_avg:LAST:%4.1lf%s Last'],
2113 pg_scan => ['DEF:pg_scan_avg={file}:value:AVERAGE',
2114 'DEF:pg_scan_min={file}:value:MIN',
2115 'DEF:pg_scan_max={file}:value:MAX',
2116 "AREA:pg_scan_max#$HalfBlue",
2117 "AREA:pg_scan_min#$Canvas",
2118 "LINE1:pg_scan_avg#$FullBlue:Scans",
2119 'GPRINT:pg_scan_min:MIN:%4.1lf%s Min,',
2120 'GPRINT:pg_scan_avg:AVERAGE:%4.1lf%s Avg,',
2121 'GPRINT:pg_scan_max:MAX:%4.1lf%s Max,',
2122 'GPRINT:pg_scan_avg:LAST:%4.1lf%s Last'],
2123 pg_xact => ['DEF:pg_xact_avg={file}:value:AVERAGE',
2124 'DEF:pg_xact_min={file}:value:MIN',
2125 'DEF:pg_xact_max={file}:value:MAX',
2126 "AREA:pg_xact_max#$HalfBlue",
2127 "AREA:pg_xact_min#$Canvas",
2128 "LINE1:pg_xact_avg#$FullBlue:Transactions",
2129 'GPRINT:pg_xact_min:MIN:%4.1lf%s Min,',
2130 'GPRINT:pg_xact_avg:AVERAGE:%4.1lf%s Avg,',
2131 'GPRINT:pg_xact_max:MAX:%4.1lf%s Max,',
2132 'GPRINT:pg_xact_avg:LAST:%4.1lf%s Last'],
2133 power => ['-v', 'Watt',
2134 'DEF:avg={file}:value:AVERAGE',
2135 'DEF:min={file}:value:MIN',
2136 'DEF:max={file}:value:MAX',
2137 "AREA:max#$HalfBlue",
2139 "LINE1:avg#$FullBlue:Watt",
2140 'GPRINT:min:MIN:%5.1lf%sW Min,',
2141 'GPRINT:avg:AVERAGE:%5.1lf%sW Avg,',
2142 'GPRINT:max:MAX:%5.1lf%sW Max,',
2143 'GPRINT:avg:LAST:%5.1lf%sW Last\l'
2146 "DEF:running_avg={file}:running:AVERAGE",
2147 "DEF:running_min={file}:running:MIN",
2148 "DEF:running_max={file}:running:MAX",
2149 "DEF:sleeping_avg={file}:sleeping:AVERAGE",
2150 "DEF:sleeping_min={file}:sleeping:MIN",
2151 "DEF:sleeping_max={file}:sleeping:MAX",
2152 "DEF:zombies_avg={file}:zombies:AVERAGE",
2153 "DEF:zombies_min={file}:zombies:MIN",
2154 "DEF:zombies_max={file}:zombies:MAX",
2155 "DEF:stopped_avg={file}:stopped:AVERAGE",
2156 "DEF:stopped_min={file}:stopped:MIN",
2157 "DEF:stopped_max={file}:stopped:MAX",
2158 "DEF:paging_avg={file}:paging:AVERAGE",
2159 "DEF:paging_min={file}:paging:MIN",
2160 "DEF:paging_max={file}:paging:MAX",
2161 "DEF:blocked_avg={file}:blocked:AVERAGE",
2162 "DEF:blocked_min={file}:blocked:MIN",
2163 "DEF:blocked_max={file}:blocked:MAX",
2164 'CDEF:paging_acc=sleeping_avg,running_avg,stopped_avg,zombies_avg,blocked_avg,paging_avg,+,+,+,+,+',
2165 'CDEF:blocked_acc=sleeping_avg,running_avg,stopped_avg,zombies_avg,blocked_avg,+,+,+,+',
2166 'CDEF:zombies_acc=sleeping_avg,running_avg,stopped_avg,zombies_avg,+,+,+',
2167 'CDEF:stopped_acc=sleeping_avg,running_avg,stopped_avg,+,+',
2168 'CDEF:running_acc=sleeping_avg,running_avg,+',
2169 'CDEF:sleeping_acc=sleeping_avg',
2170 "AREA:paging_acc#$HalfYellow",
2171 "AREA:blocked_acc#$HalfCyan",
2172 "AREA:zombies_acc#$HalfRed",
2173 "AREA:stopped_acc#$HalfMagenta",
2174 "AREA:running_acc#$HalfGreen",
2175 "AREA:sleeping_acc#$HalfBlue",
2176 "LINE1:paging_acc#$FullYellow:Paging ",
2177 'GPRINT:paging_min:MIN:%5.1lf Min,',
2178 'GPRINT:paging_avg:AVERAGE:%5.1lf Average,',
2179 'GPRINT:paging_max:MAX:%5.1lf Max,',
2180 'GPRINT:paging_avg:LAST:%5.1lf Last\l',
2181 "LINE1:blocked_acc#$FullCyan:Blocked ",
2182 'GPRINT:blocked_min:MIN:%5.1lf Min,',
2183 'GPRINT:blocked_avg:AVERAGE:%5.1lf Average,',
2184 'GPRINT:blocked_max:MAX:%5.1lf Max,',
2185 'GPRINT:blocked_avg:LAST:%5.1lf Last\l',
2186 "LINE1:zombies_acc#$FullRed:Zombies ",
2187 'GPRINT:zombies_min:MIN:%5.1lf Min,',
2188 'GPRINT:zombies_avg:AVERAGE:%5.1lf Average,',
2189 'GPRINT:zombies_max:MAX:%5.1lf Max,',
2190 'GPRINT:zombies_avg:LAST:%5.1lf Last\l',
2191 "LINE1:stopped_acc#$FullMagenta:Stopped ",
2192 'GPRINT:stopped_min:MIN:%5.1lf Min,',
2193 'GPRINT:stopped_avg:AVERAGE:%5.1lf Average,',
2194 'GPRINT:stopped_max:MAX:%5.1lf Max,',
2195 'GPRINT:stopped_avg:LAST:%5.1lf Last\l',
2196 "LINE1:running_acc#$FullGreen:Running ",
2197 'GPRINT:running_min:MIN:%5.1lf Min,',
2198 'GPRINT:running_avg:AVERAGE:%5.1lf Average,',
2199 'GPRINT:running_max:MAX:%5.1lf Max,',
2200 'GPRINT:running_avg:LAST:%5.1lf Last\l',
2201 "LINE1:sleeping_acc#$FullBlue:Sleeping",
2202 'GPRINT:sleeping_min:MIN:%5.1lf Min,',
2203 'GPRINT:sleeping_avg:AVERAGE:%5.1lf Average,',
2204 'GPRINT:sleeping_max:MAX:%5.1lf Max,',
2205 'GPRINT:sleeping_avg:LAST:%5.1lf Last\l'
2207 ps_count => ['-v', 'Processes',
2208 'DEF:procs_avg={file}:processes:AVERAGE',
2209 'DEF:procs_min={file}:processes:MIN',
2210 'DEF:procs_max={file}:processes:MAX',
2211 'DEF:thrds_avg={file}:threads:AVERAGE',
2212 'DEF:thrds_min={file}:threads:MIN',
2213 'DEF:thrds_max={file}:threads:MAX',
2214 "AREA:thrds_avg#$HalfBlue",
2215 "AREA:procs_avg#$HalfRed",
2216 "LINE1:thrds_avg#$FullBlue:Threads ",
2217 'GPRINT:thrds_min:MIN:%5.1lf Min,',
2218 'GPRINT:thrds_avg:AVERAGE:%5.1lf Avg,',
2219 'GPRINT:thrds_max:MAX:%5.1lf Max,',
2220 'GPRINT:thrds_avg:LAST:%5.1lf Last\l',
2221 "LINE1:procs_avg#$FullRed:Processes",
2222 'GPRINT:procs_min:MIN:%5.1lf Min,',
2223 'GPRINT:procs_avg:AVERAGE:%5.1lf Avg,',
2224 'GPRINT:procs_max:MAX:%5.1lf Max,',
2225 'GPRINT:procs_avg:LAST:%5.1lf Last\l'
2227 ps_cputime => ['-v', 'Jiffies',
2228 'DEF:user_avg_raw={file}:user:AVERAGE',
2229 'DEF:user_min_raw={file}:user:MIN',
2230 'DEF:user_max_raw={file}:user:MAX',
2231 'DEF:syst_avg_raw={file}:syst:AVERAGE',
2232 'DEF:syst_min_raw={file}:syst:MIN',
2233 'DEF:syst_max_raw={file}:syst:MAX',
2234 'CDEF:user_avg=user_avg_raw,1000000,/',
2235 'CDEF:user_min=user_min_raw,1000000,/',
2236 'CDEF:user_max=user_max_raw,1000000,/',
2237 'CDEF:syst_avg=syst_avg_raw,1000000,/',
2238 'CDEF:syst_min=syst_min_raw,1000000,/',
2239 'CDEF:syst_max=syst_max_raw,1000000,/',
2240 'CDEF:user_syst=syst_avg,UN,0,syst_avg,IF,user_avg,+',
2241 "AREA:user_syst#$HalfBlue",
2242 "AREA:syst_avg#$HalfRed",
2243 "LINE1:user_syst#$FullBlue:User ",
2244 'GPRINT:user_min:MIN:%5.1lf%s Min,',
2245 'GPRINT:user_avg:AVERAGE:%5.1lf%s Avg,',
2246 'GPRINT:user_max:MAX:%5.1lf%s Max,',
2247 'GPRINT:user_avg:LAST:%5.1lf%s Last\l',
2248 "LINE1:syst_avg#$FullRed:System",
2249 'GPRINT:syst_min:MIN:%5.1lf%s Min,',
2250 'GPRINT:syst_avg:AVERAGE:%5.1lf%s Avg,',
2251 'GPRINT:syst_max:MAX:%5.1lf%s Max,',
2252 'GPRINT:syst_avg:LAST:%5.1lf%s Last\l'
2254 ps_pagefaults => ['-v', 'Pagefaults/s',
2255 'DEF:minor_avg={file}:minflt:AVERAGE',
2256 'DEF:minor_min={file}:minflt:MIN',
2257 'DEF:minor_max={file}:minflt:MAX',
2258 'DEF:major_avg={file}:majflt:AVERAGE',
2259 'DEF:major_min={file}:majflt:MIN',
2260 'DEF:major_max={file}:majflt:MAX',
2261 'CDEF:minor_major=major_avg,UN,0,major_avg,IF,minor_avg,+',
2262 "AREA:minor_major#$HalfBlue",
2263 "AREA:major_avg#$HalfRed",
2264 "LINE1:minor_major#$FullBlue:Minor",
2265 'GPRINT:minor_min:MIN:%5.1lf%s Min,',
2266 'GPRINT:minor_avg:AVERAGE:%5.1lf%s Avg,',
2267 'GPRINT:minor_max:MAX:%5.1lf%s Max,',
2268 'GPRINT:minor_avg:LAST:%5.1lf%s Last\l',
2269 "LINE1:major_avg#$FullRed:Major",
2270 'GPRINT:major_min:MIN:%5.1lf%s Min,',
2271 'GPRINT:major_avg:AVERAGE:%5.1lf%s Avg,',
2272 'GPRINT:major_max:MAX:%5.1lf%s Max,',
2273 'GPRINT:major_avg:LAST:%5.1lf%s Last\l'
2275 ps_rss => ['-v', 'Bytes',
2276 'DEF:avg={file}:value:AVERAGE',
2277 'DEF:min={file}:value:MIN',
2278 'DEF:max={file}:value:MAX',
2279 "AREA:avg#$HalfBlue",
2280 "LINE1:avg#$FullBlue:RSS",
2281 'GPRINT:min:MIN:%5.1lf%s Min,',
2282 'GPRINT:avg:AVERAGE:%5.1lf%s Avg,',
2283 'GPRINT:max:MAX:%5.1lf%s Max,',
2284 'GPRINT:avg:LAST:%5.1lf%s Last\l'
2286 ps_state => ['-v', 'Processes',
2287 'DEF:avg={file}:value:AVERAGE',
2288 'DEF:min={file}:value:MIN',
2289 'DEF:max={file}:value:MAX',
2290 "AREA:max#$HalfBlue",
2292 "LINE1:avg#$FullBlue:Processes",
2293 'GPRINT:min:MIN:%6.2lf Min,',
2294 'GPRINT:avg:AVERAGE:%6.2lf Avg,',
2295 'GPRINT:max:MAX:%6.2lf Max,',
2296 'GPRINT:avg:LAST:%6.2lf Last\l'
2298 signal_noise => ['-v', 'dBm',
2299 'DEF:avg={file}:value:AVERAGE',
2300 'DEF:min={file}:value:MIN',
2301 'DEF:max={file}:value:MAX',
2302 "AREA:max#$HalfBlue",
2304 "LINE1:avg#$FullBlue:Noise",
2305 'GPRINT:min:MIN:%5.1lf%sdBm Min,',
2306 'GPRINT:avg:AVERAGE:%5.1lf%sdBm Avg,',
2307 'GPRINT:max:MAX:%5.1lf%sdBm Max,',
2308 'GPRINT:avg:LAST:%5.1lf%sdBm Last\l'
2310 signal_power => ['-v', 'dBm',
2311 'DEF:avg={file}:value:AVERAGE',
2312 'DEF:min={file}:value:MIN',
2313 'DEF:max={file}:value:MAX',
2314 "AREA:max#$HalfBlue",
2316 "LINE1:avg#$FullBlue:Power",
2317 'GPRINT:min:MIN:%5.1lf%sdBm Min,',
2318 'GPRINT:avg:AVERAGE:%5.1lf%sdBm Avg,',
2319 'GPRINT:max:MAX:%5.1lf%sdBm Max,',
2320 'GPRINT:avg:LAST:%5.1lf%sdBm Last\l'
2322 signal_quality => ['-v', '%',
2323 'DEF:avg={file}:value:AVERAGE',
2324 'DEF:min={file}:value:MIN',
2325 'DEF:max={file}:value:MAX',
2326 "AREA:max#$HalfBlue",
2328 "LINE1:avg#$FullBlue:Quality",
2329 'GPRINT:min:MIN:%5.1lf%s%% Min,',
2330 'GPRINT:avg:AVERAGE:%5.1lf%s%% Avg,',
2331 'GPRINT:max:MAX:%5.1lf%s%% Max,',
2332 'GPRINT:avg:LAST:%5.1lf%s%% Last\l'
2334 swap => ['-v', 'Bytes', '-b', '1024',
2335 'DEF:avg={file}:value:AVERAGE',
2336 'DEF:min={file}:value:MIN',
2337 'DEF:max={file}:value:MAX',
2338 "AREA:max#$HalfBlue",
2340 "LINE1:avg#$FullBlue:Bytes",
2341 'GPRINT:min:MIN:%6.2lf%sByte Min,',
2342 'GPRINT:avg:AVERAGE:%6.2lf%sByte Avg,',
2343 'GPRINT:max:MAX:%6.2lf%sByte Max,',
2344 'GPRINT:avg:LAST:%6.2lf%sByte Last\l'
2347 'DEF:used_avg={file}:used:AVERAGE',
2348 'DEF:used_min={file}:used:MIN',
2349 'DEF:used_max={file}:used:MAX',
2350 'DEF:free_avg={file}:free:AVERAGE',
2351 'DEF:free_min={file}:free:MIN',
2352 'DEF:free_max={file}:free:MAX',
2353 'DEF:cach_avg={file}:cached:AVERAGE',
2354 'DEF:cach_min={file}:cached:MIN',
2355 'DEF:cach_max={file}:cached:MAX',
2356 'DEF:resv_avg={file}:resv:AVERAGE',
2357 'DEF:resv_min={file}:resv:MIN',
2358 'DEF:resv_max={file}:resv:MAX',
2359 'CDEF:cach_avg_notnull=cach_avg,UN,0,cach_avg,IF',
2360 'CDEF:resv_avg_notnull=resv_avg,UN,0,resv_avg,IF',
2361 'CDEF:used_acc=used_avg',
2362 'CDEF:resv_acc=used_acc,resv_avg_notnull,+',
2363 'CDEF:cach_acc=resv_acc,cach_avg_notnull,+',
2364 'CDEF:free_acc=cach_acc,free_avg,+',
2365 "AREA:free_acc#$HalfGreen",
2366 "AREA:cach_acc#$HalfBlue",
2367 "AREA:resv_acc#$HalfYellow",
2368 "AREA:used_acc#$HalfRed",
2369 "LINE1:free_acc#$FullGreen:Free ",
2370 'GPRINT:free_min:MIN:%5.1lf%s Min,',
2371 'GPRINT:free_avg:AVERAGE:%5.1lf%s Avg,',
2372 'GPRINT:free_max:MAX:%5.1lf%s Max,',
2373 'GPRINT:free_avg:LAST:%5.1lf%s Last\n',
2374 "LINE1:cach_acc#$FullBlue:Cached ",
2375 'GPRINT:cach_min:MIN:%5.1lf%s Min,',
2376 'GPRINT:cach_avg:AVERAGE:%5.1lf%s Avg,',
2377 'GPRINT:cach_max:MAX:%5.1lf%s Max,',
2378 'GPRINT:cach_avg:LAST:%5.1lf%s Last\l',
2379 "LINE1:resv_acc#$FullYellow:Reserved",
2380 'GPRINT:resv_min:MIN:%5.1lf%s Min,',
2381 'GPRINT:resv_avg:AVERAGE:%5.1lf%s Avg,',
2382 'GPRINT:resv_max:MAX:%5.1lf%s Max,',
2383 'GPRINT:resv_avg:LAST:%5.1lf%s Last\n',
2384 "LINE1:used_acc#$FullRed:Used ",
2385 'GPRINT:used_min:MIN:%5.1lf%s Min,',
2386 'GPRINT:used_avg:AVERAGE:%5.1lf%s Avg,',
2387 'GPRINT:used_max:MAX:%5.1lf%s Max,',
2388 'GPRINT:used_avg:LAST:%5.1lf%s Last\l'
2390 tcp_connections => ['-v', 'Connections',
2391 'DEF:avg={file}:value:AVERAGE',
2392 'DEF:min={file}:value:MIN',
2393 'DEF:max={file}:value:MAX',
2394 "AREA:max#$HalfBlue",
2396 "LINE1:avg#$FullBlue:Connections",
2397 'GPRINT:min:MIN:%4.1lf Min,',
2398 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
2399 'GPRINT:max:MAX:%4.1lf Max,',
2400 'GPRINT:avg:LAST:%4.1lf Last\l'
2402 temperature => ['-v', 'Celsius',
2403 'DEF:temp_avg={file}:value:AVERAGE',
2404 'DEF:temp_min={file}:value:MIN',
2405 'DEF:temp_max={file}:value:MAX',
2406 'CDEF:average=temp_avg,0.2,*,PREV,UN,temp_avg,PREV,IF,0.8,*,+',
2407 "AREA:temp_max#$HalfRed",
2408 "AREA:temp_min#$Canvas",
2409 "LINE1:temp_avg#$FullRed:Temperature",
2410 'GPRINT:temp_min:MIN:%4.1lf Min,',
2411 'GPRINT:temp_avg:AVERAGE:%4.1lf Avg,',
2412 'GPRINT:temp_max:MAX:%4.1lf Max,',
2413 'GPRINT:temp_avg:LAST:%4.1lf Last\l'
2415 timeleft => ['-v', 'Minutes',
2416 'DEF:avg={file}:timeleft:AVERAGE',
2417 'DEF:min={file}:timeleft:MIN',
2418 'DEF:max={file}:timeleft:MAX',
2419 "AREA:max#$HalfBlue",
2421 "LINE1:avg#$FullBlue:Time left [min]",
2422 'GPRINT:min:MIN:%5.1lf%s Min,',
2423 'GPRINT:avg:AVERAGE:%5.1lf%s Avg,',
2424 'GPRINT:max:MAX:%5.1lf%s Max,',
2425 'GPRINT:avg:LAST:%5.1lf%s Last\l'
2427 time_offset => [ # NTPd
2428 'DEF:s_avg={file}:seconds:AVERAGE',
2429 'DEF:s_min={file}:seconds:MIN',
2430 'DEF:s_max={file}:seconds:MAX',
2431 "AREA:s_max#$HalfBlue",
2432 "AREA:s_min#$Canvas",
2433 "LINE1:s_avg#$FullBlue:{inst}",
2434 'GPRINT:s_min:MIN:%7.3lf%s Min,',
2435 'GPRINT:s_avg:AVERAGE:%7.3lf%s Avg,',
2436 'GPRINT:s_max:MAX:%7.3lf%s Max,',
2437 'GPRINT:s_avg:LAST:%7.3lf%s Last'
2439 if_octets => ['-v', 'Bits/s', '-l', '0',
2440 'DEF:out_min_raw={file}:tx:MIN',
2441 'DEF:out_avg_raw={file}:tx:AVERAGE',
2442 'DEF:out_max_raw={file}:tx:MAX',
2443 'DEF:inc_min_raw={file}:rx:MIN',
2444 'DEF:inc_avg_raw={file}:rx:AVERAGE',
2445 'DEF:inc_max_raw={file}:rx:MAX',
2446 'CDEF:out_min=out_min_raw,8,*',
2447 'CDEF:out_avg=out_avg_raw,8,*',
2448 'CDEF:out_max=out_max_raw,8,*',
2449 'CDEF:inc_min=inc_min_raw,8,*',
2450 'CDEF:inc_avg=inc_avg_raw,8,*',
2451 'CDEF:inc_max=inc_max_raw,8,*',
2452 'CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF',
2453 'CDEF:mytime=out_avg_raw,TIME,TIME,IF',
2454 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
2455 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
2456 'CDEF:out_avg_sample=out_avg_raw,UN,0,out_avg_raw,IF,sample_len,*',
2457 'CDEF:out_avg_sum=PREV,UN,0,PREV,IF,out_avg_sample,+',
2458 'CDEF:inc_avg_sample=inc_avg_raw,UN,0,inc_avg_raw,IF,sample_len,*',
2459 'CDEF:inc_avg_sum=PREV,UN,0,PREV,IF,inc_avg_sample,+',
2460 "AREA:out_avg#$HalfGreen",
2461 "AREA:inc_avg#$HalfBlue",
2462 "AREA:overlap#$HalfBlueGreen",
2463 "LINE1:out_avg#$FullGreen:Outgoing",
2464 'GPRINT:out_avg:AVERAGE:%5.1lf%s Avg,',
2465 'GPRINT:out_max:MAX:%5.1lf%s Max,',
2466 'GPRINT:out_avg:LAST:%5.1lf%s Last',
2467 'GPRINT:out_avg_sum:LAST:(ca. %5.1lf%sB Total)\l',
2468 "LINE1:inc_avg#$FullBlue:Incoming",
2469 #'GPRINT:inc_min:MIN:%5.1lf %s Min,',
2470 'GPRINT:inc_avg:AVERAGE:%5.1lf%s Avg,',
2471 'GPRINT:inc_max:MAX:%5.1lf%s Max,',
2472 'GPRINT:inc_avg:LAST:%5.1lf%s Last',
2473 'GPRINT:inc_avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
2476 'DEF:cpufreq_avg={file}:value:AVERAGE',
2477 'DEF:cpufreq_min={file}:value:MIN',
2478 'DEF:cpufreq_max={file}:value:MAX',
2479 "AREA:cpufreq_max#$HalfBlue",
2480 "AREA:cpufreq_min#$Canvas",
2481 "LINE1:cpufreq_avg#$FullBlue:Frequency",
2482 'GPRINT:cpufreq_min:MIN:%5.1lf%s Min,',
2483 'GPRINT:cpufreq_avg:AVERAGE:%5.1lf%s Avg,',
2484 'GPRINT:cpufreq_max:MAX:%5.1lf%s Max,',
2485 'GPRINT:cpufreq_avg:LAST:%5.1lf%s Last\l'
2488 'DEF:multimeter_avg={file}:value:AVERAGE',
2489 'DEF:multimeter_min={file}:value:MIN',
2490 'DEF:multimeter_max={file}:value:MAX',
2491 "AREA:multimeter_max#$HalfBlue",
2492 "AREA:multimeter_min#$Canvas",
2493 "LINE1:multimeter_avg#$FullBlue:Multimeter",
2494 'GPRINT:multimeter_min:MIN:%4.1lf Min,',
2495 'GPRINT:multimeter_avg:AVERAGE:%4.1lf Average,',
2496 'GPRINT:multimeter_max:MAX:%4.1lf Max,',
2497 'GPRINT:multimeter_avg:LAST:%4.1lf Last\l'
2499 users => ['-v', 'Users',
2500 'DEF:users_avg={file}:users:AVERAGE',
2501 'DEF:users_min={file}:users:MIN',
2502 'DEF:users_max={file}:users:MAX',
2503 "AREA:users_max#$HalfBlue",
2504 "AREA:users_min#$Canvas",
2505 "LINE1:users_avg#$FullBlue:Users",
2506 'GPRINT:users_min:MIN:%4.1lf Min,',
2507 'GPRINT:users_avg:AVERAGE:%4.1lf Average,',
2508 'GPRINT:users_max:MAX:%4.1lf Max,',
2509 'GPRINT:users_avg:LAST:%4.1lf Last\l'
2511 voltage => ['-v', 'Voltage',
2512 'DEF:avg={file}:value:AVERAGE',
2513 'DEF:min={file}:value:MIN',
2514 'DEF:max={file}:value:MAX',
2515 "AREA:max#$HalfBlue",
2517 "LINE1:avg#$FullBlue:Voltage",
2518 'GPRINT:min:MIN:%5.1lf%sV Min,',
2519 'GPRINT:avg:AVERAGE:%5.1lf%sV Avg,',
2520 'GPRINT:max:MAX:%5.1lf%sV Max,',
2521 'GPRINT:avg:LAST:%5.1lf%sV Last\l'
2524 "DEF:avg={file}:value:AVERAGE",
2525 "DEF:min={file}:value:MIN",
2526 "DEF:max={file}:value:MAX",
2527 "AREA:max#$HalfBlue",
2529 "LINE1:avg#$FullBlue:Threads",
2530 'GPRINT:min:MIN:%5.1lf Min,',
2531 'GPRINT:avg:AVERAGE:%5.1lf Avg.,',
2532 'GPRINT:max:MAX:%5.1lf Max,',
2533 'GPRINT:avg:LAST:%5.1lf Last\l',
2535 vs_memory => ['-b', '1024', '-v', 'Bytes',
2536 "DEF:avg={file}:value:AVERAGE",
2537 "DEF:min={file}:value:MIN",
2538 "DEF:max={file}:value:MAX",
2539 "AREA:max#$HalfBlue",
2541 "LINE1:avg#$FullBlue:",
2542 'GPRINT:min:MIN:%5.1lf%sbytes Min,',
2543 'GPRINT:avg:AVERAGE:%5.1lf%sbytes Avg.,',
2544 'GPRINT:max:MAX:%5.1lf%sbytes Max,',
2545 'GPRINT:avg:LAST:%5.1lf%sbytes Last\l',
2548 "DEF:avg={file}:value:AVERAGE",
2549 "DEF:min={file}:value:MIN",
2550 "DEF:max={file}:value:MAX",
2551 "AREA:max#$HalfBlue",
2553 "LINE1:avg#$FullBlue:Processes",
2554 'GPRINT:min:MIN:%5.1lf Min,',
2555 'GPRINT:avg:AVERAGE:%5.1lf Avg.,',
2556 'GPRINT:max:MAX:%5.1lf Max,',
2557 'GPRINT:avg:LAST:%5.1lf Last\l',
2559 vmpage_number => ['-v', 'Pages',
2560 'DEF:avg={file}:value:AVERAGE',
2561 'DEF:min={file}:value:MIN',
2562 'DEF:max={file}:value:MAX',
2563 "AREA:max#$HalfBlue",
2565 "LINE1:avg#$FullBlue:Number",
2566 'GPRINT:min:MIN:%4.1lf Min,',
2567 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
2568 'GPRINT:max:MAX:%4.1lf Max,',
2569 'GPRINT:avg:LAST:%4.1lf Last\l'
2572 "DEF:minf_avg={file}:minflt:AVERAGE",
2573 "DEF:minf_min={file}:minflt:MIN",
2574 "DEF:minf_max={file}:minflt:MAX",
2575 "DEF:majf_avg={file}:majflt:AVERAGE",
2576 "DEF:majf_min={file}:majflt:MIN",
2577 "DEF:majf_max={file}:majflt:MAX",
2578 'CDEF:overlap=majf_avg,minf_avg,GT,minf_avg,majf_avg,IF',
2579 "AREA:majf_avg#$HalfGreen",
2580 "AREA:minf_avg#$HalfBlue",
2581 "AREA:overlap#$HalfBlueGreen",
2582 "LINE1:majf_avg#$FullGreen:Major",
2583 'GPRINT:majf_min:MIN:%5.1lf%s Min,',
2584 'GPRINT:majf_avg:AVERAGE:%5.1lf%s Avg,',
2585 'GPRINT:majf_max:MAX:%5.1lf%s Max,',
2586 'GPRINT:majf_avg:LAST:%5.1lf%s Last\l',
2587 "LINE1:minf_avg#$FullBlue:Minor",
2588 'GPRINT:minf_min:MIN:%5.1lf%s Min,',
2589 'GPRINT:minf_avg:AVERAGE:%5.1lf%s Avg,',
2590 'GPRINT:minf_max:MAX:%5.1lf%s Max,',
2591 'GPRINT:minf_avg:LAST:%5.1lf%s Last\l'
2594 "DEF:rpag_avg={file}:in:AVERAGE",
2595 "DEF:rpag_min={file}:in:MIN",
2596 "DEF:rpag_max={file}:in:MAX",
2597 "DEF:wpag_avg={file}:out:AVERAGE",
2598 "DEF:wpag_min={file}:out:MIN",
2599 "DEF:wpag_max={file}:out:MAX",
2600 'CDEF:overlap=wpag_avg,rpag_avg,GT,rpag_avg,wpag_avg,IF',
2601 "AREA:wpag_avg#$HalfGreen",
2602 "AREA:rpag_avg#$HalfBlue",
2603 "AREA:overlap#$HalfBlueGreen",
2604 "LINE1:wpag_avg#$FullGreen:OUT",
2605 'GPRINT:wpag_min:MIN:%5.1lf%s Min,',
2606 'GPRINT:wpag_avg:AVERAGE:%5.1lf%s Avg,',
2607 'GPRINT:wpag_max:MAX:%5.1lf%s Max,',
2608 'GPRINT:wpag_avg:LAST:%5.1lf%s Last\l',
2609 "LINE1:rpag_avg#$FullBlue:IN ",
2610 'GPRINT:rpag_min:MIN:%5.1lf%s Min,',
2611 'GPRINT:rpag_avg:AVERAGE:%5.1lf%s Avg,',
2612 'GPRINT:rpag_max:MAX:%5.1lf%s Max,',
2613 'GPRINT:rpag_avg:LAST:%5.1lf%s Last\l'
2615 vmpage_action => ['-v', 'Pages',
2616 'DEF:avg={file}:value:AVERAGE',
2617 'DEF:min={file}:value:MIN',
2618 'DEF:max={file}:value:MAX',
2619 "AREA:max#$HalfBlue",
2621 "LINE1:avg#$FullBlue:Number",
2622 'GPRINT:min:MIN:%4.1lf Min,',
2623 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
2624 'GPRINT:max:MAX:%4.1lf Max,',
2625 'GPRINT:avg:LAST:%4.1lf Last\l'
2627 virt_cpu_total => ['-v', 'Milliseconds',
2628 'DEF:avg_raw={file}:ns:AVERAGE',
2629 'DEF:min_raw={file}:ns:MIN',
2630 'DEF:max_raw={file}:ns:MAX',
2631 'CDEF:avg=avg_raw,1000000,/',
2632 'CDEF:min=min_raw,1000000,/',
2633 'CDEF:max=max_raw,1000000,/',
2634 "AREA:avg#$HalfBlue",
2635 "LINE1:avg#$FullBlue:CPU time",
2636 'GPRINT:min:MIN:%4.1lf Min,',
2637 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
2638 'GPRINT:max:MAX:%4.1lf Max,',
2639 'GPRINT:avg:LAST:%4.1lf Last\l'
2642 $GraphDefs->{'if_multicast'} = $GraphDefs->{'ipt_packets'};
2643 $GraphDefs->{'if_tx_errors'} = $GraphDefs->{'if_rx_errors'};
2644 $GraphDefs->{'dns_qtype'} = $GraphDefs->{'dns_opcode'};
2645 $GraphDefs->{'dns_rcode'} = $GraphDefs->{'dns_opcode'};
2646 $GraphDefs->{'vmpage_io-memory'} = $GraphDefs->{'vmpage_io'};
2647 $GraphDefs->{'vmpage_io-swap'} = $GraphDefs->{'vmpage_io'};
2648 $GraphDefs->{'virt_cpu_total'} = $GraphDefs->{'virt_cpu_total'};
2650 $MetaGraphDefs->{'cpu'} = \&meta_graph_cpu;
2651 $MetaGraphDefs->{'dns_qtype'} = \&meta_graph_dns;
2652 $MetaGraphDefs->{'dns_rcode'} = \&meta_graph_dns;
2653 $MetaGraphDefs->{'if_rx_errors'} = \&meta_graph_if_rx_errors;
2654 $MetaGraphDefs->{'if_tx_errors'} = \&meta_graph_if_rx_errors;
2655 $MetaGraphDefs->{'memory'} = \&meta_graph_memory;
2656 $MetaGraphDefs->{'nfs_procedure'} = \&meta_graph_nfs_procedure;
2657 $MetaGraphDefs->{'ps_state'} = \&meta_graph_ps_state;
2658 $MetaGraphDefs->{'swap'} = \&meta_graph_swap;
2659 $MetaGraphDefs->{'mysql_commands'} = \&meta_graph_mysql_commands;
2660 $MetaGraphDefs->{'mysql_handler'} = \&meta_graph_mysql_commands;
2661 $MetaGraphDefs->{'tcp_connections'} = \&meta_graph_tcp_connections;
2662 $MetaGraphDefs->{'vmpage_number'} = \&meta_graph_vmpage_number;
2663 $MetaGraphDefs->{'vmpage_action'} = \&meta_graph_vmpage_action;
2664 } # load_graph_definitions
2666 sub meta_graph_generic_stack
2668 confess ("Wrong number of arguments") if (@_ != 2);
2671 my $sources = shift;
2674 my $timespan_str = _get_param_timespan ();
2675 my $timespan_int = (-1) * $ValidTimespan->{$timespan_str};
2677 $opts->{'title'} ||= 'Unknown title';
2678 $opts->{'rrd_opts'} ||= [];
2679 $opts->{'colors'} ||= {};
2681 my @cmd = ('-', '-a', 'PNG', '-s', $timespan_int,
2682 '-t', $opts->{'title'} || 'Unknown title',
2683 @RRDDefaultArgs, @{$opts->{'rrd_opts'}});
2685 my $max_inst_name = 0;
2688 for ($i = 0; $i < @$sources; $i++)
2690 my $tmp = $sources->[$i]->{'name'};
2691 $tmp =~ tr/A-Za-z0-9\-_/_/c;
2692 $vnames[$i] = $i . $tmp;
2695 for ($i = 0; $i < @$sources; $i++)
2697 my $inst_data = $sources->[$i];
2698 my $inst_name = $inst_data->{'name'} || confess;
2699 my $file = $inst_data->{'file'} || confess;
2700 my $vname = $vnames[$i];
2702 if (length ($inst_name) > $max_inst_name)
2704 $max_inst_name = length ($inst_name);
2707 confess ("No such file: $file") if (!-e $file);
2710 qq#DEF:${vname}_min=$file:value:MIN#,
2711 qq#DEF:${vname}_avg=$file:value:AVERAGE#,
2712 qq#DEF:${vname}_max=$file:value:MAX#,
2713 qq#CDEF:${vname}_nnl=${vname}_avg,UN,0,${vname}_avg,IF#);
2717 my $vname = $vnames[@vnames - 1];
2719 push (@cmd, qq#CDEF:${vname}_stk=${vname}_nnl#);
2721 for (my $i = 1; $i < @$sources; $i++)
2723 my $vname0 = $vnames[@vnames - ($i + 1)];
2724 my $vname1 = $vnames[@vnames - $i];
2726 push (@cmd, qq#CDEF:${vname0}_stk=${vname0}_nnl,${vname1}_stk,+#);
2729 for (my $i = 0; $i < @$sources; $i++)
2731 my $inst_data = $sources->[$i];
2732 my $inst_name = $inst_data->{'name'};
2734 my $vname = $vnames[$i];
2736 my $legend = sprintf ('%-*s', $max_inst_name, $inst_name);
2741 my $number_format = $opts->{'number_format'} || '%6.1lf';
2743 if (exists ($opts->{'colors'}{$inst_name}))
2745 $line_color = $opts->{'colors'}{$inst_name};
2746 $area_color = _string_to_color ($line_color);
2750 $area_color = _get_random_color ();
2751 $line_color = _color_to_string ($area_color);
2753 $area_color = _color_to_string (_get_faded_color ($area_color));
2755 push (@cmd, qq(AREA:${vname}_stk#$area_color),
2756 qq(LINE1:${vname}_stk#$line_color:$legend),
2757 qq(GPRINT:${vname}_min:MIN:$number_format Min,),
2758 qq(GPRINT:${vname}_avg:AVERAGE:$number_format Avg,),
2759 qq(GPRINT:${vname}_max:MAX:$number_format Max,),
2760 qq(GPRINT:${vname}_avg:LAST:$number_format Last\\l),
2765 if (my $errmsg = RRDs::error ())
2767 confess ("RRDs::graph: $errmsg");
2769 } # meta_graph_generic_stack
2773 confess ("Wrong number of arguments") if (@_ != 5);
2777 my $plugin_instance = shift;
2779 my $type_instances = shift;
2784 $opts->{'title'} = "$host/$plugin"
2785 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
2787 $opts->{'rrd_opts'} = ['-v', 'Percent'];
2797 'system' => 'ff0000',
2798 'softirq' => 'ff00ff',
2799 'interrupt' => 'a000a0',
2803 _custom_sort_arrayref ($type_instances,
2804 [qw(idle nice user wait system softirq interrupt steal)]);
2806 for (@$type_instances)
2810 my $title = $opts->{'title'};
2814 if (-e "$_/$title-$inst.rrd")
2816 $file = "$_/$title-$inst.rrd";
2820 confess ("No file found for $title") if ($file eq '');
2828 } # for (@$type_instances)
2830 return (meta_graph_generic_stack ($opts, $sources));
2835 confess ("Wrong number of arguments") if (@_ != 5);
2839 my $plugin_instance = shift;
2841 my $type_instances = shift;
2846 $opts->{'title'} = "$host/$plugin"
2847 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
2849 $opts->{'rrd_opts'} = ['-v', 'Queries/s'];
2853 @$type_instances = sort @$type_instances;
2855 $opts->{'colors'} = _get_n_colors ($type_instances);
2857 for (@$type_instances)
2861 my $title = $opts->{'title'};
2865 if (-e "$_/$title-$inst.rrd")
2867 $file = "$_/$title-$inst.rrd";
2871 confess ("No file found for $title") if ($file eq '');
2879 } # for (@$type_instances)
2881 return (meta_graph_generic_stack ($opts, $sources));
2884 sub meta_graph_memory
2886 confess ("Wrong number of arguments") if (@_ != 5);
2890 my $plugin_instance = shift;
2892 my $type_instances = shift;
2897 $opts->{'title'} = "$host/$plugin"
2898 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
2899 $opts->{'number_format'} = '%5.1lf%s';
2901 $opts->{'rrd_opts'} = ['-b', '1024', '-v', 'Bytes'];
2908 'cached' => '0000ff',
2909 'buffered' => 'ffb000',
2913 _custom_sort_arrayref ($type_instances,
2914 [qw(free cached buffered used)]);
2916 for (@$type_instances)
2920 my $title = $opts->{'title'};
2924 if (-e "$_/$title-$inst.rrd")
2926 $file = "$_/$title-$inst.rrd";
2930 confess ("No file found for $title") if ($file eq '');
2938 } # for (@$type_instances)
2940 return (meta_graph_generic_stack ($opts, $sources));
2941 } # meta_graph_memory
2943 sub meta_graph_if_rx_errors
2945 confess ("Wrong number of arguments") if (@_ != 5);
2949 my $plugin_instance = shift;
2951 my $type_instances = shift;
2956 $opts->{'title'} = "$host/$plugin"
2957 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
2958 $opts->{'number_format'} = '%5.2lf';
2959 $opts->{'rrd_opts'} = ['-v', 'Errors/s'];
2963 for (sort @$type_instances)
2967 my $title = $opts->{'title'};
2971 if (-e "$_/$title-$inst.rrd")
2973 $file = "$_/$title-$inst.rrd";
2977 confess ("No file found for $title") if ($file eq '');
2985 } # for (@$type_instances)
2987 return (meta_graph_generic_stack ($opts, $sources));
2988 } # meta_graph_if_rx_errors
2990 sub meta_graph_mysql_commands
2992 confess ("Wrong number of arguments") if (@_ != 5);
2996 my $plugin_instance = shift;
2998 my $type_instances = shift;
3003 $opts->{'title'} = "$host/$plugin"
3004 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3005 $opts->{'number_format'} = '%5.2lf';
3009 for (sort @$type_instances)
3013 my $title = $opts->{'title'};
3017 if (-e "$_/$title-$inst.rrd")
3019 $file = "$_/$title-$inst.rrd";
3023 confess ("No file found for $title") if ($file eq '');
3031 } # for (@$type_instances)
3033 return (meta_graph_generic_stack ($opts, $sources));
3034 } # meta_graph_mysql_commands
3036 sub meta_graph_nfs_procedure
3038 confess ("Wrong number of arguments") if (@_ != 5);
3042 my $plugin_instance = shift;
3044 my $type_instances = shift;
3049 $opts->{'title'} = "$host/$plugin"
3050 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3051 $opts->{'number_format'} = '%5.1lf%s';
3055 for (sort @$type_instances)
3059 my $title = $opts->{'title'};
3063 if (-e "$_/$title-$inst.rrd")
3065 $file = "$_/$title-$inst.rrd";
3069 confess ("No file found for $title") if ($file eq '');
3077 } # for (@$type_instances)
3079 return (meta_graph_generic_stack ($opts, $sources));
3080 } # meta_graph_nfs_procedure
3082 sub meta_graph_ps_state
3084 confess ("Wrong number of arguments") if (@_ != 5);
3088 my $plugin_instance = shift;
3090 my $type_instances = shift;
3095 $opts->{'title'} = "$host/$plugin"
3096 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3097 $opts->{'rrd_opts'} = ['-v', 'Processes'];
3103 'Running' => '00e000',
3104 'Sleeping' => '0000ff',
3105 'Paging' => 'ffb000',
3106 'Zombies' => 'ff0000',
3107 'Blocked' => 'ff00ff',
3108 'Stopped' => 'a000a0'
3111 _custom_sort_arrayref ($type_instances,
3112 [qw(paging blocked zombies stopped running sleeping)]);
3114 for (@$type_instances)
3118 my $title = $opts->{'title'};
3122 if (-e "$_/$title-$inst.rrd")
3124 $file = "$_/$title-$inst.rrd";
3128 confess ("No file found for $title") if ($file eq '');
3132 name => ucfirst ($inst),
3136 } # for (@$type_instances)
3138 return (meta_graph_generic_stack ($opts, $sources));
3139 } # meta_graph_ps_state
3143 confess ("Wrong number of arguments") if (@_ != 5);
3147 my $plugin_instance = shift;
3149 my $type_instances = shift;
3154 $opts->{'title'} = "$host/$plugin"
3155 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3156 $opts->{'number_format'} = '%5.1lf%s';
3157 $opts->{'rrd_opts'} = ['-v', 'Bytes'];
3164 'Cached' => '0000ff',
3165 'Reserved' => 'ffb000',
3169 _custom_sort_arrayref ($type_instances,
3170 [qw(free cached reserved used)]);
3172 for (@$type_instances)
3176 my $title = $opts->{'title'};
3180 if (-e "$_/$title-$inst.rrd")
3182 $file = "$_/$title-$inst.rrd";
3186 confess ("No file found for $title") if ($file eq '');
3190 name => ucfirst ($inst),
3194 } # for (@$type_instances)
3196 return (meta_graph_generic_stack ($opts, $sources));
3199 sub meta_graph_tcp_connections
3201 confess ("Wrong number of arguments") if (@_ != 5);
3205 my $plugin_instance = shift;
3207 my $type_instances = shift;
3212 $opts->{'title'} = "$host/$plugin"
3213 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3214 $opts->{'number_format'} = '%6.2lf';
3216 $opts->{'rrd_opts'} = ['-v', 'Connections'];
3222 ESTABLISHED => '00e000',
3223 SYN_SENT => '00e0ff',
3224 SYN_RECV => '00e0a0',
3225 FIN_WAIT1 => 'f000f0',
3226 FIN_WAIT2 => 'f000a0',
3227 TIME_WAIT => 'ffb000',
3229 CLOSE_WAIT => '0000a0',
3230 LAST_ACK => '000080',
3235 _custom_sort_arrayref ($type_instances,
3236 [reverse qw(ESTABLISHED SYN_SENT SYN_RECV FIN_WAIT1 FIN_WAIT2 TIME_WAIT CLOSE
3237 CLOSE_WAIT LAST_ACK CLOSING LISTEN)]);
3239 for (@$type_instances)
3243 my $title = $opts->{'title'};
3247 if (-e "$_/$title-$inst.rrd")
3249 $file = "$_/$title-$inst.rrd";
3253 confess ("No file found for $title") if ($file eq '');
3261 } # for (@$type_instances)
3263 return (meta_graph_generic_stack ($opts, $sources));
3264 } # meta_graph_tcp_connections
3266 sub meta_graph_vmpage_number
3268 confess ("Wrong number of arguments") if (@_ != 5);
3272 my $plugin_instance = shift;
3274 my $type_instances = shift;
3279 $opts->{'title'} = "$host/$plugin"
3280 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3281 $opts->{'number_format'} = '%6.2lf';
3283 $opts->{'rrd_opts'} = ['-v', 'Pages'];
3289 anon_pages => '00e000',
3292 file_pages => 'f000f0',
3294 page_table_pages => 'ffb000',
3296 unstable => '0000a0',
3297 writeback => 'ff0000',
3300 _custom_sort_arrayref ($type_instances,
3301 [reverse qw(anon_pages bounce dirty file_pages mapped page_table_pages slab unstable writeback)]);
3303 for (@$type_instances)
3307 my $title = $opts->{'title'};
3311 if (-e "$_/$title-$inst.rrd")
3313 $file = "$_/$title-$inst.rrd";
3317 confess ("No file found for $title") if ($file eq '');
3325 } # for (@$type_instances)
3327 return (meta_graph_generic_stack ($opts, $sources));
3328 } # meta_graph_vmpage_number
3330 sub meta_graph_vmpage_action
3332 confess ("Wrong number of arguments") if (@_ != 5);
3336 my $plugin_instance = shift;
3338 my $type_instances = shift;
3343 $opts->{'title'} = "$host/$plugin"
3344 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3345 $opts->{'number_format'} = '%6.2lf';
3347 $opts->{'rrd_opts'} = ['-v', 'Pages'];
3353 activate => '00e000',
3354 deactivate => '00e0ff',
3358 scan_direct => 'ffb000',
3359 scan_kswapd => '0000f0',
3363 _custom_sort_arrayref ($type_instances,
3364 [reverse qw(activate deactivate alloc free refill scan_direct scan_kswapd steal)]);
3366 for (@$type_instances)
3370 my $title = $opts->{'title'};
3374 if (-e "$_/$title-$inst.rrd")
3376 $file = "$_/$title-$inst.rrd";
3380 confess ("No file found for $title") if ($file eq '');
3388 } # for (@$type_instances)
3390 return (meta_graph_generic_stack ($opts, $sources));
3391 } # meta_graph_vmpage_action
3392 # vim: shiftwidth=2:softtabstop=2:tabstop=8