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_connections => ['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:Connections",
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_idle_workers => ['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:Idle Workers",
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 apache_requests => ['DEF:min={file}:count:MIN',
996 'DEF:avg={file}:count:AVERAGE',
997 'DEF:max={file}:count:MAX',
998 "AREA:max#$HalfBlue",
1000 "LINE1:avg#$FullBlue:Requests/s",
1001 'GPRINT:min:MIN:%6.2lf Min,',
1002 'GPRINT:avg:AVERAGE:%6.2lf Avg,',
1003 'GPRINT:max:MAX:%6.2lf Max,',
1004 'GPRINT:avg:LAST:%6.2lf Last'
1006 apache_scoreboard => ['DEF:min={file}:count:MIN',
1007 'DEF:avg={file}:count:AVERAGE',
1008 'DEF:max={file}:count:MAX',
1009 "AREA:max#$HalfBlue",
1011 "LINE1:avg#$FullBlue:Processes",
1012 'GPRINT:min:MIN:%6.2lf Min,',
1013 'GPRINT:avg:AVERAGE:%6.2lf Avg,',
1014 'GPRINT:max:MAX:%6.2lf Max,',
1015 'GPRINT:avg:LAST:%6.2lf Last'
1017 bitrate => ['-v', 'Bits/s',
1018 'DEF:avg={file}:value:AVERAGE',
1019 'DEF:min={file}:value:MIN',
1020 'DEF:max={file}:value:MAX',
1021 "AREA:max#$HalfBlue",
1023 "LINE1:avg#$FullBlue:Bits/s",
1024 'GPRINT:min:MIN:%5.1lf%s Min,',
1025 'GPRINT:avg:AVERAGE:%5.1lf%s Average,',
1026 'GPRINT:max:MAX:%5.1lf%s Max,',
1027 'GPRINT:avg:LAST:%5.1lf%s Last\l'
1029 charge => ['-v', 'Ah',
1030 'DEF:avg={file}:value:AVERAGE',
1031 'DEF:min={file}:value:MIN',
1032 'DEF:max={file}:value:MAX',
1033 "AREA:max#$HalfBlue",
1035 "LINE1:avg#$FullBlue:Charge",
1036 'GPRINT:min:MIN:%5.1lf%sAh Min,',
1037 'GPRINT:avg:AVERAGE:%5.1lf%sAh Avg,',
1038 'GPRINT:max:MAX:%5.1lf%sAh Max,',
1039 'GPRINT:avg:LAST:%5.1lf%sAh Last\l'
1041 connections => ['-v', 'Connections',
1042 'DEF:avg={file}:value:AVERAGE',
1043 'DEF:min={file}:value:MIN',
1044 'DEF:max={file}:value:MAX',
1045 "AREA:max#$HalfBlue",
1047 "LINE1:avg#$FullBlue:Connections",
1048 'GPRINT:min:MIN:%4.1lf Min,',
1049 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1050 'GPRINT:max:MAX:%4.1lf Max,',
1051 'GPRINT:avg:LAST:%4.1lf Last\l'
1053 cpu => ['-v', 'CPU load',
1054 'DEF:avg={file}:value:AVERAGE',
1055 'DEF:min={file}:value:MIN',
1056 'DEF:max={file}:value:MAX',
1057 "AREA:max#$HalfBlue",
1059 "LINE1:avg#$FullBlue:Percent",
1060 'GPRINT:min:MIN:%6.2lf%% Min,',
1061 'GPRINT:avg:AVERAGE:%6.2lf%% Avg,',
1062 'GPRINT:max:MAX:%6.2lf%% Max,',
1063 'GPRINT:avg:LAST:%6.2lf%% Last\l'
1065 current => ['-v', 'Ampere',
1066 'DEF:avg={file}:value:AVERAGE',
1067 'DEF:min={file}:value:MIN',
1068 'DEF:max={file}:value:MAX',
1069 "AREA:max#$HalfBlue",
1071 "LINE1:avg#$FullBlue:Current",
1072 'GPRINT:min:MIN:%5.1lf%sA Min,',
1073 'GPRINT:avg:AVERAGE:%5.1lf%sA Avg,',
1074 'GPRINT:max:MAX:%5.1lf%sA Max,',
1075 'GPRINT:avg:LAST:%5.1lf%sA Last\l'
1077 df => ['-v', 'Percent', '-l', '0',
1078 'DEF:free_avg={file}:free:AVERAGE',
1079 'DEF:free_min={file}:free:MIN',
1080 'DEF:free_max={file}:free:MAX',
1081 'DEF:used_avg={file}:used:AVERAGE',
1082 'DEF:used_min={file}:used:MIN',
1083 'DEF:used_max={file}:used:MAX',
1084 'CDEF:total=free_avg,used_avg,+',
1085 'CDEF:free_pct=100,free_avg,*,total,/',
1086 'CDEF:used_pct=100,used_avg,*,total,/',
1087 'CDEF:free_acc=free_pct,used_pct,+',
1088 'CDEF:used_acc=used_pct',
1089 "AREA:free_acc#$HalfGreen",
1090 "AREA:used_acc#$HalfRed",
1091 "LINE1:free_acc#$FullGreen:Free",
1092 'GPRINT:free_min:MIN:%5.1lf%sB Min,',
1093 'GPRINT:free_avg:AVERAGE:%5.1lf%sB Avg,',
1094 'GPRINT:free_max:MAX:%5.1lf%sB Max,',
1095 'GPRINT:free_avg:LAST:%5.1lf%sB Last\l',
1096 "LINE1:used_acc#$FullRed:Used",
1097 'GPRINT:used_min:MIN:%5.1lf%sB Min,',
1098 'GPRINT:used_avg:AVERAGE:%5.1lf%sB Avg,',
1099 'GPRINT:used_max:MAX:%5.1lf%sB Max,',
1100 'GPRINT:used_avg:LAST:%5.1lf%sB Last\l'
1103 'DEF:rtime_avg={file}:rtime:AVERAGE',
1104 'DEF:rtime_min={file}:rtime:MIN',
1105 'DEF:rtime_max={file}:rtime:MAX',
1106 'DEF:wtime_avg={file}:wtime:AVERAGE',
1107 'DEF:wtime_min={file}:wtime:MIN',
1108 'DEF:wtime_max={file}:wtime:MAX',
1109 'CDEF:rtime_avg_ms=rtime_avg,1000,/',
1110 'CDEF:rtime_min_ms=rtime_min,1000,/',
1111 'CDEF:rtime_max_ms=rtime_max,1000,/',
1112 'CDEF:wtime_avg_ms=wtime_avg,1000,/',
1113 'CDEF:wtime_min_ms=wtime_min,1000,/',
1114 'CDEF:wtime_max_ms=wtime_max,1000,/',
1115 'CDEF:total_avg_ms=rtime_avg_ms,wtime_avg_ms,+',
1116 'CDEF:total_min_ms=rtime_min_ms,wtime_min_ms,+',
1117 'CDEF:total_max_ms=rtime_max_ms,wtime_max_ms,+',
1118 "AREA:total_max_ms#$HalfRed",
1119 "AREA:total_min_ms#$Canvas",
1120 "LINE1:wtime_avg_ms#$FullGreen:Write",
1121 'GPRINT:wtime_min_ms:MIN:%5.1lf%s Min,',
1122 'GPRINT:wtime_avg_ms:AVERAGE:%5.1lf%s Avg,',
1123 'GPRINT:wtime_max_ms:MAX:%5.1lf%s Max,',
1124 'GPRINT:wtime_avg_ms:LAST:%5.1lf%s Last\n',
1125 "LINE1:rtime_avg_ms#$FullBlue:Read ",
1126 'GPRINT:rtime_min_ms:MIN:%5.1lf%s Min,',
1127 'GPRINT:rtime_avg_ms:AVERAGE:%5.1lf%s Avg,',
1128 'GPRINT:rtime_max_ms:MAX:%5.1lf%s Max,',
1129 'GPRINT:rtime_avg_ms:LAST:%5.1lf%s Last\n',
1130 "LINE1:total_avg_ms#$FullRed:Total",
1131 'GPRINT:total_min_ms:MIN:%5.1lf%s Min,',
1132 'GPRINT:total_avg_ms:AVERAGE:%5.1lf%s Avg,',
1133 'GPRINT:total_max_ms:MAX:%5.1lf%s Max,',
1134 'GPRINT:total_avg_ms:LAST:%5.1lf%s Last'
1136 disk_octets => ['-v', 'Bytes/s',
1137 'DEF:out_min={file}:write:MIN',
1138 'DEF:out_avg={file}:write:AVERAGE',
1139 'DEF:out_max={file}:write:MAX',
1140 'DEF:inc_min={file}:read:MIN',
1141 'DEF:inc_avg={file}:read:AVERAGE',
1142 'DEF:inc_max={file}:read:MAX',
1143 'CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF',
1144 'CDEF:mytime=out_avg,TIME,TIME,IF',
1145 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1146 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1147 'CDEF:out_avg_sample=out_avg,UN,0,out_avg,IF,sample_len,*',
1148 'CDEF:out_avg_sum=PREV,UN,0,PREV,IF,out_avg_sample,+',
1149 'CDEF:inc_avg_sample=inc_avg,UN,0,inc_avg,IF,sample_len,*',
1150 'CDEF:inc_avg_sum=PREV,UN,0,PREV,IF,inc_avg_sample,+',
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:%5.1lf%s Avg,',
1156 'GPRINT:out_max:MAX:%5.1lf%s Max,',
1157 'GPRINT:out_avg:LAST:%5.1lf%s Last',
1158 'GPRINT:out_avg_sum:LAST:(ca. %5.1lf%sB Total)\l',
1159 "LINE1:inc_avg#$FullBlue:Read ",
1160 'GPRINT:inc_avg:AVERAGE:%5.1lf%s Avg,',
1161 'GPRINT:inc_max:MAX:%5.1lf%s Max,',
1162 'GPRINT:inc_avg:LAST:%5.1lf%s Last',
1163 'GPRINT:inc_avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
1165 disk_merged => ['-v', 'Merged Ops/s',
1166 'DEF:out_min={file}:write:MIN',
1167 'DEF:out_avg={file}:write:AVERAGE',
1168 'DEF:out_max={file}:write:MAX',
1169 'DEF:inc_min={file}:read:MIN',
1170 'DEF:inc_avg={file}:read:AVERAGE',
1171 'DEF:inc_max={file}:read:MAX',
1172 'CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF',
1173 "AREA:out_avg#$HalfGreen",
1174 "AREA:inc_avg#$HalfBlue",
1175 "AREA:overlap#$HalfBlueGreen",
1176 "LINE1:out_avg#$FullGreen:Written",
1177 'GPRINT:out_avg:AVERAGE:%6.2lf Avg,',
1178 'GPRINT:out_max:MAX:%6.2lf Max,',
1179 'GPRINT:out_avg:LAST:%6.2lf Last\l',
1180 "LINE1:inc_avg#$FullBlue:Read ",
1181 'GPRINT:inc_avg:AVERAGE:%6.2lf Avg,',
1182 'GPRINT:inc_max:MAX:%6.2lf Max,',
1183 'GPRINT:inc_avg:LAST:%6.2lf Last\l'
1185 disk_ops => ['-v', 'Ops/s',
1186 'DEF:out_min={file}:write:MIN',
1187 'DEF:out_avg={file}:write:AVERAGE',
1188 'DEF:out_max={file}:write:MAX',
1189 'DEF:inc_min={file}:read:MIN',
1190 'DEF:inc_avg={file}:read:AVERAGE',
1191 'DEF:inc_max={file}:read:MAX',
1192 'CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF',
1193 "AREA:out_avg#$HalfGreen",
1194 "AREA:inc_avg#$HalfBlue",
1195 "AREA:overlap#$HalfBlueGreen",
1196 "LINE1:out_avg#$FullGreen:Written",
1197 'GPRINT:out_avg:AVERAGE:%6.2lf Avg,',
1198 'GPRINT:out_max:MAX:%6.2lf Max,',
1199 'GPRINT:out_avg:LAST:%6.2lf Last\l',
1200 "LINE1:inc_avg#$FullBlue:Read ",
1201 'GPRINT:inc_avg:AVERAGE:%6.2lf Avg,',
1202 'GPRINT:inc_max:MAX:%6.2lf Max,',
1203 'GPRINT:inc_avg:LAST:%6.2lf Last\l'
1205 disk_time => ['-v', 'Seconds/s',
1206 'DEF:out_min_raw={file}:write:MIN',
1207 'DEF:out_avg_raw={file}:write:AVERAGE',
1208 'DEF:out_max_raw={file}:write:MAX',
1209 'DEF:inc_min_raw={file}:read:MIN',
1210 'DEF:inc_avg_raw={file}:read:AVERAGE',
1211 'DEF:inc_max_raw={file}:read:MAX',
1212 'CDEF:out_min=out_min_raw,1000,/',
1213 'CDEF:out_avg=out_avg_raw,1000,/',
1214 'CDEF:out_max=out_max_raw,1000,/',
1215 'CDEF:inc_min=inc_min_raw,1000,/',
1216 'CDEF:inc_avg=inc_avg_raw,1000,/',
1217 'CDEF:inc_max=inc_max_raw,1000,/',
1218 'CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF',
1219 "AREA:out_avg#$HalfGreen",
1220 "AREA:inc_avg#$HalfBlue",
1221 "AREA:overlap#$HalfBlueGreen",
1222 "LINE1:out_avg#$FullGreen:Written",
1223 'GPRINT:out_avg:AVERAGE:%5.1lf%ss Avg,',
1224 'GPRINT:out_max:MAX:%5.1lf%ss Max,',
1225 'GPRINT:out_avg:LAST:%5.1lf%ss Last\l',
1226 "LINE1:inc_avg#$FullBlue:Read ",
1227 'GPRINT:inc_avg:AVERAGE:%5.1lf%ss Avg,',
1228 'GPRINT:inc_max:MAX:%5.1lf%ss Max,',
1229 'GPRINT:inc_avg:LAST:%5.1lf%ss Last\l'
1231 dns_octets => ['DEF:rsp_min_raw={file}:responses:MIN',
1232 'DEF:rsp_avg_raw={file}:responses:AVERAGE',
1233 'DEF:rsp_max_raw={file}:responses:MAX',
1234 'DEF:qry_min_raw={file}:queries:MIN',
1235 'DEF:qry_avg_raw={file}:queries:AVERAGE',
1236 'DEF:qry_max_raw={file}:queries:MAX',
1237 'CDEF:rsp_min=rsp_min_raw,8,*',
1238 'CDEF:rsp_avg=rsp_avg_raw,8,*',
1239 'CDEF:rsp_max=rsp_max_raw,8,*',
1240 'CDEF:qry_min=qry_min_raw,8,*',
1241 'CDEF:qry_avg=qry_avg_raw,8,*',
1242 'CDEF:qry_max=qry_max_raw,8,*',
1243 'CDEF:overlap=rsp_avg,qry_avg,GT,qry_avg,rsp_avg,IF',
1244 'CDEF:mytime=rsp_avg_raw,TIME,TIME,IF',
1245 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1246 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1247 'CDEF:rsp_avg_sample=rsp_avg_raw,UN,0,rsp_avg_raw,IF,sample_len,*',
1248 'CDEF:rsp_avg_sum=PREV,UN,0,PREV,IF,rsp_avg_sample,+',
1249 'CDEF:qry_avg_sample=qry_avg_raw,UN,0,qry_avg_raw,IF,sample_len,*',
1250 'CDEF:qry_avg_sum=PREV,UN,0,PREV,IF,qry_avg_sample,+',
1251 "AREA:rsp_avg#$HalfGreen",
1252 "AREA:qry_avg#$HalfBlue",
1253 "AREA:overlap#$HalfBlueGreen",
1254 "LINE1:rsp_avg#$FullGreen:Responses",
1255 'GPRINT:rsp_avg:AVERAGE:%5.1lf%s Avg,',
1256 'GPRINT:rsp_max:MAX:%5.1lf%s Max,',
1257 'GPRINT:rsp_avg:LAST:%5.1lf%s Last',
1258 'GPRINT:rsp_avg_sum:LAST:(ca. %5.1lf%sB Total)\l',
1259 "LINE1:qry_avg#$FullBlue:Queries ",
1260 #'GPRINT:qry_min:MIN:%5.1lf %s Min,',
1261 'GPRINT:qry_avg:AVERAGE:%5.1lf%s Avg,',
1262 'GPRINT:qry_max:MAX:%5.1lf%s Max,',
1263 'GPRINT:qry_avg:LAST:%5.1lf%s Last',
1264 'GPRINT:qry_avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
1267 'DEF:avg={file}:value:AVERAGE',
1268 'DEF:min={file}:value:MIN',
1269 'DEF:max={file}:value:MAX',
1270 "AREA:max#$HalfBlue",
1272 "LINE1:avg#$FullBlue:Queries/s",
1273 'GPRINT:min:MIN:%9.3lf Min,',
1274 'GPRINT:avg:AVERAGE:%9.3lf Average,',
1275 'GPRINT:max:MAX:%9.3lf Max,',
1276 'GPRINT:avg:LAST:%9.3lf Last\l'
1278 email_count => ['-v', 'Mails',
1279 'DEF:avg={file}:value:AVERAGE',
1280 'DEF:min={file}:value:MIN',
1281 'DEF:max={file}:value:MAX',
1282 "AREA:max#$HalfMagenta",
1284 "LINE1:avg#$FullMagenta:Count ",
1285 'GPRINT:min:MIN:%4.1lf Min,',
1286 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1287 'GPRINT:max:MAX:%4.1lf Max,',
1288 'GPRINT:avg:LAST:%4.1lf Last\l'
1290 email_size => ['-v', 'Bytes',
1291 'DEF:avg={file}:value:AVERAGE',
1292 'DEF:min={file}:value:MIN',
1293 'DEF:max={file}:value:MAX',
1294 "AREA:max#$HalfMagenta",
1296 "LINE1:avg#$FullMagenta:Count ",
1297 'GPRINT:min:MIN:%4.1lf Min,',
1298 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1299 'GPRINT:max:MAX:%4.1lf Max,',
1300 'GPRINT:avg:LAST:%4.1lf Last\l'
1302 spam_score => ['-v', 'Score',
1303 'DEF:avg={file}:value:AVERAGE',
1304 'DEF:min={file}:value:MIN',
1305 'DEF:max={file}:value:MAX',
1306 "AREA:max#$HalfBlue",
1308 "LINE1:avg#$FullBlue:Score ",
1309 'GPRINT:min:MIN:%4.1lf Min,',
1310 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1311 'GPRINT:max:MAX:%4.1lf Max,',
1312 'GPRINT:avg:LAST:%4.1lf Last\l'
1315 'DEF:avg={file}:value:AVERAGE',
1316 'DEF:min={file}:value:MIN',
1317 'DEF:max={file}:value:MAX',
1318 "AREA:max#$HalfMagenta",
1320 "LINE1:avg#$FullMagenta:Count ",
1321 'GPRINT:min:MIN:%4.1lf Min,',
1322 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1323 'GPRINT:max:MAX:%4.1lf Max,',
1324 'GPRINT:avg:LAST:%4.1lf Last\l'
1326 conntrack => ['-v', 'Entries',
1327 'DEF:avg={file}:entropy:AVERAGE',
1328 'DEF:min={file}:entropy:MIN',
1329 'DEF:max={file}:entropy:MAX',
1330 "AREA:max#$HalfBlue",
1332 "LINE1:avg#$FullBlue:Count",
1333 'GPRINT:min:MIN:%4.0lf Min,',
1334 'GPRINT:avg:AVERAGE:%4.0lf Avg,',
1335 'GPRINT:max:MAX:%4.0lf Max,',
1336 'GPRINT:avg:LAST:%4.0lf Last\l'
1338 entropy => ['-v', 'Bits',
1339 'DEF:avg={file}:entropy:AVERAGE',
1340 'DEF:min={file}:entropy:MIN',
1341 'DEF:max={file}:entropy:MAX',
1342 "AREA:max#$HalfBlue",
1344 "LINE1:avg#$FullBlue:Bits",
1345 'GPRINT:min:MIN:%4.0lfbit Min,',
1346 'GPRINT:avg:AVERAGE:%4.0lfbit Avg,',
1347 'GPRINT:max:MAX:%4.0lfbit Max,',
1348 'GPRINT:avg:LAST:%4.0lfbit Last\l'
1350 fanspeed => ['-v', 'RPM',
1351 'DEF:avg={file}:value:AVERAGE',
1352 'DEF:min={file}:value:MIN',
1353 'DEF:max={file}:value:MAX',
1354 "AREA:max#$HalfMagenta",
1356 "LINE1:avg#$FullMagenta:RPM",
1357 'GPRINT:min:MIN:%4.1lf Min,',
1358 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1359 'GPRINT:max:MAX:%4.1lf Max,',
1360 'GPRINT:avg:LAST:%4.1lf Last\l'
1362 frequency => ['-v', 'Hertz',
1363 'DEF:avg={file}:frequency:AVERAGE',
1364 'DEF:min={file}:frequency:MIN',
1365 'DEF:max={file}:frequency:MAX',
1366 "AREA:max#$HalfBlue",
1368 "LINE1:avg#$FullBlue:Frequency [Hz]",
1369 'GPRINT:min:MIN:%4.1lf Min,',
1370 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1371 'GPRINT:max:MAX:%4.1lf Max,',
1372 'GPRINT:avg:LAST:%4.1lf Last\l'
1374 frequency_offset => [ # NTPd
1375 'DEF:ppm_avg={file}:ppm:AVERAGE',
1376 'DEF:ppm_min={file}:ppm:MIN',
1377 'DEF:ppm_max={file}:ppm:MAX',
1378 "AREA:ppm_max#$HalfBlue",
1379 "AREA:ppm_min#$Canvas",
1380 "LINE1:ppm_avg#$FullBlue:{inst}",
1381 'GPRINT:ppm_min:MIN:%5.2lf Min,',
1382 'GPRINT:ppm_avg:AVERAGE:%5.2lf Avg,',
1383 'GPRINT:ppm_max:MAX:%5.2lf Max,',
1384 'GPRINT:ppm_avg:LAST:%5.2lf Last'
1386 gauge => ['-v', 'Exec value',
1387 'DEF:temp_avg={file}:value:AVERAGE',
1388 'DEF:temp_min={file}:value:MIN',
1389 'DEF:temp_max={file}:value:MAX',
1390 "AREA:temp_max#$HalfBlue",
1391 "AREA:temp_min#$Canvas",
1392 "LINE1:temp_avg#$FullBlue:Exec value",
1393 'GPRINT:temp_min:MIN:%6.2lf Min,',
1394 'GPRINT:temp_avg:AVERAGE:%6.2lf Avg,',
1395 'GPRINT:temp_max:MAX:%6.2lf Max,',
1396 'GPRINT:temp_avg:LAST:%6.2lf Last\l'
1399 'DEF:temp_avg={file}:value:AVERAGE',
1400 'DEF:temp_min={file}:value:MIN',
1401 'DEF:temp_max={file}:value:MAX',
1402 "AREA:temp_max#$HalfRed",
1403 "AREA:temp_min#$Canvas",
1404 "LINE1:temp_avg#$FullRed:Temperature",
1405 'GPRINT:temp_min:MIN:%4.1lf Min,',
1406 'GPRINT:temp_avg:AVERAGE:%4.1lf Avg,',
1407 'GPRINT:temp_max:MAX:%4.1lf Max,',
1408 'GPRINT:temp_avg:LAST:%4.1lf Last\l'
1410 humidity => ['-v', 'Percent',
1411 'DEF:temp_avg={file}:value:AVERAGE',
1412 'DEF:temp_min={file}:value:MIN',
1413 'DEF:temp_max={file}:value:MAX',
1414 "AREA:temp_max#$HalfGreen",
1415 "AREA:temp_min#$Canvas",
1416 "LINE1:temp_avg#$FullGreen:Temperature",
1417 'GPRINT:temp_min:MIN:%4.1lf%% Min,',
1418 'GPRINT:temp_avg:AVERAGE:%4.1lf%% Avg,',
1419 'GPRINT:temp_max:MAX:%4.1lf%% Max,',
1420 'GPRINT:temp_avg:LAST:%4.1lf%% Last\l'
1422 if_errors => ['-v', 'Errors/s',
1423 'DEF:tx_min={file}:tx:MIN',
1424 'DEF:tx_avg={file}:tx:AVERAGE',
1425 'DEF:tx_max={file}:tx:MAX',
1426 'DEF:rx_min={file}:rx:MIN',
1427 'DEF:rx_avg={file}:rx:AVERAGE',
1428 'DEF:rx_max={file}:rx:MAX',
1429 'CDEF:overlap=tx_avg,rx_avg,GT,rx_avg,tx_avg,IF',
1430 'CDEF:mytime=tx_avg,TIME,TIME,IF',
1431 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1432 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1433 'CDEF:tx_avg_sample=tx_avg,UN,0,tx_avg,IF,sample_len,*',
1434 'CDEF:tx_avg_sum=PREV,UN,0,PREV,IF,tx_avg_sample,+',
1435 'CDEF:rx_avg_sample=rx_avg,UN,0,rx_avg,IF,sample_len,*',
1436 'CDEF:rx_avg_sum=PREV,UN,0,PREV,IF,rx_avg_sample,+',
1437 "AREA:tx_avg#$HalfGreen",
1438 "AREA:rx_avg#$HalfBlue",
1439 "AREA:overlap#$HalfBlueGreen",
1440 "LINE1:tx_avg#$FullGreen:TX",
1441 'GPRINT:tx_avg:AVERAGE:%5.1lf%s Avg,',
1442 'GPRINT:tx_max:MAX:%5.1lf%s Max,',
1443 'GPRINT:tx_avg:LAST:%5.1lf%s Last',
1444 'GPRINT:tx_avg_sum:LAST:(ca. %4.0lf%s Total)\l',
1445 "LINE1:rx_avg#$FullBlue:RX",
1446 #'GPRINT:rx_min:MIN:%5.1lf %s Min,',
1447 'GPRINT:rx_avg:AVERAGE:%5.1lf%s Avg,',
1448 'GPRINT:rx_max:MAX:%5.1lf%s Max,',
1449 'GPRINT:rx_avg:LAST:%5.1lf%s Last',
1450 'GPRINT:rx_avg_sum:LAST:(ca. %4.0lf%s Total)\l'
1452 if_collisions => ['-v', 'Collisions/s',
1453 'DEF:min_raw={file}:value:MIN',
1454 'DEF:avg_raw={file}:value:AVERAGE',
1455 'DEF:max_raw={file}:value:MAX',
1456 'CDEF:min=min_raw,8,*',
1457 'CDEF:avg=avg_raw,8,*',
1458 'CDEF:max=max_raw,8,*',
1459 "AREA:max#$HalfBlue",
1461 "LINE1:avg#$FullBlue:Collisions/s",
1462 'GPRINT:min:MIN:%5.1lf %s Min,',
1463 'GPRINT:avg:AVERAGE:%5.1lf%s Avg,',
1464 'GPRINT:max:MAX:%5.1lf%s Max,',
1465 'GPRINT:avg:LAST:%5.1lf%s Last\l'
1467 if_dropped => ['-v', 'Packets/s',
1468 'DEF:tx_min={file}:tx:MIN',
1469 'DEF:tx_avg={file}:tx:AVERAGE',
1470 'DEF:tx_max={file}:tx:MAX',
1471 'DEF:rx_min={file}:rx:MIN',
1472 'DEF:rx_avg={file}:rx:AVERAGE',
1473 'DEF:rx_max={file}:rx:MAX',
1474 'CDEF:overlap=tx_avg,rx_avg,GT,rx_avg,tx_avg,IF',
1475 'CDEF:mytime=tx_avg,TIME,TIME,IF',
1476 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1477 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1478 'CDEF:tx_avg_sample=tx_avg,UN,0,tx_avg,IF,sample_len,*',
1479 'CDEF:tx_avg_sum=PREV,UN,0,PREV,IF,tx_avg_sample,+',
1480 'CDEF:rx_avg_sample=rx_avg,UN,0,rx_avg,IF,sample_len,*',
1481 'CDEF:rx_avg_sum=PREV,UN,0,PREV,IF,rx_avg_sample,+',
1482 "AREA:tx_avg#$HalfGreen",
1483 "AREA:rx_avg#$HalfBlue",
1484 "AREA:overlap#$HalfBlueGreen",
1485 "LINE1:tx_avg#$FullGreen:TX",
1486 'GPRINT:tx_avg:AVERAGE:%5.1lf%s Avg,',
1487 'GPRINT:tx_max:MAX:%5.1lf%s Max,',
1488 'GPRINT:tx_avg:LAST:%5.1lf%s Last',
1489 'GPRINT:tx_avg_sum:LAST:(ca. %4.0lf%s Total)\l',
1490 "LINE1:rx_avg#$FullBlue:RX",
1491 #'GPRINT:rx_min:MIN:%5.1lf %s Min,',
1492 'GPRINT:rx_avg:AVERAGE:%5.1lf%s Avg,',
1493 'GPRINT:rx_max:MAX:%5.1lf%s Max,',
1494 'GPRINT:rx_avg:LAST:%5.1lf%s Last',
1495 'GPRINT:rx_avg_sum:LAST:(ca. %4.0lf%s Total)\l'
1497 if_packets => ['-v', 'Packets/s',
1498 'DEF:tx_min={file}:tx:MIN',
1499 'DEF:tx_avg={file}:tx:AVERAGE',
1500 'DEF:tx_max={file}:tx:MAX',
1501 'DEF:rx_min={file}:rx:MIN',
1502 'DEF:rx_avg={file}:rx:AVERAGE',
1503 'DEF:rx_max={file}:rx:MAX',
1504 'CDEF:overlap=tx_avg,rx_avg,GT,rx_avg,tx_avg,IF',
1505 'CDEF:mytime=tx_avg,TIME,TIME,IF',
1506 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1507 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1508 'CDEF:tx_avg_sample=tx_avg,UN,0,tx_avg,IF,sample_len,*',
1509 'CDEF:tx_avg_sum=PREV,UN,0,PREV,IF,tx_avg_sample,+',
1510 'CDEF:rx_avg_sample=rx_avg,UN,0,rx_avg,IF,sample_len,*',
1511 'CDEF:rx_avg_sum=PREV,UN,0,PREV,IF,rx_avg_sample,+',
1512 "AREA:tx_avg#$HalfGreen",
1513 "AREA:rx_avg#$HalfBlue",
1514 "AREA:overlap#$HalfBlueGreen",
1515 "LINE1:tx_avg#$FullGreen:TX",
1516 'GPRINT:tx_avg:AVERAGE:%5.1lf%s Avg,',
1517 'GPRINT:tx_max:MAX:%5.1lf%s Max,',
1518 'GPRINT:tx_avg:LAST:%5.1lf%s Last',
1519 'GPRINT:tx_avg_sum:LAST:(ca. %4.0lf%s Total)\l',
1520 "LINE1:rx_avg#$FullBlue:RX",
1521 #'GPRINT:rx_min:MIN:%5.1lf %s Min,',
1522 'GPRINT:rx_avg:AVERAGE:%5.1lf%s Avg,',
1523 'GPRINT:rx_max:MAX:%5.1lf%s Max,',
1524 'GPRINT:rx_avg:LAST:%5.1lf%s Last',
1525 'GPRINT:rx_avg_sum:LAST:(ca. %4.0lf%s Total)\l'
1527 if_rx_errors => ['-v', 'Errors/s',
1528 'DEF:min={file}:value:MIN',
1529 'DEF:avg={file}:value:AVERAGE',
1530 'DEF:max={file}:value:MAX',
1531 'CDEF:mytime=avg,TIME,TIME,IF',
1532 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1533 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1534 'CDEF:avg_sample=avg,UN,0,avg,IF,sample_len,*',
1535 'CDEF:avg_sum=PREV,UN,0,PREV,IF,avg_sample,+',
1536 "AREA:avg#$HalfBlue",
1537 "LINE1:avg#$FullBlue:Errors/s",
1538 'GPRINT:avg:AVERAGE:%3.1lf%s Avg,',
1539 'GPRINT:max:MAX:%3.1lf%s Max,',
1540 'GPRINT:avg:LAST:%3.1lf%s Last',
1541 'GPRINT:avg_sum:LAST:(ca. %2.0lf%s Total)\l'
1543 ipt_bytes => ['-v', 'Bits/s',
1544 'DEF:min_raw={file}:value:MIN',
1545 'DEF:avg_raw={file}:value:AVERAGE',
1546 'DEF:max_raw={file}:value:MAX',
1547 'CDEF:min=min_raw,8,*',
1548 'CDEF:avg=avg_raw,8,*',
1549 'CDEF:max=max_raw,8,*',
1550 'CDEF:mytime=avg_raw,TIME,TIME,IF',
1551 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1552 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1553 'CDEF:avg_sample=avg_raw,UN,0,avg_raw,IF,sample_len,*',
1554 'CDEF:avg_sum=PREV,UN,0,PREV,IF,avg_sample,+',
1555 "AREA:max#$HalfBlue",
1557 "LINE1:avg#$FullBlue:Bits/s",
1558 #'GPRINT:min:MIN:%5.1lf %s Min,',
1559 'GPRINT:avg:AVERAGE:%5.1lf%s Avg,',
1560 'GPRINT:max:MAX:%5.1lf%s Max,',
1561 'GPRINT:avg:LAST:%5.1lf%s Last',
1562 'GPRINT:avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
1564 ipt_packets => ['-v', 'Packets/s',
1565 'DEF:min_raw={file}:value:MIN',
1566 'DEF:avg_raw={file}:value:AVERAGE',
1567 'DEF:max_raw={file}:value:MAX',
1568 'CDEF:min=min_raw,8,*',
1569 'CDEF:avg=avg_raw,8,*',
1570 'CDEF:max=max_raw,8,*',
1571 "AREA:max#$HalfBlue",
1573 "LINE1:avg#$FullBlue:Packets/s",
1574 'GPRINT:min:MIN:%5.1lf %s Min,',
1575 'GPRINT:avg:AVERAGE:%5.1lf%s Avg,',
1576 'GPRINT:max:MAX:%5.1lf%s Max,',
1577 'GPRINT:avg:LAST:%5.1lf%s Last\l'
1579 irq => ['-v', 'Issues/s',
1580 'DEF:avg={file}:value:AVERAGE',
1581 'DEF:min={file}:value:MIN',
1582 'DEF:max={file}:value:MAX',
1583 "AREA:max#$HalfBlue",
1585 "LINE1:avg#$FullBlue:Issues/s",
1586 'GPRINT:min:MIN:%6.2lf Min,',
1587 'GPRINT:avg:AVERAGE:%6.2lf Avg,',
1588 'GPRINT:max:MAX:%6.2lf Max,',
1589 'GPRINT:avg:LAST:%6.2lf Last\l'
1591 load => ['-v', 'System load',
1592 'DEF:s_avg={file}:shortterm:AVERAGE',
1593 'DEF:s_min={file}:shortterm:MIN',
1594 'DEF:s_max={file}:shortterm:MAX',
1595 'DEF:m_avg={file}:midterm:AVERAGE',
1596 'DEF:m_min={file}:midterm:MIN',
1597 'DEF:m_max={file}:midterm:MAX',
1598 'DEF:l_avg={file}:longterm:AVERAGE',
1599 'DEF:l_min={file}:longterm:MIN',
1600 'DEF:l_max={file}:longterm:MAX',
1601 "AREA:s_max#$HalfGreen",
1602 "AREA:s_min#$Canvas",
1603 "LINE1:s_avg#$FullGreen: 1m average",
1604 'GPRINT:s_min:MIN:%4.2lf Min,',
1605 'GPRINT:s_avg:AVERAGE:%4.2lf Avg,',
1606 'GPRINT:s_max:MAX:%4.2lf Max,',
1607 'GPRINT:s_avg:LAST:%4.2lf Last\n',
1608 "LINE1:m_avg#$FullBlue: 5m average",
1609 'GPRINT:m_min:MIN:%4.2lf Min,',
1610 'GPRINT:m_avg:AVERAGE:%4.2lf Avg,',
1611 'GPRINT:m_max:MAX:%4.2lf Max,',
1612 'GPRINT:m_avg:LAST:%4.2lf Last\n',
1613 "LINE1:l_avg#$FullRed:15m average",
1614 'GPRINT:l_min:MIN:%4.2lf Min,',
1615 'GPRINT:l_avg:AVERAGE:%4.2lf Avg,',
1616 'GPRINT:l_max:MAX:%4.2lf Max,',
1617 'GPRINT:l_avg:LAST:%4.2lf Last'
1620 'DEF:avg={file}:percent:AVERAGE',
1621 'DEF:min={file}:percent:MIN',
1622 'DEF:max={file}:percent:MAX',
1623 "AREA:max#$HalfBlue",
1625 "LINE1:avg#$FullBlue:Load",
1626 'GPRINT:min:MIN:%5.1lf%s%% Min,',
1627 'GPRINT:avg:AVERAGE:%5.1lf%s%% Avg,',
1628 'GPRINT:max:MAX:%5.1lf%s%% Max,',
1629 'GPRINT:avg:LAST:%5.1lf%s%% Last\l'
1631 mails => ['DEF:rawgood={file}:good:AVERAGE',
1632 'DEF:rawspam={file}:spam:AVERAGE',
1633 'CDEF:good=rawgood,UN,0,rawgood,IF',
1634 'CDEF:spam=rawspam,UN,0,rawspam,IF',
1635 'CDEF:negspam=spam,-1,*',
1636 "AREA:good#$HalfGreen",
1637 "LINE1:good#$FullGreen:Good mails",
1638 'GPRINT:good:AVERAGE:%4.1lf Avg,',
1639 'GPRINT:good:MAX:%4.1lf Max,',
1640 'GPRINT:good:LAST:%4.1lf Last\n',
1641 "AREA:negspam#$HalfRed",
1642 "LINE1:negspam#$FullRed:Spam mails",
1643 'GPRINT:spam:AVERAGE:%4.1lf Avg,',
1644 'GPRINT:spam:MAX:%4.1lf Max,',
1645 'GPRINT:spam:LAST:%4.1lf Last',
1648 memcached_command => ['-v', 'Commands',
1649 'DEF:avg={file}:value:AVERAGE',
1650 'DEF:min={file}:value:MIN',
1651 'DEF:max={file}:value:MAX',
1652 "AREA:max#$HalfBlue",
1654 "LINE1:avg#$FullBlue:Commands",
1655 'GPRINT:min:MIN:%5.1lf%s Min,',
1656 'GPRINT:avg:AVERAGE:%5.1lf Avg,',
1657 'GPRINT:max:MAX:%5.1lf Max,',
1658 'GPRINT:avg:LAST:%5.1lf Last\l'
1660 memcached_connections => ['-v', 'Connections',
1661 'DEF:avg={file}:value:AVERAGE',
1662 'DEF:min={file}:value:MIN',
1663 'DEF:max={file}:value:MAX',
1664 "AREA:max#$HalfBlue",
1666 "LINE1:avg#$FullBlue:Connections",
1667 'GPRINT:min:MIN:%4.1lf Min,',
1668 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1669 'GPRINT:max:MAX:%4.1lf Max,',
1670 'GPRINT:avg:LAST:%4.1lf Last\l'
1672 memcached_items => ['-v', 'Items',
1673 'DEF:avg={file}:value:AVERAGE',
1674 'DEF:min={file}:value:MIN',
1675 'DEF:max={file}:value:MAX',
1676 "AREA:max#$HalfBlue",
1678 "LINE1:avg#$FullBlue:Items",
1679 'GPRINT:min:MIN:%4.1lf Min,',
1680 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1681 'GPRINT:max:MAX:%4.1lf Max,',
1682 'GPRINT:avg:LAST:%4.1lf Last\l'
1684 memcached_octets => ['-v', 'Bits/s',
1685 'DEF:out_min={file}:tx:MIN',
1686 'DEF:out_avg={file}:tx:AVERAGE',
1687 'DEF:out_max={file}:tx:MAX',
1688 'DEF:inc_min={file}:rx:MIN',
1689 'DEF:inc_avg={file}:rx:AVERAGE',
1690 'DEF:inc_max={file}:rx:MAX',
1691 'CDEF:mytime=out_avg,TIME,TIME,IF',
1692 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1693 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1694 'CDEF:out_avg_sample=out_avg,UN,0,out_avg,IF,sample_len,*',
1695 'CDEF:out_avg_sum=PREV,UN,0,PREV,IF,out_avg_sample,+',
1696 'CDEF:inc_avg_sample=inc_avg,UN,0,inc_avg,IF,sample_len,*',
1697 'CDEF:inc_avg_sum=PREV,UN,0,PREV,IF,inc_avg_sample,+',
1698 'CDEF:out_bit_min=out_min,8,*',
1699 'CDEF:out_bit_avg=out_avg,8,*',
1700 'CDEF:out_bit_max=out_max,8,*',
1701 'CDEF:inc_bit_min=inc_min,8,*',
1702 'CDEF:inc_bit_avg=inc_avg,8,*',
1703 'CDEF:inc_bit_max=inc_max,8,*',
1704 'CDEF:overlap=out_bit_avg,inc_bit_avg,GT,inc_bit_avg,out_bit_avg,IF',
1705 "AREA:out_bit_avg#$HalfGreen",
1706 "AREA:inc_bit_avg#$HalfBlue",
1707 "AREA:overlap#$HalfBlueGreen",
1708 "LINE1:out_bit_avg#$FullGreen:Written",
1709 'GPRINT:out_bit_avg:AVERAGE:%5.1lf%s Avg,',
1710 'GPRINT:out_bit_max:MAX:%5.1lf%s Max,',
1711 'GPRINT:out_bit_avg:LAST:%5.1lf%s Last',
1712 'GPRINT:out_avg_sum:LAST:(ca. %5.1lf%sB Total)\l',
1713 "LINE1:inc_bit_avg#$FullBlue:Read ",
1714 'GPRINT:inc_bit_avg:AVERAGE:%5.1lf%s Avg,',
1715 'GPRINT:inc_bit_max:MAX:%5.1lf%s Max,',
1716 'GPRINT:inc_bit_avg:LAST:%5.1lf%s Last',
1717 'GPRINT:inc_avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
1719 memcached_ops => ['-v', 'Ops',
1720 'DEF:avg={file}:value:AVERAGE',
1721 'DEF:min={file}:value:MIN',
1722 'DEF:max={file}:value:MAX',
1723 "AREA:max#$HalfBlue",
1725 "LINE1:avg#$FullBlue:Ops",
1726 'GPRINT:min:MIN:%4.1lf Min,',
1727 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1728 'GPRINT:max:MAX:%4.1lf Max,',
1729 'GPRINT:avg:LAST:%4.1lf Last\l'
1731 memory => ['-b', '1024', '-v', 'Bytes',
1732 'DEF:avg={file}:value:AVERAGE',
1733 'DEF:min={file}:value:MIN',
1734 'DEF:max={file}:value:MAX',
1735 "AREA:max#$HalfBlue",
1737 "LINE1:avg#$FullBlue:Memory",
1738 'GPRINT:min:MIN:%5.1lf%sbyte Min,',
1739 'GPRINT:avg:AVERAGE:%5.1lf%sbyte Avg,',
1740 'GPRINT:max:MAX:%5.1lf%sbyte Max,',
1741 'GPRINT:avg:LAST:%5.1lf%sbyte Last\l'
1744 'DEF:used_avg={file}:used:AVERAGE',
1745 'DEF:free_avg={file}:free:AVERAGE',
1746 'DEF:buffers_avg={file}:buffers:AVERAGE',
1747 'DEF:cached_avg={file}:cached:AVERAGE',
1748 'DEF:used_min={file}:used:MIN',
1749 'DEF:free_min={file}:free:MIN',
1750 'DEF:buffers_min={file}:buffers:MIN',
1751 'DEF:cached_min={file}:cached:MIN',
1752 'DEF:used_max={file}:used:MAX',
1753 'DEF:free_max={file}:free:MAX',
1754 'DEF:buffers_max={file}:buffers:MAX',
1755 'DEF:cached_max={file}:cached:MAX',
1756 'CDEF:cached_avg_nn=cached_avg,UN,0,cached_avg,IF',
1757 'CDEF:buffers_avg_nn=buffers_avg,UN,0,buffers_avg,IF',
1758 'CDEF:free_cached_buffers_used=free_avg,cached_avg_nn,+,buffers_avg_nn,+,used_avg,+',
1759 'CDEF:cached_buffers_used=cached_avg,buffers_avg_nn,+,used_avg,+',
1760 'CDEF:buffers_used=buffers_avg,used_avg,+',
1761 "AREA:free_cached_buffers_used#$HalfGreen",
1762 "AREA:cached_buffers_used#$HalfBlue",
1763 "AREA:buffers_used#$HalfYellow",
1764 "AREA:used_avg#$HalfRed",
1765 "LINE1:free_cached_buffers_used#$FullGreen:Free ",
1766 'GPRINT:free_min:MIN:%5.1lf%s Min,',
1767 'GPRINT:free_avg:AVERAGE:%5.1lf%s Avg,',
1768 'GPRINT:free_max:MAX:%5.1lf%s Max,',
1769 'GPRINT:free_avg:LAST:%5.1lf%s Last\n',
1770 "LINE1:cached_buffers_used#$FullBlue:Page cache ",
1771 'GPRINT:cached_min:MIN:%5.1lf%s Min,',
1772 'GPRINT:cached_avg:AVERAGE:%5.1lf%s Avg,',
1773 'GPRINT:cached_max:MAX:%5.1lf%s Max,',
1774 'GPRINT:cached_avg:LAST:%5.1lf%s Last\n',
1775 "LINE1:buffers_used#$FullYellow:Buffer cache",
1776 'GPRINT:buffers_min:MIN:%5.1lf%s Min,',
1777 'GPRINT:buffers_avg:AVERAGE:%5.1lf%s Avg,',
1778 'GPRINT:buffers_max:MAX:%5.1lf%s Max,',
1779 'GPRINT:buffers_avg:LAST:%5.1lf%s Last\n',
1780 "LINE1:used_avg#$FullRed:Used ",
1781 'GPRINT:used_min:MIN:%5.1lf%s Min,',
1782 'GPRINT:used_avg:AVERAGE:%5.1lf%s Avg,',
1783 'GPRINT:used_max:MAX:%5.1lf%s Max,',
1784 'GPRINT:used_avg:LAST:%5.1lf%s Last'
1786 mysql_commands => ['-v', 'Issues/s',
1787 "DEF:val_avg={file}:value:AVERAGE",
1788 "DEF:val_min={file}:value:MIN",
1789 "DEF:val_max={file}:value:MAX",
1790 "AREA:val_max#$HalfBlue",
1791 "AREA:val_min#$Canvas",
1792 "LINE1:val_avg#$FullBlue:Issues/s",
1793 'GPRINT:val_min:MIN:%5.2lf Min,',
1794 'GPRINT:val_avg:AVERAGE:%5.2lf Avg,',
1795 'GPRINT:val_max:MAX:%5.2lf Max,',
1796 'GPRINT:val_avg:LAST:%5.2lf Last'
1798 mysql_handler => ['-v', 'Issues/s',
1799 "DEF:val_avg={file}:value:AVERAGE",
1800 "DEF:val_min={file}:value:MIN",
1801 "DEF:val_max={file}:value:MAX",
1802 "AREA:val_max#$HalfBlue",
1803 "AREA:val_min#$Canvas",
1804 "LINE1:val_avg#$FullBlue:Issues/s",
1805 'GPRINT:val_min:MIN:%5.2lf Min,',
1806 'GPRINT:val_avg:AVERAGE:%5.2lf Avg,',
1807 'GPRINT:val_max:MAX:%5.2lf Max,',
1808 'GPRINT:val_avg:LAST:%5.2lf Last'
1810 mysql_octets => ['-v', 'Bits/s',
1811 'DEF:out_min={file}:tx:MIN',
1812 'DEF:out_avg={file}:tx:AVERAGE',
1813 'DEF:out_max={file}:tx:MAX',
1814 'DEF:inc_min={file}:rx:MIN',
1815 'DEF:inc_avg={file}:rx:AVERAGE',
1816 'DEF:inc_max={file}:rx:MAX',
1817 'CDEF:mytime=out_avg,TIME,TIME,IF',
1818 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1819 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1820 'CDEF:out_avg_sample=out_avg,UN,0,out_avg,IF,sample_len,*',
1821 'CDEF:out_avg_sum=PREV,UN,0,PREV,IF,out_avg_sample,+',
1822 'CDEF:inc_avg_sample=inc_avg,UN,0,inc_avg,IF,sample_len,*',
1823 'CDEF:inc_avg_sum=PREV,UN,0,PREV,IF,inc_avg_sample,+',
1824 'CDEF:out_bit_min=out_min,8,*',
1825 'CDEF:out_bit_avg=out_avg,8,*',
1826 'CDEF:out_bit_max=out_max,8,*',
1827 'CDEF:inc_bit_min=inc_min,8,*',
1828 'CDEF:inc_bit_avg=inc_avg,8,*',
1829 'CDEF:inc_bit_max=inc_max,8,*',
1830 'CDEF:overlap=out_bit_avg,inc_bit_avg,GT,inc_bit_avg,out_bit_avg,IF',
1831 "AREA:out_bit_avg#$HalfGreen",
1832 "AREA:inc_bit_avg#$HalfBlue",
1833 "AREA:overlap#$HalfBlueGreen",
1834 "LINE1:out_bit_avg#$FullGreen:Written",
1835 'GPRINT:out_bit_avg:AVERAGE:%5.1lf%s Avg,',
1836 'GPRINT:out_bit_max:MAX:%5.1lf%s Max,',
1837 'GPRINT:out_bit_avg:LAST:%5.1lf%s Last',
1838 'GPRINT:out_avg_sum:LAST:(ca. %5.1lf%sB Total)\l',
1839 "LINE1:inc_bit_avg#$FullBlue:Read ",
1840 'GPRINT:inc_bit_avg:AVERAGE:%5.1lf%s Avg,',
1841 'GPRINT:inc_bit_max:MAX:%5.1lf%s Max,',
1842 'GPRINT:inc_bit_avg:LAST:%5.1lf%s Last',
1843 'GPRINT:inc_avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
1845 mysql_qcache => ['-v', 'Queries/s',
1846 "DEF:hits_min={file}:hits:MIN",
1847 "DEF:hits_avg={file}:hits:AVERAGE",
1848 "DEF:hits_max={file}:hits:MAX",
1849 "DEF:inserts_min={file}:inserts:MIN",
1850 "DEF:inserts_avg={file}:inserts:AVERAGE",
1851 "DEF:inserts_max={file}:inserts:MAX",
1852 "DEF:not_cached_min={file}:not_cached:MIN",
1853 "DEF:not_cached_avg={file}:not_cached:AVERAGE",
1854 "DEF:not_cached_max={file}:not_cached:MAX",
1855 "DEF:lowmem_prunes_min={file}:lowmem_prunes:MIN",
1856 "DEF:lowmem_prunes_avg={file}:lowmem_prunes:AVERAGE",
1857 "DEF:lowmem_prunes_max={file}:lowmem_prunes:MAX",
1858 "DEF:queries_min={file}:queries_in_cache:MIN",
1859 "DEF:queries_avg={file}:queries_in_cache:AVERAGE",
1860 "DEF:queries_max={file}:queries_in_cache:MAX",
1861 "CDEF:unknown=queries_avg,UNKN,+",
1862 "CDEF:not_cached_agg=hits_avg,inserts_avg,+,not_cached_avg,+",
1863 "CDEF:inserts_agg=hits_avg,inserts_avg,+",
1864 "CDEF:hits_agg=hits_avg",
1865 "AREA:not_cached_agg#$HalfYellow",
1866 "AREA:inserts_agg#$HalfBlue",
1867 "AREA:hits_agg#$HalfGreen",
1868 "LINE1:not_cached_agg#$FullYellow:Not Cached ",
1869 'GPRINT:not_cached_min:MIN:%5.2lf Min,',
1870 'GPRINT:not_cached_avg:AVERAGE:%5.2lf Avg,',
1871 'GPRINT:not_cached_max:MAX:%5.2lf Max,',
1872 'GPRINT:not_cached_avg:LAST:%5.2lf Last\l',
1873 "LINE1:inserts_agg#$FullBlue:Inserts ",
1874 'GPRINT:inserts_min:MIN:%5.2lf Min,',
1875 'GPRINT:inserts_avg:AVERAGE:%5.2lf Avg,',
1876 'GPRINT:inserts_max:MAX:%5.2lf Max,',
1877 'GPRINT:inserts_avg:LAST:%5.2lf Last\l',
1878 "LINE1:hits_agg#$FullGreen:Hits ",
1879 'GPRINT:hits_min:MIN:%5.2lf Min,',
1880 'GPRINT:hits_avg:AVERAGE:%5.2lf Avg,',
1881 'GPRINT:hits_max:MAX:%5.2lf Max,',
1882 'GPRINT:hits_avg:LAST:%5.2lf Last\l',
1883 "LINE1:lowmem_prunes_avg#$FullRed:Lowmem Prunes ",
1884 'GPRINT:lowmem_prunes_min:MIN:%5.2lf Min,',
1885 'GPRINT:lowmem_prunes_avg:AVERAGE:%5.2lf Avg,',
1886 'GPRINT:lowmem_prunes_max:MAX:%5.2lf Max,',
1887 'GPRINT:lowmem_prunes_avg:LAST:%5.2lf Last\l',
1888 "LINE1:unknown#$Canvas:Queries in cache",
1889 'GPRINT:queries_min:MIN:%5.0lf Min,',
1890 'GPRINT:queries_avg:AVERAGE:%5.0lf Avg,',
1891 'GPRINT:queries_max:MAX:%5.0lf Max,',
1892 'GPRINT:queries_avg:LAST:%5.0lf Last\l'
1894 mysql_threads => ['-v', 'Threads',
1895 "DEF:running_min={file}:running:MIN",
1896 "DEF:running_avg={file}:running:AVERAGE",
1897 "DEF:running_max={file}:running:MAX",
1898 "DEF:connected_min={file}:connected:MIN",
1899 "DEF:connected_avg={file}:connected:AVERAGE",
1900 "DEF:connected_max={file}:connected:MAX",
1901 "DEF:cached_min={file}:cached:MIN",
1902 "DEF:cached_avg={file}:cached:AVERAGE",
1903 "DEF:cached_max={file}:cached:MAX",
1904 "DEF:created_min={file}:created:MIN",
1905 "DEF:created_avg={file}:created:AVERAGE",
1906 "DEF:created_max={file}:created:MAX",
1907 "CDEF:unknown=created_avg,UNKN,+",
1908 "CDEF:cached_agg=connected_avg,cached_avg,+",
1909 "AREA:cached_agg#$HalfGreen",
1910 "AREA:connected_avg#$HalfBlue",
1911 "AREA:running_avg#$HalfRed",
1912 "LINE1:cached_agg#$FullGreen:Cached ",
1913 'GPRINT:cached_min:MIN:%5.1lf Min,',
1914 'GPRINT:cached_avg:AVERAGE:%5.1lf Avg,',
1915 'GPRINT:cached_max:MAX:%5.1lf Max,',
1916 'GPRINT:cached_avg:LAST:%5.1lf Last\l',
1917 "LINE1:connected_avg#$FullBlue:Connected",
1918 'GPRINT:connected_min:MIN:%5.1lf Min,',
1919 'GPRINT:connected_avg:AVERAGE:%5.1lf Avg,',
1920 'GPRINT:connected_max:MAX:%5.1lf Max,',
1921 'GPRINT:connected_avg:LAST:%5.1lf Last\l',
1922 "LINE1:running_avg#$FullRed:Running ",
1923 'GPRINT:running_min:MIN:%5.1lf Min,',
1924 'GPRINT:running_avg:AVERAGE:%5.1lf Avg,',
1925 'GPRINT:running_max:MAX:%5.1lf Max,',
1926 'GPRINT:running_avg:LAST:%5.1lf Last\l',
1927 "LINE1:unknown#$Canvas:Created ",
1928 'GPRINT:created_min:MIN:%5.0lf Min,',
1929 'GPRINT:created_avg:AVERAGE:%5.0lf Avg,',
1930 'GPRINT:created_max:MAX:%5.0lf Max,',
1931 'GPRINT:created_avg:LAST:%5.0lf Last\l'
1933 nfs_procedure => ['-v', 'Issues/s',
1934 'DEF:avg={file}:value:AVERAGE',
1935 'DEF:min={file}:value:MIN',
1936 'DEF:max={file}:value:MAX',
1937 "AREA:max#$HalfBlue",
1939 "LINE1:avg#$FullBlue:Issues/s",
1940 'GPRINT:min:MIN:%6.2lf Min,',
1941 'GPRINT:avg:AVERAGE:%6.2lf Avg,',
1942 'GPRINT:max:MAX:%6.2lf Max,',
1943 'GPRINT:avg:LAST:%6.2lf Last\l'
1945 nfs3_procedures => [
1946 "DEF:null_avg={file}:null:AVERAGE",
1947 "DEF:getattr_avg={file}:getattr:AVERAGE",
1948 "DEF:setattr_avg={file}:setattr:AVERAGE",
1949 "DEF:lookup_avg={file}:lookup:AVERAGE",
1950 "DEF:access_avg={file}:access:AVERAGE",
1951 "DEF:readlink_avg={file}:readlink:AVERAGE",
1952 "DEF:read_avg={file}:read:AVERAGE",
1953 "DEF:write_avg={file}:write:AVERAGE",
1954 "DEF:create_avg={file}:create:AVERAGE",
1955 "DEF:mkdir_avg={file}:mkdir:AVERAGE",
1956 "DEF:symlink_avg={file}:symlink:AVERAGE",
1957 "DEF:mknod_avg={file}:mknod:AVERAGE",
1958 "DEF:remove_avg={file}:remove:AVERAGE",
1959 "DEF:rmdir_avg={file}:rmdir:AVERAGE",
1960 "DEF:rename_avg={file}:rename:AVERAGE",
1961 "DEF:link_avg={file}:link:AVERAGE",
1962 "DEF:readdir_avg={file}:readdir:AVERAGE",
1963 "DEF:readdirplus_avg={file}:readdirplus:AVERAGE",
1964 "DEF:fsstat_avg={file}:fsstat:AVERAGE",
1965 "DEF:fsinfo_avg={file}:fsinfo:AVERAGE",
1966 "DEF:pathconf_avg={file}:pathconf:AVERAGE",
1967 "DEF:commit_avg={file}:commit:AVERAGE",
1968 "DEF:null_max={file}:null:MAX",
1969 "DEF:getattr_max={file}:getattr:MAX",
1970 "DEF:setattr_max={file}:setattr:MAX",
1971 "DEF:lookup_max={file}:lookup:MAX",
1972 "DEF:access_max={file}:access:MAX",
1973 "DEF:readlink_max={file}:readlink:MAX",
1974 "DEF:read_max={file}:read:MAX",
1975 "DEF:write_max={file}:write:MAX",
1976 "DEF:create_max={file}:create:MAX",
1977 "DEF:mkdir_max={file}:mkdir:MAX",
1978 "DEF:symlink_max={file}:symlink:MAX",
1979 "DEF:mknod_max={file}:mknod:MAX",
1980 "DEF:remove_max={file}:remove:MAX",
1981 "DEF:rmdir_max={file}:rmdir:MAX",
1982 "DEF:rename_max={file}:rename:MAX",
1983 "DEF:link_max={file}:link:MAX",
1984 "DEF:readdir_max={file}:readdir:MAX",
1985 "DEF:readdirplus_max={file}:readdirplus:MAX",
1986 "DEF:fsstat_max={file}:fsstat:MAX",
1987 "DEF:fsinfo_max={file}:fsinfo:MAX",
1988 "DEF:pathconf_max={file}:pathconf:MAX",
1989 "DEF:commit_max={file}:commit:MAX",
1990 "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,+,+,+,+,+,+,+,+,+,+,+,+,+,+",
1991 "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,+,+,+,+,+,+,+,+,+,+,+,+,+,+",
1992 "CDEF:stack_read=read_avg",
1993 "CDEF:stack_getattr=stack_read,getattr_avg,+",
1994 "CDEF:stack_access=stack_getattr,access_avg,+",
1995 "CDEF:stack_lookup=stack_access,lookup_avg,+",
1996 "CDEF:stack_write=stack_lookup,write_avg,+",
1997 "CDEF:stack_commit=stack_write,commit_avg,+",
1998 "CDEF:stack_setattr=stack_commit,setattr_avg,+",
1999 "CDEF:stack_other=stack_setattr,other_avg,+",
2000 "AREA:stack_other#$HalfRed",
2001 "AREA:stack_setattr#$HalfGreen",
2002 "AREA:stack_commit#$HalfYellow",
2003 "AREA:stack_write#$HalfGreen",
2004 "AREA:stack_lookup#$HalfBlue",
2005 "AREA:stack_access#$HalfMagenta",
2006 "AREA:stack_getattr#$HalfCyan",
2007 "AREA:stack_read#$HalfBlue",
2008 "LINE1:stack_other#$FullRed:Other ",
2009 'GPRINT:other_max:MAX:%5.1lf Max,',
2010 'GPRINT:other_avg:AVERAGE:%5.1lf Avg,',
2011 'GPRINT:other_avg:LAST:%5.1lf Last\l',
2012 "LINE1:stack_setattr#$FullGreen:setattr",
2013 'GPRINT:setattr_max:MAX:%5.1lf Max,',
2014 'GPRINT:setattr_avg:AVERAGE:%5.1lf Avg,',
2015 'GPRINT:setattr_avg:LAST:%5.1lf Last\l',
2016 "LINE1:stack_commit#$FullYellow:commit ",
2017 'GPRINT:commit_max:MAX:%5.1lf Max,',
2018 'GPRINT:commit_avg:AVERAGE:%5.1lf Avg,',
2019 'GPRINT:commit_avg:LAST:%5.1lf Last\l',
2020 "LINE1:stack_write#$FullGreen:write ",
2021 'GPRINT:write_max:MAX:%5.1lf Max,',
2022 'GPRINT:write_avg:AVERAGE:%5.1lf Avg,',
2023 'GPRINT:write_avg:LAST:%5.1lf Last\l',
2024 "LINE1:stack_lookup#$FullBlue:lookup ",
2025 'GPRINT:lookup_max:MAX:%5.1lf Max,',
2026 'GPRINT:lookup_avg:AVERAGE:%5.1lf Avg,',
2027 'GPRINT:lookup_avg:LAST:%5.1lf Last\l',
2028 "LINE1:stack_access#$FullMagenta:access ",
2029 'GPRINT:access_max:MAX:%5.1lf Max,',
2030 'GPRINT:access_avg:AVERAGE:%5.1lf Avg,',
2031 'GPRINT:access_avg:LAST:%5.1lf Last\l',
2032 "LINE1:stack_getattr#$FullCyan:getattr",
2033 'GPRINT:getattr_max:MAX:%5.1lf Max,',
2034 'GPRINT:getattr_avg:AVERAGE:%5.1lf Avg,',
2035 'GPRINT:getattr_avg:LAST:%5.1lf Last\l',
2036 "LINE1:stack_read#$FullBlue:read ",
2037 'GPRINT:read_max:MAX:%5.1lf Max,',
2038 'GPRINT:read_avg:AVERAGE:%5.1lf Avg,',
2039 'GPRINT:read_avg:LAST:%5.1lf Last\l'
2042 "DEF:rbyte_avg={file}:rbytes:AVERAGE",
2043 "DEF:rbyte_min={file}:rbytes:MIN",
2044 "DEF:rbyte_max={file}:rbytes:MAX",
2045 "DEF:wbyte_avg={file}:wbytes:AVERAGE",
2046 "DEF:wbyte_min={file}:wbytes:MIN",
2047 "DEF:wbyte_max={file}:wbytes:MAX",
2048 'CDEF:overlap=wbyte_avg,rbyte_avg,GT,rbyte_avg,wbyte_avg,IF',
2049 "AREA:wbyte_avg#$HalfGreen",
2050 "AREA:rbyte_avg#$HalfBlue",
2051 "AREA:overlap#$HalfBlueGreen",
2052 "LINE1:wbyte_avg#$FullGreen:Write",
2053 'GPRINT:wbyte_min:MIN:%5.1lf%s Min,',
2054 'GPRINT:wbyte_avg:AVERAGE:%5.1lf%s Avg,',
2055 'GPRINT:wbyte_max:MAX:%5.1lf%s Max,',
2056 'GPRINT:wbyte_avg:LAST:%5.1lf%s Last\l',
2057 "LINE1:rbyte_avg#$FullBlue:Read ",
2058 'GPRINT:rbyte_min:MIN:%5.1lf%s Min,',
2059 'GPRINT:rbyte_avg:AVERAGE:%5.1lf%s Avg,',
2060 'GPRINT:rbyte_max:MAX:%5.1lf%s Max,',
2061 'GPRINT:rbyte_avg:LAST:%5.1lf%s Last\l'
2063 percent => ['-v', 'Percent',
2064 'DEF:avg={file}:percent:AVERAGE',
2065 'DEF:min={file}:percent:MIN',
2066 'DEF:max={file}:percent:MAX',
2067 "AREA:max#$HalfBlue",
2069 "LINE1:avg#$FullBlue:Percent",
2070 'GPRINT:min:MIN:%5.1lf%% Min,',
2071 'GPRINT:avg:AVERAGE:%5.1lf%% Avg,',
2072 'GPRINT:max:MAX:%5.1lf%% Max,',
2073 'GPRINT:avg:LAST:%5.1lf%% Last\l'
2075 ping => ['DEF:ping_avg={file}:ping:AVERAGE',
2076 'DEF:ping_min={file}:ping:MIN',
2077 'DEF:ping_max={file}:ping:MAX',
2078 "AREA:ping_max#$HalfBlue",
2079 "AREA:ping_min#$Canvas",
2080 "LINE1:ping_avg#$FullBlue:Ping",
2081 'GPRINT:ping_min:MIN:%4.1lf ms Min,',
2082 'GPRINT:ping_avg:AVERAGE:%4.1lf ms Avg,',
2083 'GPRINT:ping_max:MAX:%4.1lf ms Max,',
2084 'GPRINT:ping_avg:LAST:%4.1lf ms Last'],
2085 pg_blks => ['DEF:pg_blks_avg={file}:value:AVERAGE',
2086 'DEF:pg_blks_min={file}:value:MIN',
2087 'DEF:pg_blks_max={file}:value:MAX',
2088 "AREA:pg_blks_max#$HalfBlue",
2089 "AREA:pg_blks_min#$Canvas",
2090 "LINE1:pg_blks_avg#$FullBlue:Blocks",
2091 'GPRINT:pg_blks_min:MIN:%4.1lf%s Min,',
2092 'GPRINT:pg_blks_avg:AVERAGE:%4.1lf%s Avg,',
2093 'GPRINT:pg_blks_max:MAX:%4.1lf%s Max,',
2094 'GPRINT:pg_blks_avg:LAST:%4.1lf%s Last'],
2095 pg_db_size => ['DEF:pg_db_size_avg={file}:value:AVERAGE',
2096 'DEF:pg_db_size_min={file}:value:MIN',
2097 'DEF:pg_db_size_max={file}:value:MAX',
2098 "AREA:pg_db_size_max#$HalfBlue",
2099 "AREA:pg_db_size_min#$Canvas",
2100 "LINE1:pg_db_size_avg#$FullBlue:Bytes",
2101 'GPRINT:pg_db_size_min:MIN:%4.1lf%s Min,',
2102 'GPRINT:pg_db_size_avg:AVERAGE:%4.1lf%s Avg,',
2103 'GPRINT:pg_db_size_max:MAX:%4.1lf%s Max,',
2104 'GPRINT:pg_db_size_avg:LAST:%4.1lf%s Last'],
2105 pg_n_tup_c => ['DEF:pg_n_tup_avg={file}:value:AVERAGE',
2106 'DEF:pg_n_tup_min={file}:value:MIN',
2107 'DEF:pg_n_tup_max={file}:value:MAX',
2108 "AREA:pg_n_tup_max#$HalfBlue",
2109 "AREA:pg_n_tup_min#$Canvas",
2110 "LINE1:pg_n_tup_avg#$FullBlue:Tuples",
2111 'GPRINT:pg_n_tup_min:MIN:%4.1lf%s Min,',
2112 'GPRINT:pg_n_tup_avg:AVERAGE:%4.1lf%s Avg,',
2113 'GPRINT:pg_n_tup_max:MAX:%4.1lf%s Max,',
2114 'GPRINT:pg_n_tup_avg:LAST:%4.1lf%s Last'],
2115 pg_n_tup_g => ['DEF:pg_n_tup_avg={file}:value:AVERAGE',
2116 'DEF:pg_n_tup_min={file}:value:MIN',
2117 'DEF:pg_n_tup_max={file}:value:MAX',
2118 "AREA:pg_n_tup_max#$HalfBlue",
2119 "AREA:pg_n_tup_min#$Canvas",
2120 "LINE1:pg_n_tup_avg#$FullBlue:Tuples",
2121 'GPRINT:pg_n_tup_min:MIN:%4.1lf%s Min,',
2122 'GPRINT:pg_n_tup_avg:AVERAGE:%4.1lf%s Avg,',
2123 'GPRINT:pg_n_tup_max:MAX:%4.1lf%s Max,',
2124 'GPRINT:pg_n_tup_avg:LAST:%4.1lf%s Last'],
2125 pg_numbackends => ['DEF:pg_numbackends_avg={file}:value:AVERAGE',
2126 'DEF:pg_numbackends_min={file}:value:MIN',
2127 'DEF:pg_numbackends_max={file}:value:MAX',
2128 "AREA:pg_numbackends_max#$HalfBlue",
2129 "AREA:pg_numbackends_min#$Canvas",
2130 "LINE1:pg_numbackends_avg#$FullBlue:Backends",
2131 'GPRINT:pg_numbackends_min:MIN:%4.1lf%s Min,',
2132 'GPRINT:pg_numbackends_avg:AVERAGE:%4.1lf%s Avg,',
2133 'GPRINT:pg_numbackends_max:MAX:%4.1lf%s Max,',
2134 'GPRINT:pg_numbackends_avg:LAST:%4.1lf%s Last'],
2135 pg_scan => ['DEF:pg_scan_avg={file}:value:AVERAGE',
2136 'DEF:pg_scan_min={file}:value:MIN',
2137 'DEF:pg_scan_max={file}:value:MAX',
2138 "AREA:pg_scan_max#$HalfBlue",
2139 "AREA:pg_scan_min#$Canvas",
2140 "LINE1:pg_scan_avg#$FullBlue:Scans",
2141 'GPRINT:pg_scan_min:MIN:%4.1lf%s Min,',
2142 'GPRINT:pg_scan_avg:AVERAGE:%4.1lf%s Avg,',
2143 'GPRINT:pg_scan_max:MAX:%4.1lf%s Max,',
2144 'GPRINT:pg_scan_avg:LAST:%4.1lf%s Last'],
2145 pg_xact => ['DEF:pg_xact_avg={file}:value:AVERAGE',
2146 'DEF:pg_xact_min={file}:value:MIN',
2147 'DEF:pg_xact_max={file}:value:MAX',
2148 "AREA:pg_xact_max#$HalfBlue",
2149 "AREA:pg_xact_min#$Canvas",
2150 "LINE1:pg_xact_avg#$FullBlue:Transactions",
2151 'GPRINT:pg_xact_min:MIN:%4.1lf%s Min,',
2152 'GPRINT:pg_xact_avg:AVERAGE:%4.1lf%s Avg,',
2153 'GPRINT:pg_xact_max:MAX:%4.1lf%s Max,',
2154 'GPRINT:pg_xact_avg:LAST:%4.1lf%s Last'],
2155 power => ['-v', 'Watt',
2156 'DEF:avg={file}:value:AVERAGE',
2157 'DEF:min={file}:value:MIN',
2158 'DEF:max={file}:value:MAX',
2159 "AREA:max#$HalfBlue",
2161 "LINE1:avg#$FullBlue:Watt",
2162 'GPRINT:min:MIN:%5.1lf%sW Min,',
2163 'GPRINT:avg:AVERAGE:%5.1lf%sW Avg,',
2164 'GPRINT:max:MAX:%5.1lf%sW Max,',
2165 'GPRINT:avg:LAST:%5.1lf%sW Last\l'
2168 "DEF:running_avg={file}:running:AVERAGE",
2169 "DEF:running_min={file}:running:MIN",
2170 "DEF:running_max={file}:running:MAX",
2171 "DEF:sleeping_avg={file}:sleeping:AVERAGE",
2172 "DEF:sleeping_min={file}:sleeping:MIN",
2173 "DEF:sleeping_max={file}:sleeping:MAX",
2174 "DEF:zombies_avg={file}:zombies:AVERAGE",
2175 "DEF:zombies_min={file}:zombies:MIN",
2176 "DEF:zombies_max={file}:zombies:MAX",
2177 "DEF:stopped_avg={file}:stopped:AVERAGE",
2178 "DEF:stopped_min={file}:stopped:MIN",
2179 "DEF:stopped_max={file}:stopped:MAX",
2180 "DEF:paging_avg={file}:paging:AVERAGE",
2181 "DEF:paging_min={file}:paging:MIN",
2182 "DEF:paging_max={file}:paging:MAX",
2183 "DEF:blocked_avg={file}:blocked:AVERAGE",
2184 "DEF:blocked_min={file}:blocked:MIN",
2185 "DEF:blocked_max={file}:blocked:MAX",
2186 'CDEF:paging_acc=sleeping_avg,running_avg,stopped_avg,zombies_avg,blocked_avg,paging_avg,+,+,+,+,+',
2187 'CDEF:blocked_acc=sleeping_avg,running_avg,stopped_avg,zombies_avg,blocked_avg,+,+,+,+',
2188 'CDEF:zombies_acc=sleeping_avg,running_avg,stopped_avg,zombies_avg,+,+,+',
2189 'CDEF:stopped_acc=sleeping_avg,running_avg,stopped_avg,+,+',
2190 'CDEF:running_acc=sleeping_avg,running_avg,+',
2191 'CDEF:sleeping_acc=sleeping_avg',
2192 "AREA:paging_acc#$HalfYellow",
2193 "AREA:blocked_acc#$HalfCyan",
2194 "AREA:zombies_acc#$HalfRed",
2195 "AREA:stopped_acc#$HalfMagenta",
2196 "AREA:running_acc#$HalfGreen",
2197 "AREA:sleeping_acc#$HalfBlue",
2198 "LINE1:paging_acc#$FullYellow:Paging ",
2199 'GPRINT:paging_min:MIN:%5.1lf Min,',
2200 'GPRINT:paging_avg:AVERAGE:%5.1lf Average,',
2201 'GPRINT:paging_max:MAX:%5.1lf Max,',
2202 'GPRINT:paging_avg:LAST:%5.1lf Last\l',
2203 "LINE1:blocked_acc#$FullCyan:Blocked ",
2204 'GPRINT:blocked_min:MIN:%5.1lf Min,',
2205 'GPRINT:blocked_avg:AVERAGE:%5.1lf Average,',
2206 'GPRINT:blocked_max:MAX:%5.1lf Max,',
2207 'GPRINT:blocked_avg:LAST:%5.1lf Last\l',
2208 "LINE1:zombies_acc#$FullRed:Zombies ",
2209 'GPRINT:zombies_min:MIN:%5.1lf Min,',
2210 'GPRINT:zombies_avg:AVERAGE:%5.1lf Average,',
2211 'GPRINT:zombies_max:MAX:%5.1lf Max,',
2212 'GPRINT:zombies_avg:LAST:%5.1lf Last\l',
2213 "LINE1:stopped_acc#$FullMagenta:Stopped ",
2214 'GPRINT:stopped_min:MIN:%5.1lf Min,',
2215 'GPRINT:stopped_avg:AVERAGE:%5.1lf Average,',
2216 'GPRINT:stopped_max:MAX:%5.1lf Max,',
2217 'GPRINT:stopped_avg:LAST:%5.1lf Last\l',
2218 "LINE1:running_acc#$FullGreen:Running ",
2219 'GPRINT:running_min:MIN:%5.1lf Min,',
2220 'GPRINT:running_avg:AVERAGE:%5.1lf Average,',
2221 'GPRINT:running_max:MAX:%5.1lf Max,',
2222 'GPRINT:running_avg:LAST:%5.1lf Last\l',
2223 "LINE1:sleeping_acc#$FullBlue:Sleeping",
2224 'GPRINT:sleeping_min:MIN:%5.1lf Min,',
2225 'GPRINT:sleeping_avg:AVERAGE:%5.1lf Average,',
2226 'GPRINT:sleeping_max:MAX:%5.1lf Max,',
2227 'GPRINT:sleeping_avg:LAST:%5.1lf Last\l'
2229 ps_count => ['-v', 'Processes',
2230 'DEF:procs_avg={file}:processes:AVERAGE',
2231 'DEF:procs_min={file}:processes:MIN',
2232 'DEF:procs_max={file}:processes:MAX',
2233 'DEF:thrds_avg={file}:threads:AVERAGE',
2234 'DEF:thrds_min={file}:threads:MIN',
2235 'DEF:thrds_max={file}:threads:MAX',
2236 "AREA:thrds_avg#$HalfBlue",
2237 "AREA:procs_avg#$HalfRed",
2238 "LINE1:thrds_avg#$FullBlue:Threads ",
2239 'GPRINT:thrds_min:MIN:%5.1lf Min,',
2240 'GPRINT:thrds_avg:AVERAGE:%5.1lf Avg,',
2241 'GPRINT:thrds_max:MAX:%5.1lf Max,',
2242 'GPRINT:thrds_avg:LAST:%5.1lf Last\l',
2243 "LINE1:procs_avg#$FullRed:Processes",
2244 'GPRINT:procs_min:MIN:%5.1lf Min,',
2245 'GPRINT:procs_avg:AVERAGE:%5.1lf Avg,',
2246 'GPRINT:procs_max:MAX:%5.1lf Max,',
2247 'GPRINT:procs_avg:LAST:%5.1lf Last\l'
2249 ps_cputime => ['-v', 'Jiffies',
2250 'DEF:user_avg_raw={file}:user:AVERAGE',
2251 'DEF:user_min_raw={file}:user:MIN',
2252 'DEF:user_max_raw={file}:user:MAX',
2253 'DEF:syst_avg_raw={file}:syst:AVERAGE',
2254 'DEF:syst_min_raw={file}:syst:MIN',
2255 'DEF:syst_max_raw={file}:syst:MAX',
2256 'CDEF:user_avg=user_avg_raw,1000000,/',
2257 'CDEF:user_min=user_min_raw,1000000,/',
2258 'CDEF:user_max=user_max_raw,1000000,/',
2259 'CDEF:syst_avg=syst_avg_raw,1000000,/',
2260 'CDEF:syst_min=syst_min_raw,1000000,/',
2261 'CDEF:syst_max=syst_max_raw,1000000,/',
2262 'CDEF:user_syst=syst_avg,UN,0,syst_avg,IF,user_avg,+',
2263 "AREA:user_syst#$HalfBlue",
2264 "AREA:syst_avg#$HalfRed",
2265 "LINE1:user_syst#$FullBlue:User ",
2266 'GPRINT:user_min:MIN:%5.1lf%s Min,',
2267 'GPRINT:user_avg:AVERAGE:%5.1lf%s Avg,',
2268 'GPRINT:user_max:MAX:%5.1lf%s Max,',
2269 'GPRINT:user_avg:LAST:%5.1lf%s Last\l',
2270 "LINE1:syst_avg#$FullRed:System",
2271 'GPRINT:syst_min:MIN:%5.1lf%s Min,',
2272 'GPRINT:syst_avg:AVERAGE:%5.1lf%s Avg,',
2273 'GPRINT:syst_max:MAX:%5.1lf%s Max,',
2274 'GPRINT:syst_avg:LAST:%5.1lf%s Last\l'
2276 ps_pagefaults => ['-v', 'Pagefaults/s',
2277 'DEF:minor_avg={file}:minflt:AVERAGE',
2278 'DEF:minor_min={file}:minflt:MIN',
2279 'DEF:minor_max={file}:minflt:MAX',
2280 'DEF:major_avg={file}:majflt:AVERAGE',
2281 'DEF:major_min={file}:majflt:MIN',
2282 'DEF:major_max={file}:majflt:MAX',
2283 'CDEF:minor_major=major_avg,UN,0,major_avg,IF,minor_avg,+',
2284 "AREA:minor_major#$HalfBlue",
2285 "AREA:major_avg#$HalfRed",
2286 "LINE1:minor_major#$FullBlue:Minor",
2287 'GPRINT:minor_min:MIN:%5.1lf%s Min,',
2288 'GPRINT:minor_avg:AVERAGE:%5.1lf%s Avg,',
2289 'GPRINT:minor_max:MAX:%5.1lf%s Max,',
2290 'GPRINT:minor_avg:LAST:%5.1lf%s Last\l',
2291 "LINE1:major_avg#$FullRed:Major",
2292 'GPRINT:major_min:MIN:%5.1lf%s Min,',
2293 'GPRINT:major_avg:AVERAGE:%5.1lf%s Avg,',
2294 'GPRINT:major_max:MAX:%5.1lf%s Max,',
2295 'GPRINT:major_avg:LAST:%5.1lf%s Last\l'
2297 ps_rss => ['-v', 'Bytes',
2298 'DEF:avg={file}:value:AVERAGE',
2299 'DEF:min={file}:value:MIN',
2300 'DEF:max={file}:value:MAX',
2301 "AREA:avg#$HalfBlue",
2302 "LINE1:avg#$FullBlue:RSS",
2303 'GPRINT:min:MIN:%5.1lf%s Min,',
2304 'GPRINT:avg:AVERAGE:%5.1lf%s Avg,',
2305 'GPRINT:max:MAX:%5.1lf%s Max,',
2306 'GPRINT:avg:LAST:%5.1lf%s Last\l'
2308 ps_state => ['-v', 'Processes',
2309 'DEF:avg={file}:value:AVERAGE',
2310 'DEF:min={file}:value:MIN',
2311 'DEF:max={file}:value:MAX',
2312 "AREA:max#$HalfBlue",
2314 "LINE1:avg#$FullBlue:Processes",
2315 'GPRINT:min:MIN:%6.2lf Min,',
2316 'GPRINT:avg:AVERAGE:%6.2lf Avg,',
2317 'GPRINT:max:MAX:%6.2lf Max,',
2318 'GPRINT:avg:LAST:%6.2lf Last\l'
2320 signal_noise => ['-v', 'dBm',
2321 'DEF:avg={file}:value:AVERAGE',
2322 'DEF:min={file}:value:MIN',
2323 'DEF:max={file}:value:MAX',
2324 "AREA:max#$HalfBlue",
2326 "LINE1:avg#$FullBlue:Noise",
2327 'GPRINT:min:MIN:%5.1lf%sdBm Min,',
2328 'GPRINT:avg:AVERAGE:%5.1lf%sdBm Avg,',
2329 'GPRINT:max:MAX:%5.1lf%sdBm Max,',
2330 'GPRINT:avg:LAST:%5.1lf%sdBm Last\l'
2332 signal_power => ['-v', 'dBm',
2333 'DEF:avg={file}:value:AVERAGE',
2334 'DEF:min={file}:value:MIN',
2335 'DEF:max={file}:value:MAX',
2336 "AREA:max#$HalfBlue",
2338 "LINE1:avg#$FullBlue:Power",
2339 'GPRINT:min:MIN:%5.1lf%sdBm Min,',
2340 'GPRINT:avg:AVERAGE:%5.1lf%sdBm Avg,',
2341 'GPRINT:max:MAX:%5.1lf%sdBm Max,',
2342 'GPRINT:avg:LAST:%5.1lf%sdBm Last\l'
2344 signal_quality => ['-v', '%',
2345 'DEF:avg={file}:value:AVERAGE',
2346 'DEF:min={file}:value:MIN',
2347 'DEF:max={file}:value:MAX',
2348 "AREA:max#$HalfBlue",
2350 "LINE1:avg#$FullBlue:Quality",
2351 'GPRINT:min:MIN:%5.1lf%s%% Min,',
2352 'GPRINT:avg:AVERAGE:%5.1lf%s%% Avg,',
2353 'GPRINT:max:MAX:%5.1lf%s%% Max,',
2354 'GPRINT:avg:LAST:%5.1lf%s%% Last\l'
2356 swap => ['-v', 'Bytes', '-b', '1024',
2357 'DEF:avg={file}:value:AVERAGE',
2358 'DEF:min={file}:value:MIN',
2359 'DEF:max={file}:value:MAX',
2360 "AREA:max#$HalfBlue",
2362 "LINE1:avg#$FullBlue:Bytes",
2363 'GPRINT:min:MIN:%6.2lf%sByte Min,',
2364 'GPRINT:avg:AVERAGE:%6.2lf%sByte Avg,',
2365 'GPRINT:max:MAX:%6.2lf%sByte Max,',
2366 'GPRINT:avg:LAST:%6.2lf%sByte Last\l'
2369 'DEF:used_avg={file}:used:AVERAGE',
2370 'DEF:used_min={file}:used:MIN',
2371 'DEF:used_max={file}:used:MAX',
2372 'DEF:free_avg={file}:free:AVERAGE',
2373 'DEF:free_min={file}:free:MIN',
2374 'DEF:free_max={file}:free:MAX',
2375 'DEF:cach_avg={file}:cached:AVERAGE',
2376 'DEF:cach_min={file}:cached:MIN',
2377 'DEF:cach_max={file}:cached:MAX',
2378 'DEF:resv_avg={file}:resv:AVERAGE',
2379 'DEF:resv_min={file}:resv:MIN',
2380 'DEF:resv_max={file}:resv:MAX',
2381 'CDEF:cach_avg_notnull=cach_avg,UN,0,cach_avg,IF',
2382 'CDEF:resv_avg_notnull=resv_avg,UN,0,resv_avg,IF',
2383 'CDEF:used_acc=used_avg',
2384 'CDEF:resv_acc=used_acc,resv_avg_notnull,+',
2385 'CDEF:cach_acc=resv_acc,cach_avg_notnull,+',
2386 'CDEF:free_acc=cach_acc,free_avg,+',
2387 "AREA:free_acc#$HalfGreen",
2388 "AREA:cach_acc#$HalfBlue",
2389 "AREA:resv_acc#$HalfYellow",
2390 "AREA:used_acc#$HalfRed",
2391 "LINE1:free_acc#$FullGreen:Free ",
2392 'GPRINT:free_min:MIN:%5.1lf%s Min,',
2393 'GPRINT:free_avg:AVERAGE:%5.1lf%s Avg,',
2394 'GPRINT:free_max:MAX:%5.1lf%s Max,',
2395 'GPRINT:free_avg:LAST:%5.1lf%s Last\n',
2396 "LINE1:cach_acc#$FullBlue:Cached ",
2397 'GPRINT:cach_min:MIN:%5.1lf%s Min,',
2398 'GPRINT:cach_avg:AVERAGE:%5.1lf%s Avg,',
2399 'GPRINT:cach_max:MAX:%5.1lf%s Max,',
2400 'GPRINT:cach_avg:LAST:%5.1lf%s Last\l',
2401 "LINE1:resv_acc#$FullYellow:Reserved",
2402 'GPRINT:resv_min:MIN:%5.1lf%s Min,',
2403 'GPRINT:resv_avg:AVERAGE:%5.1lf%s Avg,',
2404 'GPRINT:resv_max:MAX:%5.1lf%s Max,',
2405 'GPRINT:resv_avg:LAST:%5.1lf%s Last\n',
2406 "LINE1:used_acc#$FullRed:Used ",
2407 'GPRINT:used_min:MIN:%5.1lf%s Min,',
2408 'GPRINT:used_avg:AVERAGE:%5.1lf%s Avg,',
2409 'GPRINT:used_max:MAX:%5.1lf%s Max,',
2410 'GPRINT:used_avg:LAST:%5.1lf%s Last\l'
2412 tcp_connections => ['-v', 'Connections',
2413 'DEF:avg={file}:value:AVERAGE',
2414 'DEF:min={file}:value:MIN',
2415 'DEF:max={file}:value:MAX',
2416 "AREA:max#$HalfBlue",
2418 "LINE1:avg#$FullBlue:Connections",
2419 'GPRINT:min:MIN:%4.1lf Min,',
2420 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
2421 'GPRINT:max:MAX:%4.1lf Max,',
2422 'GPRINT:avg:LAST:%4.1lf Last\l'
2424 temperature => ['-v', 'Celsius',
2425 'DEF:temp_avg={file}:value:AVERAGE',
2426 'DEF:temp_min={file}:value:MIN',
2427 'DEF:temp_max={file}:value:MAX',
2428 'CDEF:average=temp_avg,0.2,*,PREV,UN,temp_avg,PREV,IF,0.8,*,+',
2429 "AREA:temp_max#$HalfRed",
2430 "AREA:temp_min#$Canvas",
2431 "LINE1:temp_avg#$FullRed:Temperature",
2432 'GPRINT:temp_min:MIN:%4.1lf Min,',
2433 'GPRINT:temp_avg:AVERAGE:%4.1lf Avg,',
2434 'GPRINT:temp_max:MAX:%4.1lf Max,',
2435 'GPRINT:temp_avg:LAST:%4.1lf Last\l'
2437 timeleft => ['-v', 'Minutes',
2438 'DEF:avg={file}:timeleft:AVERAGE',
2439 'DEF:min={file}:timeleft:MIN',
2440 'DEF:max={file}:timeleft:MAX',
2441 "AREA:max#$HalfBlue",
2443 "LINE1:avg#$FullBlue:Time left [min]",
2444 'GPRINT:min:MIN:%5.1lf%s Min,',
2445 'GPRINT:avg:AVERAGE:%5.1lf%s Avg,',
2446 'GPRINT:max:MAX:%5.1lf%s Max,',
2447 'GPRINT:avg:LAST:%5.1lf%s Last\l'
2449 time_offset => [ # NTPd
2450 'DEF:s_avg={file}:seconds:AVERAGE',
2451 'DEF:s_min={file}:seconds:MIN',
2452 'DEF:s_max={file}:seconds:MAX',
2453 "AREA:s_max#$HalfBlue",
2454 "AREA:s_min#$Canvas",
2455 "LINE1:s_avg#$FullBlue:{inst}",
2456 'GPRINT:s_min:MIN:%7.3lf%s Min,',
2457 'GPRINT:s_avg:AVERAGE:%7.3lf%s Avg,',
2458 'GPRINT:s_max:MAX:%7.3lf%s Max,',
2459 'GPRINT:s_avg:LAST:%7.3lf%s Last'
2461 if_octets => ['-v', 'Bits/s', '-l', '0',
2462 'DEF:out_min_raw={file}:tx:MIN',
2463 'DEF:out_avg_raw={file}:tx:AVERAGE',
2464 'DEF:out_max_raw={file}:tx:MAX',
2465 'DEF:inc_min_raw={file}:rx:MIN',
2466 'DEF:inc_avg_raw={file}:rx:AVERAGE',
2467 'DEF:inc_max_raw={file}:rx:MAX',
2468 'CDEF:out_min=out_min_raw,8,*',
2469 'CDEF:out_avg=out_avg_raw,8,*',
2470 'CDEF:out_max=out_max_raw,8,*',
2471 'CDEF:inc_min=inc_min_raw,8,*',
2472 'CDEF:inc_avg=inc_avg_raw,8,*',
2473 'CDEF:inc_max=inc_max_raw,8,*',
2474 'CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF',
2475 'CDEF:mytime=out_avg_raw,TIME,TIME,IF',
2476 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
2477 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
2478 'CDEF:out_avg_sample=out_avg_raw,UN,0,out_avg_raw,IF,sample_len,*',
2479 'CDEF:out_avg_sum=PREV,UN,0,PREV,IF,out_avg_sample,+',
2480 'CDEF:inc_avg_sample=inc_avg_raw,UN,0,inc_avg_raw,IF,sample_len,*',
2481 'CDEF:inc_avg_sum=PREV,UN,0,PREV,IF,inc_avg_sample,+',
2482 "AREA:out_avg#$HalfGreen",
2483 "AREA:inc_avg#$HalfBlue",
2484 "AREA:overlap#$HalfBlueGreen",
2485 "LINE1:out_avg#$FullGreen:Outgoing",
2486 'GPRINT:out_avg:AVERAGE:%5.1lf%s Avg,',
2487 'GPRINT:out_max:MAX:%5.1lf%s Max,',
2488 'GPRINT:out_avg:LAST:%5.1lf%s Last',
2489 'GPRINT:out_avg_sum:LAST:(ca. %5.1lf%sB Total)\l',
2490 "LINE1:inc_avg#$FullBlue:Incoming",
2491 #'GPRINT:inc_min:MIN:%5.1lf %s Min,',
2492 'GPRINT:inc_avg:AVERAGE:%5.1lf%s Avg,',
2493 'GPRINT:inc_max:MAX:%5.1lf%s Max,',
2494 'GPRINT:inc_avg:LAST:%5.1lf%s Last',
2495 'GPRINT:inc_avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
2498 'DEF:cpufreq_avg={file}:value:AVERAGE',
2499 'DEF:cpufreq_min={file}:value:MIN',
2500 'DEF:cpufreq_max={file}:value:MAX',
2501 "AREA:cpufreq_max#$HalfBlue",
2502 "AREA:cpufreq_min#$Canvas",
2503 "LINE1:cpufreq_avg#$FullBlue:Frequency",
2504 'GPRINT:cpufreq_min:MIN:%5.1lf%s Min,',
2505 'GPRINT:cpufreq_avg:AVERAGE:%5.1lf%s Avg,',
2506 'GPRINT:cpufreq_max:MAX:%5.1lf%s Max,',
2507 'GPRINT:cpufreq_avg:LAST:%5.1lf%s Last\l'
2510 'DEF:multimeter_avg={file}:value:AVERAGE',
2511 'DEF:multimeter_min={file}:value:MIN',
2512 'DEF:multimeter_max={file}:value:MAX',
2513 "AREA:multimeter_max#$HalfBlue",
2514 "AREA:multimeter_min#$Canvas",
2515 "LINE1:multimeter_avg#$FullBlue:Multimeter",
2516 'GPRINT:multimeter_min:MIN:%4.1lf Min,',
2517 'GPRINT:multimeter_avg:AVERAGE:%4.1lf Average,',
2518 'GPRINT:multimeter_max:MAX:%4.1lf Max,',
2519 'GPRINT:multimeter_avg:LAST:%4.1lf Last\l'
2521 users => ['-v', 'Users',
2522 'DEF:users_avg={file}:users:AVERAGE',
2523 'DEF:users_min={file}:users:MIN',
2524 'DEF:users_max={file}:users:MAX',
2525 "AREA:users_max#$HalfBlue",
2526 "AREA:users_min#$Canvas",
2527 "LINE1:users_avg#$FullBlue:Users",
2528 'GPRINT:users_min:MIN:%4.1lf Min,',
2529 'GPRINT:users_avg:AVERAGE:%4.1lf Average,',
2530 'GPRINT:users_max:MAX:%4.1lf Max,',
2531 'GPRINT:users_avg:LAST:%4.1lf Last\l'
2533 voltage => ['-v', 'Voltage',
2534 'DEF:avg={file}:value:AVERAGE',
2535 'DEF:min={file}:value:MIN',
2536 'DEF:max={file}:value:MAX',
2537 "AREA:max#$HalfBlue",
2539 "LINE1:avg#$FullBlue:Voltage",
2540 'GPRINT:min:MIN:%5.1lf%sV Min,',
2541 'GPRINT:avg:AVERAGE:%5.1lf%sV Avg,',
2542 'GPRINT:max:MAX:%5.1lf%sV Max,',
2543 'GPRINT:avg:LAST:%5.1lf%sV Last\l'
2546 "DEF:avg={file}:value:AVERAGE",
2547 "DEF:min={file}:value:MIN",
2548 "DEF:max={file}:value:MAX",
2549 "AREA:max#$HalfBlue",
2551 "LINE1:avg#$FullBlue:Threads",
2552 'GPRINT:min:MIN:%5.1lf Min,',
2553 'GPRINT:avg:AVERAGE:%5.1lf Avg.,',
2554 'GPRINT:max:MAX:%5.1lf Max,',
2555 'GPRINT:avg:LAST:%5.1lf Last\l',
2557 vs_memory => ['-b', '1024', '-v', 'Bytes',
2558 "DEF:avg={file}:value:AVERAGE",
2559 "DEF:min={file}:value:MIN",
2560 "DEF:max={file}:value:MAX",
2561 "AREA:max#$HalfBlue",
2563 "LINE1:avg#$FullBlue:",
2564 'GPRINT:min:MIN:%5.1lf%sbytes Min,',
2565 'GPRINT:avg:AVERAGE:%5.1lf%sbytes Avg.,',
2566 'GPRINT:max:MAX:%5.1lf%sbytes Max,',
2567 'GPRINT:avg:LAST:%5.1lf%sbytes Last\l',
2570 "DEF:avg={file}:value:AVERAGE",
2571 "DEF:min={file}:value:MIN",
2572 "DEF:max={file}:value:MAX",
2573 "AREA:max#$HalfBlue",
2575 "LINE1:avg#$FullBlue:Processes",
2576 'GPRINT:min:MIN:%5.1lf Min,',
2577 'GPRINT:avg:AVERAGE:%5.1lf Avg.,',
2578 'GPRINT:max:MAX:%5.1lf Max,',
2579 'GPRINT:avg:LAST:%5.1lf Last\l',
2581 vmpage_number => ['-v', 'Pages',
2582 'DEF:avg={file}:value:AVERAGE',
2583 'DEF:min={file}:value:MIN',
2584 'DEF:max={file}:value:MAX',
2585 "AREA:max#$HalfBlue",
2587 "LINE1:avg#$FullBlue:Number",
2588 'GPRINT:min:MIN:%4.1lf Min,',
2589 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
2590 'GPRINT:max:MAX:%4.1lf Max,',
2591 'GPRINT:avg:LAST:%4.1lf Last\l'
2594 "DEF:minf_avg={file}:minflt:AVERAGE",
2595 "DEF:minf_min={file}:minflt:MIN",
2596 "DEF:minf_max={file}:minflt:MAX",
2597 "DEF:majf_avg={file}:majflt:AVERAGE",
2598 "DEF:majf_min={file}:majflt:MIN",
2599 "DEF:majf_max={file}:majflt:MAX",
2600 'CDEF:overlap=majf_avg,minf_avg,GT,minf_avg,majf_avg,IF',
2601 "AREA:majf_avg#$HalfGreen",
2602 "AREA:minf_avg#$HalfBlue",
2603 "AREA:overlap#$HalfBlueGreen",
2604 "LINE1:majf_avg#$FullGreen:Major",
2605 'GPRINT:majf_min:MIN:%5.1lf%s Min,',
2606 'GPRINT:majf_avg:AVERAGE:%5.1lf%s Avg,',
2607 'GPRINT:majf_max:MAX:%5.1lf%s Max,',
2608 'GPRINT:majf_avg:LAST:%5.1lf%s Last\l',
2609 "LINE1:minf_avg#$FullBlue:Minor",
2610 'GPRINT:minf_min:MIN:%5.1lf%s Min,',
2611 'GPRINT:minf_avg:AVERAGE:%5.1lf%s Avg,',
2612 'GPRINT:minf_max:MAX:%5.1lf%s Max,',
2613 'GPRINT:minf_avg:LAST:%5.1lf%s Last\l'
2616 "DEF:rpag_avg={file}:in:AVERAGE",
2617 "DEF:rpag_min={file}:in:MIN",
2618 "DEF:rpag_max={file}:in:MAX",
2619 "DEF:wpag_avg={file}:out:AVERAGE",
2620 "DEF:wpag_min={file}:out:MIN",
2621 "DEF:wpag_max={file}:out:MAX",
2622 'CDEF:overlap=wpag_avg,rpag_avg,GT,rpag_avg,wpag_avg,IF',
2623 "AREA:wpag_avg#$HalfGreen",
2624 "AREA:rpag_avg#$HalfBlue",
2625 "AREA:overlap#$HalfBlueGreen",
2626 "LINE1:wpag_avg#$FullGreen:OUT",
2627 'GPRINT:wpag_min:MIN:%5.1lf%s Min,',
2628 'GPRINT:wpag_avg:AVERAGE:%5.1lf%s Avg,',
2629 'GPRINT:wpag_max:MAX:%5.1lf%s Max,',
2630 'GPRINT:wpag_avg:LAST:%5.1lf%s Last\l',
2631 "LINE1:rpag_avg#$FullBlue:IN ",
2632 'GPRINT:rpag_min:MIN:%5.1lf%s Min,',
2633 'GPRINT:rpag_avg:AVERAGE:%5.1lf%s Avg,',
2634 'GPRINT:rpag_max:MAX:%5.1lf%s Max,',
2635 'GPRINT:rpag_avg:LAST:%5.1lf%s Last\l'
2637 vmpage_action => ['-v', 'Pages',
2638 'DEF:avg={file}:value:AVERAGE',
2639 'DEF:min={file}:value:MIN',
2640 'DEF:max={file}:value:MAX',
2641 "AREA:max#$HalfBlue",
2643 "LINE1:avg#$FullBlue:Number",
2644 'GPRINT:min:MIN:%4.1lf Min,',
2645 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
2646 'GPRINT:max:MAX:%4.1lf Max,',
2647 'GPRINT:avg:LAST:%4.1lf Last\l'
2649 virt_cpu_total => ['-v', 'Milliseconds',
2650 'DEF:avg_raw={file}:ns:AVERAGE',
2651 'DEF:min_raw={file}:ns:MIN',
2652 'DEF:max_raw={file}:ns:MAX',
2653 'CDEF:avg=avg_raw,1000000,/',
2654 'CDEF:min=min_raw,1000000,/',
2655 'CDEF:max=max_raw,1000000,/',
2656 "AREA:avg#$HalfBlue",
2657 "LINE1:avg#$FullBlue:CPU time",
2658 'GPRINT:min:MIN:%4.1lf Min,',
2659 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
2660 'GPRINT:max:MAX:%4.1lf Max,',
2661 'GPRINT:avg:LAST:%4.1lf Last\l'
2664 $GraphDefs->{'if_multicast'} = $GraphDefs->{'ipt_packets'};
2665 $GraphDefs->{'if_tx_errors'} = $GraphDefs->{'if_rx_errors'};
2666 $GraphDefs->{'dns_qtype'} = $GraphDefs->{'dns_opcode'};
2667 $GraphDefs->{'dns_rcode'} = $GraphDefs->{'dns_opcode'};
2668 $GraphDefs->{'vmpage_io-memory'} = $GraphDefs->{'vmpage_io'};
2669 $GraphDefs->{'vmpage_io-swap'} = $GraphDefs->{'vmpage_io'};
2670 $GraphDefs->{'virt_cpu_total'} = $GraphDefs->{'virt_cpu_total'};
2672 $MetaGraphDefs->{'cpu'} = \&meta_graph_cpu;
2673 $MetaGraphDefs->{'dns_qtype'} = \&meta_graph_dns;
2674 $MetaGraphDefs->{'dns_rcode'} = \&meta_graph_dns;
2675 $MetaGraphDefs->{'if_rx_errors'} = \&meta_graph_if_rx_errors;
2676 $MetaGraphDefs->{'if_tx_errors'} = \&meta_graph_if_rx_errors;
2677 $MetaGraphDefs->{'memory'} = \&meta_graph_memory;
2678 $MetaGraphDefs->{'nfs_procedure'} = \&meta_graph_nfs_procedure;
2679 $MetaGraphDefs->{'ps_state'} = \&meta_graph_ps_state;
2680 $MetaGraphDefs->{'swap'} = \&meta_graph_swap;
2681 $MetaGraphDefs->{'mysql_commands'} = \&meta_graph_mysql_commands;
2682 $MetaGraphDefs->{'mysql_handler'} = \&meta_graph_mysql_commands;
2683 $MetaGraphDefs->{'tcp_connections'} = \&meta_graph_tcp_connections;
2684 $MetaGraphDefs->{'vmpage_number'} = \&meta_graph_vmpage_number;
2685 $MetaGraphDefs->{'vmpage_action'} = \&meta_graph_vmpage_action;
2686 } # load_graph_definitions
2688 sub meta_graph_generic_stack
2690 confess ("Wrong number of arguments") if (@_ != 2);
2693 my $sources = shift;
2696 my $timespan_str = _get_param_timespan ();
2697 my $timespan_int = (-1) * $ValidTimespan->{$timespan_str};
2699 $opts->{'title'} ||= 'Unknown title';
2700 $opts->{'rrd_opts'} ||= [];
2701 $opts->{'colors'} ||= {};
2703 my @cmd = ('-', '-a', 'PNG', '-s', $timespan_int,
2704 '-t', $opts->{'title'} || 'Unknown title',
2705 @RRDDefaultArgs, @{$opts->{'rrd_opts'}});
2707 my $max_inst_name = 0;
2710 for ($i = 0; $i < @$sources; $i++)
2712 my $tmp = $sources->[$i]->{'name'};
2713 $tmp =~ tr/A-Za-z0-9\-_/_/c;
2714 $vnames[$i] = $i . $tmp;
2717 for ($i = 0; $i < @$sources; $i++)
2719 my $inst_data = $sources->[$i];
2720 my $inst_name = $inst_data->{'name'} || confess;
2721 my $file = $inst_data->{'file'} || confess;
2722 my $vname = $vnames[$i];
2724 if (length ($inst_name) > $max_inst_name)
2726 $max_inst_name = length ($inst_name);
2729 confess ("No such file: $file") if (!-e $file);
2732 qq#DEF:${vname}_min=$file:value:MIN#,
2733 qq#DEF:${vname}_avg=$file:value:AVERAGE#,
2734 qq#DEF:${vname}_max=$file:value:MAX#,
2735 qq#CDEF:${vname}_nnl=${vname}_avg,UN,0,${vname}_avg,IF#);
2739 my $vname = $vnames[@vnames - 1];
2741 push (@cmd, qq#CDEF:${vname}_stk=${vname}_nnl#);
2743 for (my $i = 1; $i < @$sources; $i++)
2745 my $vname0 = $vnames[@vnames - ($i + 1)];
2746 my $vname1 = $vnames[@vnames - $i];
2748 push (@cmd, qq#CDEF:${vname0}_stk=${vname0}_nnl,${vname1}_stk,+#);
2751 for (my $i = 0; $i < @$sources; $i++)
2753 my $inst_data = $sources->[$i];
2754 my $inst_name = $inst_data->{'name'};
2756 my $vname = $vnames[$i];
2758 my $legend = sprintf ('%-*s', $max_inst_name, $inst_name);
2763 my $number_format = $opts->{'number_format'} || '%6.1lf';
2765 if (exists ($opts->{'colors'}{$inst_name}))
2767 $line_color = $opts->{'colors'}{$inst_name};
2768 $area_color = _string_to_color ($line_color);
2772 $area_color = _get_random_color ();
2773 $line_color = _color_to_string ($area_color);
2775 $area_color = _color_to_string (_get_faded_color ($area_color));
2777 push (@cmd, qq(AREA:${vname}_stk#$area_color),
2778 qq(LINE1:${vname}_stk#$line_color:$legend),
2779 qq(GPRINT:${vname}_min:MIN:$number_format Min,),
2780 qq(GPRINT:${vname}_avg:AVERAGE:$number_format Avg,),
2781 qq(GPRINT:${vname}_max:MAX:$number_format Max,),
2782 qq(GPRINT:${vname}_avg:LAST:$number_format Last\\l),
2787 if (my $errmsg = RRDs::error ())
2789 confess ("RRDs::graph: $errmsg");
2791 } # meta_graph_generic_stack
2795 confess ("Wrong number of arguments") if (@_ != 5);
2799 my $plugin_instance = shift;
2801 my $type_instances = shift;
2806 $opts->{'title'} = "$host/$plugin"
2807 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
2809 $opts->{'rrd_opts'} = ['-v', 'Percent'];
2819 'system' => 'ff0000',
2820 'softirq' => 'ff00ff',
2821 'interrupt' => 'a000a0',
2825 _custom_sort_arrayref ($type_instances,
2826 [qw(idle nice user wait system softirq interrupt steal)]);
2828 for (@$type_instances)
2832 my $title = $opts->{'title'};
2836 if (-e "$_/$title-$inst.rrd")
2838 $file = "$_/$title-$inst.rrd";
2842 confess ("No file found for $title") if ($file eq '');
2850 } # for (@$type_instances)
2852 return (meta_graph_generic_stack ($opts, $sources));
2857 confess ("Wrong number of arguments") if (@_ != 5);
2861 my $plugin_instance = shift;
2863 my $type_instances = shift;
2868 $opts->{'title'} = "$host/$plugin"
2869 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
2871 $opts->{'rrd_opts'} = ['-v', 'Queries/s'];
2875 @$type_instances = sort @$type_instances;
2877 $opts->{'colors'} = _get_n_colors ($type_instances);
2879 for (@$type_instances)
2883 my $title = $opts->{'title'};
2887 if (-e "$_/$title-$inst.rrd")
2889 $file = "$_/$title-$inst.rrd";
2893 confess ("No file found for $title") if ($file eq '');
2901 } # for (@$type_instances)
2903 return (meta_graph_generic_stack ($opts, $sources));
2906 sub meta_graph_memory
2908 confess ("Wrong number of arguments") if (@_ != 5);
2912 my $plugin_instance = shift;
2914 my $type_instances = shift;
2919 $opts->{'title'} = "$host/$plugin"
2920 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
2921 $opts->{'number_format'} = '%5.1lf%s';
2923 $opts->{'rrd_opts'} = ['-b', '1024', '-v', 'Bytes'];
2930 'cached' => '0000ff',
2931 'buffered' => 'ffb000',
2935 _custom_sort_arrayref ($type_instances,
2936 [qw(free cached buffered used)]);
2938 for (@$type_instances)
2942 my $title = $opts->{'title'};
2946 if (-e "$_/$title-$inst.rrd")
2948 $file = "$_/$title-$inst.rrd";
2952 confess ("No file found for $title") if ($file eq '');
2960 } # for (@$type_instances)
2962 return (meta_graph_generic_stack ($opts, $sources));
2963 } # meta_graph_memory
2965 sub meta_graph_if_rx_errors
2967 confess ("Wrong number of arguments") if (@_ != 5);
2971 my $plugin_instance = shift;
2973 my $type_instances = shift;
2978 $opts->{'title'} = "$host/$plugin"
2979 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
2980 $opts->{'number_format'} = '%5.2lf';
2981 $opts->{'rrd_opts'} = ['-v', 'Errors/s'];
2985 for (sort @$type_instances)
2989 my $title = $opts->{'title'};
2993 if (-e "$_/$title-$inst.rrd")
2995 $file = "$_/$title-$inst.rrd";
2999 confess ("No file found for $title") if ($file eq '');
3007 } # for (@$type_instances)
3009 return (meta_graph_generic_stack ($opts, $sources));
3010 } # meta_graph_if_rx_errors
3012 sub meta_graph_mysql_commands
3014 confess ("Wrong number of arguments") if (@_ != 5);
3018 my $plugin_instance = shift;
3020 my $type_instances = shift;
3025 $opts->{'title'} = "$host/$plugin"
3026 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3027 $opts->{'number_format'} = '%5.2lf';
3031 for (sort @$type_instances)
3035 my $title = $opts->{'title'};
3039 if (-e "$_/$title-$inst.rrd")
3041 $file = "$_/$title-$inst.rrd";
3045 confess ("No file found for $title") if ($file eq '');
3053 } # for (@$type_instances)
3055 return (meta_graph_generic_stack ($opts, $sources));
3056 } # meta_graph_mysql_commands
3058 sub meta_graph_nfs_procedure
3060 confess ("Wrong number of arguments") if (@_ != 5);
3064 my $plugin_instance = shift;
3066 my $type_instances = shift;
3071 $opts->{'title'} = "$host/$plugin"
3072 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3073 $opts->{'number_format'} = '%5.1lf%s';
3077 for (sort @$type_instances)
3081 my $title = $opts->{'title'};
3085 if (-e "$_/$title-$inst.rrd")
3087 $file = "$_/$title-$inst.rrd";
3091 confess ("No file found for $title") if ($file eq '');
3099 } # for (@$type_instances)
3101 return (meta_graph_generic_stack ($opts, $sources));
3102 } # meta_graph_nfs_procedure
3104 sub meta_graph_ps_state
3106 confess ("Wrong number of arguments") if (@_ != 5);
3110 my $plugin_instance = shift;
3112 my $type_instances = shift;
3117 $opts->{'title'} = "$host/$plugin"
3118 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3119 $opts->{'rrd_opts'} = ['-v', 'Processes'];
3125 'Running' => '00e000',
3126 'Sleeping' => '0000ff',
3127 'Paging' => 'ffb000',
3128 'Zombies' => 'ff0000',
3129 'Blocked' => 'ff00ff',
3130 'Stopped' => 'a000a0'
3133 _custom_sort_arrayref ($type_instances,
3134 [qw(paging blocked zombies stopped running sleeping)]);
3136 for (@$type_instances)
3140 my $title = $opts->{'title'};
3144 if (-e "$_/$title-$inst.rrd")
3146 $file = "$_/$title-$inst.rrd";
3150 confess ("No file found for $title") if ($file eq '');
3154 name => ucfirst ($inst),
3158 } # for (@$type_instances)
3160 return (meta_graph_generic_stack ($opts, $sources));
3161 } # meta_graph_ps_state
3165 confess ("Wrong number of arguments") if (@_ != 5);
3169 my $plugin_instance = shift;
3171 my $type_instances = shift;
3176 $opts->{'title'} = "$host/$plugin"
3177 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3178 $opts->{'number_format'} = '%5.1lf%s';
3179 $opts->{'rrd_opts'} = ['-v', 'Bytes'];
3186 'Cached' => '0000ff',
3187 'Reserved' => 'ffb000',
3191 _custom_sort_arrayref ($type_instances,
3192 [qw(free cached reserved used)]);
3194 for (@$type_instances)
3198 my $title = $opts->{'title'};
3202 if (-e "$_/$title-$inst.rrd")
3204 $file = "$_/$title-$inst.rrd";
3208 confess ("No file found for $title") if ($file eq '');
3212 name => ucfirst ($inst),
3216 } # for (@$type_instances)
3218 return (meta_graph_generic_stack ($opts, $sources));
3221 sub meta_graph_tcp_connections
3223 confess ("Wrong number of arguments") if (@_ != 5);
3227 my $plugin_instance = shift;
3229 my $type_instances = shift;
3234 $opts->{'title'} = "$host/$plugin"
3235 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3236 $opts->{'number_format'} = '%6.2lf';
3238 $opts->{'rrd_opts'} = ['-v', 'Connections'];
3244 ESTABLISHED => '00e000',
3245 SYN_SENT => '00e0ff',
3246 SYN_RECV => '00e0a0',
3247 FIN_WAIT1 => 'f000f0',
3248 FIN_WAIT2 => 'f000a0',
3249 TIME_WAIT => 'ffb000',
3251 CLOSE_WAIT => '0000a0',
3252 LAST_ACK => '000080',
3257 _custom_sort_arrayref ($type_instances,
3258 [reverse qw(ESTABLISHED SYN_SENT SYN_RECV FIN_WAIT1 FIN_WAIT2 TIME_WAIT CLOSE
3259 CLOSE_WAIT LAST_ACK CLOSING LISTEN)]);
3261 for (@$type_instances)
3265 my $title = $opts->{'title'};
3269 if (-e "$_/$title-$inst.rrd")
3271 $file = "$_/$title-$inst.rrd";
3275 confess ("No file found for $title") if ($file eq '');
3283 } # for (@$type_instances)
3285 return (meta_graph_generic_stack ($opts, $sources));
3286 } # meta_graph_tcp_connections
3288 sub meta_graph_vmpage_number
3290 confess ("Wrong number of arguments") if (@_ != 5);
3294 my $plugin_instance = shift;
3296 my $type_instances = shift;
3301 $opts->{'title'} = "$host/$plugin"
3302 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3303 $opts->{'number_format'} = '%6.2lf';
3305 $opts->{'rrd_opts'} = ['-v', 'Pages'];
3311 anon_pages => '00e000',
3314 file_pages => 'f000f0',
3316 page_table_pages => 'ffb000',
3318 unstable => '0000a0',
3319 writeback => 'ff0000',
3322 _custom_sort_arrayref ($type_instances,
3323 [reverse qw(anon_pages bounce dirty file_pages mapped page_table_pages slab unstable writeback)]);
3325 for (@$type_instances)
3329 my $title = $opts->{'title'};
3333 if (-e "$_/$title-$inst.rrd")
3335 $file = "$_/$title-$inst.rrd";
3339 confess ("No file found for $title") if ($file eq '');
3347 } # for (@$type_instances)
3349 return (meta_graph_generic_stack ($opts, $sources));
3350 } # meta_graph_vmpage_number
3352 sub meta_graph_vmpage_action
3354 confess ("Wrong number of arguments") if (@_ != 5);
3358 my $plugin_instance = shift;
3360 my $type_instances = shift;
3365 $opts->{'title'} = "$host/$plugin"
3366 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3367 $opts->{'number_format'} = '%6.2lf';
3369 $opts->{'rrd_opts'} = ['-v', 'Pages'];
3375 activate => '00e000',
3376 deactivate => '00e0ff',
3380 scan_direct => 'ffb000',
3381 scan_kswapd => '0000f0',
3385 _custom_sort_arrayref ($type_instances,
3386 [reverse qw(activate deactivate alloc free refill scan_direct scan_kswapd steal)]);
3388 for (@$type_instances)
3392 my $title = $opts->{'title'};
3396 if (-e "$_/$title-$inst.rrd")
3398 $file = "$_/$title-$inst.rrd";
3402 confess ("No file found for $title") if ($file eq '');
3410 } # for (@$type_instances)
3412 return (meta_graph_generic_stack ($opts, $sources));
3413 } # meta_graph_vmpage_action
3414 # vim: shiftwidth=2:softtabstop=2:tabstop=8