2 # Copyright (c) 2006-2010 Florian Forster <octo at collectd.org>
3 # Copyright (c) 2006-2008 Sebastian Harl <sh at tokkee.org>
4 # Copyright (c) 2008 Mirko Buffoni <briareos at eswat.org>
6 # Permission is hereby granted, free of charge, to any person obtaining a copy
7 # of this software and associated documentation files (the "Software"), to deal
8 # in the Software without restriction, including without limitation the rights
9 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 # copies of the Software, and to permit persons to whom the Software is
11 # furnished to do so, subject to the following conditions:
13 # The above copyright notice and this permission notice shall be included in
14 # all copies or substantial portions of the Software.
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27 use Carp (qw(cluck confess));
29 use CGI::Carp ('fatalsToBrowser');
30 use HTML::Entities ('encode_entities');
31 use URI::Escape ('uri_escape');
35 our $Config = "/etc/collection.conf";
37 our @DontShowTypes = ();
49 our @RRDDefaultArgs = ('-w', '400');
54 our $MetaGraphDefs = {};
55 load_graph_definitions ();
57 for (qw(action host plugin plugin_instance type type_instance timespan))
59 $Args->{$_} = param ($_);
67 open ($fh, "< $Config") or confess ("open ($Config): $!");
68 while (my $line = <$fh>)
72 next if ($line =~ m/^\s*#/);
73 next if ($line =~ m/^\s*$/);
78 if ($line =~ m/^([A-Za-z]+):\s*"((?:[^"\\]+|\\.)*)"$/)
80 $key = lc ($1); $value = $2;
81 $value =~ s/\\(.)/$1/g;
83 elsif ($line =~ m/([A-Za-z]+):\s*([0-9]+)$/)
85 $key = lc ($1); $value = 0 + $2;
89 print STDERR "Cannot parse line: $line\n";
93 if ($key eq 'datadir')
96 push (@DataDirs, $value);
98 elsif ($key eq 'libdir')
103 elsif ($key eq 'dontshowtype')
105 push (@DontShowTypes, $value);
109 print STDERR "Unknown key: $key\n";
117 if ($Args->{'action'} && ($Args->{'action'} =~ m/^(overview|show_host|show_plugin|show_type|show_graph)$/))
119 $Args->{'action'} = $1;
123 $Args->{'action'} = 'overview';
126 if ($Args->{'host'} && ($Args->{'host'} =~ m#/#))
128 delete ($Args->{'host'});
131 if ($Args->{'plugin'} && ($Args->{'plugin'} =~ m#/#))
133 delete ($Args->{'plugin'});
136 if ($Args->{'type'} && ($Args->{'type'} =~ m#/#))
138 delete ($Args->{'type'});
141 if (!$Args->{'plugin'} || ($Args->{'plugin_instance'}
142 && ($Args->{'plugin_instance'} =~ m#/#)))
144 delete ($Args->{'plugin_instance'});
147 if (!$Args->{'type'} || ($Args->{'type_instance'}
148 && ($Args->{'type_instance'} =~ m#/#)))
150 delete ($Args->{'type_instance'});
153 if (defined ($Args->{'timespan'})
154 && ($Args->{'timespan'} =~ m/^(hour|day|week|month|year)$/))
156 $Args->{'timespan'} = $1;
160 $Args->{'timespan'} = 'day';
168 if (defined ($hosts))
170 return (keys %$hosts);
175 for (my $i = 0; $i < @DataDirs; $i++)
180 opendir ($dh, $DataDirs[$i]) or next;
181 @tmp = grep { ($_ !~ m/^\./) && (-d $DataDirs[$i] . '/' . $_) } (readdir ($dh));
184 $hosts->{$_} = 1 for (@tmp);
187 return (keys %$hosts);
193 my %all_hosts = map { $_ => 1 } (_find_hosts ());
194 my @selected_hosts = ();
197 if (defined ($all_hosts{$_}))
199 push (@selected_hosts, "$_");
202 return (@selected_hosts);
205 sub _get_param_timespan
207 my $timespan = param ('timespan');
210 $timespan = lc ($timespan);
212 if (!defined ($ValidTimespan->{$timespan}))
218 } # _get_param_timespan
225 for (my $i = 0; $i < @DataDirs; $i++)
227 my $dir = $DataDirs[$i] . "/$host";
231 opendir ($dh, $dir) or next;
232 @tmp = grep { ($_ !~ m/^\./) && (-d "$dir/$_") } (readdir ($dh));
237 my ($plugin, $instance) = split (m/-/, $_, 2);
238 $plugins{$plugin} = [] if (!exists $plugins{$plugin});
239 push (@{$plugins{$plugin}}, $instance);
250 my $plugin_instance = shift;
253 for (my $i = 0; $i < @DataDirs; $i++)
255 my $dir = $DataDirs[$i] . "/$host/$plugin" . (defined ($plugin_instance) ? "-$plugin_instance" : '');
259 opendir ($dh, $dir) or next;
260 @tmp = grep { ($_ !~ m/^\./) && ($_ =~ m/\.rrd$/i) && (-f "$dir/$_") } (readdir ($dh));
266 $name =~ s/\.rrd$//i;
267 my ($type, $instance) = split (m/-/, $name, 2);
268 if (grep { $_ eq $type } @DontShowTypes) { next; }
269 $types{$type} = [] if (!$types{$type});
270 push (@{$types{$type}}, $instance) if (defined ($instance));
277 sub _find_files_for_host
282 my %plugins = _find_plugins ($host);
286 my $plugin_instances = $plugins{$plugin};
288 if (!$plugin_instances || !@$plugin_instances)
290 $plugin_instances = ['-'];
293 $ret->{$plugin} = {};
295 for (@$plugin_instances)
297 my $plugin_instance = defined ($_) ? $_ : '-';
298 my %types = _find_types ($host, $plugin,
299 ($plugin_instance ne '-')
303 $ret->{$plugin}{$plugin_instance} = {};
308 my $type_instances = $types{$type};
310 $ret->{$plugin}{$plugin_instance}{$type} = {};
312 for (@$type_instances)
314 $ret->{$plugin}{$plugin_instance}{$type}{$_} = 1;
317 if (!@$type_instances)
319 $ret->{$plugin}{$plugin_instance}{$type}{'-'} = 1;
321 } # for (keys %types)
322 } # for (@$plugin_instances)
323 } # for (keys %plugins)
326 } # _find_files_for_host
328 sub _find_files_for_hosts
331 my $all_plugins = {};
333 for (my $i = 0; $i < @hosts; $i++)
335 my $tmp = _find_files_for_host ($hosts[$i]);
336 _files_union ($all_plugins, $tmp);
339 return ($all_plugins);
340 } # _find_files_for_hosts
350 $dest->{$plugin} ||= {};
352 for (keys %{$src->{$plugin}})
355 $dest->{$plugin}{$pinst} ||= {};
357 for (keys %{$src->{$plugin}{$pinst}})
360 $dest->{$plugin}{$pinst}{$type} ||= {};
362 for (keys %{$src->{$plugin}{$pinst}{$type}})
365 $dest->{$plugin}{$pinst}{$type}{$tinst} = 1;
372 sub _files_plugin_inst_count
379 if (exists ($MetaGraphDefs->{$_}))
385 $i = $i + keys %{$src->{$_}};
389 } # _files_plugin_count
393 my @hosts = _find_hosts ();
394 @hosts = sort (@hosts);
397 for (my $i = 0; $i < @hosts; $i++)
399 my $host_html = encode_entities ($hosts[$i]);
400 my $host_url = uri_escape ($hosts[$i]);
402 print qq( <li><a href="${\script_name ()}?action=show_host;host=$host_url">$host_html</a></li>\n);
410 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])/)
412 return ([hex ($1) / 255.0, hex ($2) / 255.0, hex ($3) / 255.0]);
419 confess ("Wrong number of arguments") if (@_ != 1);
420 return (sprintf ('%02hx%02hx%02hx', map { int (255.0 * $_) } @{$_[0]}));
423 sub _get_random_color
425 my ($r, $g, $b) = (rand (), rand ());
431 $min = 1.0 - ($r + $g);
435 $max = 2.0 - ($r + $g);
438 $b = $min + (rand () * ($max - $min));
440 return ([$r, $g, $b]);
441 } # _get_random_color
445 my $instances = shift;
446 my $num = scalar @$instances;
449 for (my $i = 0; $i < $num; $i++)
451 my $pos = 6 * $i / $num;
494 $color = sprintf ("%02x%02x%02x", $red, $green, $blue);
495 $ret->{$instances->[$i]} = $color;
506 my $ret = [undef, undef, undef];
508 $opts{'background'} ||= [1.0, 1.0, 1.0];
509 $opts{'alpha'} ||= 0.25;
511 if (!ref ($opts{'background'}))
513 $opts{'background'} = _string_to_color ($opts{'background'})
514 or confess ("Cannot parse background color " . $opts{'background'});
516 $bg = $opts{'background'};
518 for (my $i = 0; $i < 3; $i++)
520 $ret->[$i] = ($opts{'alpha'} * $fg->[$i])
521 + ((1.0 - $opts{'alpha'}) * $bg->[$i]);
527 sub _custom_sort_arrayref
529 my $array_ref = shift;
530 my $array_sort = shift;
532 my %elements = map { $_ => 1 } (@$array_ref);
533 splice (@$array_ref, 0);
537 next if (!exists ($elements{$_}));
538 push (@$array_ref, $_);
539 delete ($elements{$_});
541 push (@$array_ref, sort (keys %elements));
542 } # _custom_sort_arrayref
546 my @hosts = _get_param_host ();
547 @hosts = sort (@hosts);
549 my $timespan = _get_param_timespan ();
550 my $all_plugins = _find_files_for_hosts (@hosts);
552 my $url_prefix = script_name () . '?action=show_plugin'
553 . join ('', map { ';host=' . uri_escape ($_) } (@hosts))
554 . ';timespan=' . uri_escape ($timespan);
556 print qq( <div><a href="${\script_name ()}?action=overview">Back to list of hosts</a></div>\n);
558 print " <p>Available plugins:</p>\n"
560 for (sort (keys %$all_plugins))
563 my $plugin_html = encode_entities ($plugin);
564 my $url_plugin = $url_prefix . ';plugin=' . uri_escape ($plugin);
565 print qq( <li><a href="$url_plugin">$plugin_html</a></li>\n);
570 sub action_show_plugin
572 my @hosts = _get_param_host ();
574 my $plugin_instance = shift;
575 my $timespan = _get_param_timespan ();
577 my $hosts_url = join (';', map { 'host=' . uri_escape ($_) } (@hosts));
578 my $url_prefix = script_name () . "?$hosts_url";
580 my $all_plugins = {};
581 my $plugins_per_host = {};
582 my $selected_plugins = {};
584 for (my $i = 0; $i < @hosts; $i++)
586 $plugins_per_host->{$hosts[$i]} = _find_files_for_host ($hosts[$i]);
587 _files_union ($all_plugins, $plugins_per_host->{$hosts[$i]});
590 for (param ('plugin'))
592 if (defined ($all_plugins->{$_}))
594 $selected_plugins->{$_} = 1;
598 print qq( <div><a href="${\script_name ()}?action=show_host;$hosts_url">Back to list of plugins</a></div>\n);
602 <table class="graphs">
608 print "\t<th>", encode_entities ($_), "</th>\n";
612 for (sort (keys %$selected_plugins))
615 my $plugin_html = encode_entities ($plugin);
616 my $plugin_url = "$url_prefix;plugin=" . uri_escape ($plugin);
617 my $all_pinst = $all_plugins->{$plugin};
619 for (sort (keys %$all_pinst))
623 my $pinst_url = $plugin_url;
627 $pinst_html = encode_entities ($pinst);
628 $pinst_url .= ';plugin_instance=' . uri_escape ($pinst);
631 my $files_printed = 0;
632 my $files_num = _files_plugin_inst_count ($all_pinst->{$pinst});
637 my $rowspan = ($files_num == 1) ? '' : qq( rowspan="$files_num");
639 for (sort (keys %{$all_plugins->{$plugin}{$pinst}}))
642 my $type_html = encode_entities ($type);
643 my $type_url = "$pinst_url;type=" . uri_escape ($type);
645 if ($files_printed == 0)
647 my $title = $plugin_html;
650 $title .= " ($pinst_html)";
653 print "\t<td$rowspan>$title</td>\n";
656 if (exists ($MetaGraphDefs->{$type}))
658 my $graph_url = script_name () . '?action=show_graph'
659 . ';plugin=' . uri_escape ($plugin)
660 . ';type=' . uri_escape ($type)
661 . ';timespan=' . uri_escape ($timespan);
664 $graph_url .= ';plugin_instance=' . uri_escape ($pinst);
667 if ($files_printed != 0)
675 my $host_graph_url = $graph_url . ';host=' . uri_escape ($host);
678 if (exists $plugins_per_host->{$host}{$plugin}{$pinst}{$type})
680 print qq(<img src="$host_graph_url" />);
681 #print encode_entities (qq(<img src="${\script_name ()}?action=show_graph;host=$host_esc;$param_plugin;$param_type;timespan=$timespan" />));
684 } # for (my $k = 0; $k < @hosts; $k++)
690 } # if (exists ($MetaGraphDefs->{$type}))
692 for (sort (keys %{$all_plugins->{$plugin}{$pinst}{$type}}))
695 my $tinst_esc = encode_entities ($tinst);
696 my $graph_url = script_name () . '?action=show_graph'
697 . ';plugin=' . uri_escape ($plugin)
698 . ';type=' . uri_escape ($type)
699 . ';timespan=' . uri_escape ($timespan);
702 $graph_url .= ';plugin_instance=' . uri_escape ($pinst);
706 $graph_url .= ';type_instance=' . uri_escape ($tinst);
709 if ($files_printed != 0)
714 for (my $k = 0; $k < @hosts; $k++)
716 my $host = $hosts[$k];
717 my $host_graph_url = $graph_url . ';host=' . uri_escape ($host);
720 if ($plugins_per_host->{$host}{$plugin}{$pinst}{$type}{$tinst})
722 print qq(<img src="$host_graph_url" />);
723 #print encode_entities (qq(<img src="${\script_name ()}?action=show_graph;host=$host_esc;$param_plugin;$param_type;timespan=$timespan" />));
726 } # for (my $k = 0; $k < @hosts; $k++)
736 } # action_show_plugin
742 my $plugin_instance = shift;
744 my $type_instance = shift;
746 my $host_url = uri_escape ($host);
747 my $plugin_url = uri_escape ($plugin);
748 my $plugin_html = encode_entities ($plugin);
749 my $plugin_instance_url = defined ($plugin_instance) ? uri_escape ($plugin_instance) : undef;
750 my $type_url = uri_escape ($type);
751 my $type_instance_url = defined ($type_instance) ? uri_escape ($type_instance) : undef;
753 my $url_prefix = script_name () . "?action=show_plugin;host=$host_url;plugin=$plugin_url";
754 $url_prefix .= ";plugin_instance=$plugin_instance_url" if (defined ($plugin_instance));
756 print qq( <div><a href="$url_prefix">Back to plugin "$plugin_html"</a></div>\n);
758 $url_prefix = script_name () . "?action=show_graph;host=$host_url;plugin=$plugin_url";
759 $url_prefix .= ";plugin_instance=$plugin_instance_url" if (defined ($plugin_instance));
760 $url_prefix .= ";type=$type_url";
761 $url_prefix .= ";type_instance=$type_instance_url" if (defined ($type_instance));
763 for (qw(hour day week month year))
767 print qq# <div><img src="$url_prefix;timespan=$timespan" /></div>\n#;
771 sub action_show_graph
775 my $plugin_instance = shift;
777 my $type_instance = shift;
781 my %times = (hour => -3600, day => -86400, week => 7 * -86400, month => 31 * -86400, year => 366 * -86400);
782 my $start_time = $times{$Args->{'timespan'}} || -86400;
784 #print STDERR Data::Dumper->Dump ([$Args], ['Args']);
787 if (exists ($MetaGraphDefs->{$type}))
789 my %types = _find_types ($host, $plugin, $plugin_instance);
790 return $MetaGraphDefs->{$type}->($host, $plugin, $plugin_instance, $type, $types{$type});
793 return if (!defined ($GraphDefs->{$type}));
794 @rrd_args = @{$GraphDefs->{$type}};
796 $title = "$host/$plugin" . (defined ($plugin_instance) ? "-$plugin_instance" : '')
797 . "/$type" . (defined ($type_instance) ? "-$type_instance" : '');
799 for (my $i = 0; $i < @DataDirs; $i++)
801 my $file = $DataDirs[$i] . "/$title.rrd";
805 s/{file}/$file/ for (@rrd_args);
807 RRDs::graph ('-', '-a', 'PNG', '-s', $start_time, '-t', $title, @RRDDefaultArgs, @rrd_args);
808 if (my $err = RRDs::error ())
810 die ("RRDs::graph: $err");
813 } # action_show_graph
817 my @hosts = _find_hosts ();
818 @hosts = sort (@hosts);
820 my %selected_hosts = map { $_ => 1 } (_get_param_host ());
821 my $timespan_selected = _get_param_timespan ();
824 <form action="${\script_name ()}" method="get">
826 <legend>Selector</legend>
827 <select name="host" multiple="multiple" size="10">
829 for (my $i = 0; $i < @hosts; $i++)
831 my $host = encode_entities ($hosts[$i]);
832 my $selected = defined ($selected_hosts{$hosts[$i]}) ? ' selected="selected"' : '';
833 print qq(\t <option value="$host"$selected>$host</option>\n);
835 print "\t</select>\n";
837 if (keys %selected_hosts)
839 my $all_plugins = _find_files_for_hosts (keys %selected_hosts);
840 my %selected_plugins = map { $_ => 1 } (param ('plugin'));
842 print qq(\t<select name="plugin" multiple="multiple" size="10">\n);
843 for (sort (keys %$all_plugins))
846 my $plugin_html = encode_entities ($plugin);
847 my $selected = (defined ($selected_plugins{$plugin})
848 ? ' selected="selected"' : '');
849 print qq(\t <option value="$plugin_html"$selected>$plugin</option>\n);
852 } # if (keys %selected_hosts)
854 print qq(\t<select name="timespan">\n);
855 for (qw(Hour Day Week Month Year))
857 my $timespan_uc = $_;
858 my $timespan_lc = lc ($_);
859 my $selected = ($timespan_selected eq $timespan_lc)
860 ? ' selected="selected"' : '';
861 print qq(\t <option value="$timespan_lc"$selected>$timespan_uc</option>\n);
865 <input type="submit" name="button" value="Ok" />
874 Content-Type: application/xhtml+xml; charset=utf-8
875 Cache-Control: no-cache
877 <?xml version="1.0" encoding="utf-8"?>
878 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
879 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
881 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
883 <title>collection.cgi, Version 2</title>
884 <style type="text/css">
891 border-collapse: collapse;
896 border: 1px solid black;
920 if (defined ($Args->{'host'})
921 && defined ($Args->{'plugin'})
922 && defined ($Args->{'type'})
923 && ($Args->{'action'} eq 'show_graph'))
926 print STDOUT header (-Content_Type => 'image/png');
927 action_show_graph ($Args->{'host'},
928 $Args->{'plugin'}, $Args->{'plugin_instance'},
929 $Args->{'type'}, $Args->{'type_instance'});
935 if (!$Args->{'host'})
939 elsif (!$Args->{'plugin'})
941 action_show_host ($Args->{'host'});
943 elsif (!$Args->{'type'})
945 action_show_plugin ($Args->{'plugin'}, $Args->{'plugin_instance'});
949 action_show_type ($Args->{'host'},
950 $Args->{'plugin'}, $Args->{'plugin_instance'},
951 $Args->{'type'}, $Args->{'type_instance'});
959 sub load_graph_definitions
961 my $Canvas = 'FFFFFF';
963 my $FullRed = 'FF0000';
964 my $FullGreen = '00E000';
965 my $FullBlue = '0000FF';
966 my $FullYellow = 'F0A000';
967 my $FullCyan = '00A0FF';
968 my $FullMagenta= 'A000FF';
970 my $HalfRed = 'F7B7B7';
971 my $HalfGreen = 'B7EFB7';
972 my $HalfBlue = 'B7B7F7';
973 my $HalfYellow = 'F3DFB7';
974 my $HalfCyan = 'B7DFF7';
975 my $HalfMagenta= 'DFB7F7';
977 my $HalfBlueGreen = '89B3C9';
981 apache_bytes => ['DEF:min_raw={file}:value:MIN',
982 'DEF:avg_raw={file}:value:AVERAGE',
983 'DEF:max_raw={file}:value:MAX',
984 'CDEF:min=min_raw,8,*',
985 'CDEF:avg=avg_raw,8,*',
986 'CDEF:max=max_raw,8,*',
987 'CDEF:mytime=avg_raw,TIME,TIME,IF',
988 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
989 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
990 'CDEF:avg_sample=avg_raw,UN,0,avg_raw,IF,sample_len,*',
991 'CDEF:avg_sum=PREV,UN,0,PREV,IF,avg_sample,+',
992 "AREA:avg#$HalfBlue",
993 "LINE1:avg#$FullBlue:Bit/s",
994 'GPRINT:min:MIN:%5.1lf%s Min,',
995 'GPRINT:avg:AVERAGE:%5.1lf%s Avg,',
996 'GPRINT:max:MAX:%5.1lf%s Max,',
997 'GPRINT:avg:LAST:%5.1lf%s Last',
998 'GPRINT:avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
1000 apache_connections => ['DEF:min={file}:value:MIN',
1001 'DEF:avg={file}:value:AVERAGE',
1002 'DEF:max={file}:value:MAX',
1003 "AREA:max#$HalfBlue",
1005 "LINE1:avg#$FullBlue:Connections",
1006 'GPRINT:min:MIN:%6.2lf Min,',
1007 'GPRINT:avg:AVERAGE:%6.2lf Avg,',
1008 'GPRINT:max:MAX:%6.2lf Max,',
1009 'GPRINT:avg:LAST:%6.2lf Last'
1011 apache_idle_workers => ['DEF:min={file}:value:MIN',
1012 'DEF:avg={file}:value:AVERAGE',
1013 'DEF:max={file}:value:MAX',
1014 "AREA:max#$HalfBlue",
1016 "LINE1:avg#$FullBlue:Idle Workers",
1017 'GPRINT:min:MIN:%6.2lf Min,',
1018 'GPRINT:avg:AVERAGE:%6.2lf Avg,',
1019 'GPRINT:max:MAX:%6.2lf Max,',
1020 'GPRINT:avg:LAST:%6.2lf Last'
1022 apache_requests => ['DEF:min={file}:value:MIN',
1023 'DEF:avg={file}:value:AVERAGE',
1024 'DEF:max={file}:value:MAX',
1025 "AREA:max#$HalfBlue",
1027 "LINE1:avg#$FullBlue:Requests/s",
1028 'GPRINT:min:MIN:%6.2lf Min,',
1029 'GPRINT:avg:AVERAGE:%6.2lf Avg,',
1030 'GPRINT:max:MAX:%6.2lf Max,',
1031 'GPRINT:avg:LAST:%6.2lf Last'
1033 apache_scoreboard => ['DEF:min={file}:value:MIN',
1034 'DEF:avg={file}:value:AVERAGE',
1035 'DEF:max={file}:value:MAX',
1036 "AREA:max#$HalfBlue",
1038 "LINE1:avg#$FullBlue:Processes",
1039 'GPRINT:min:MIN:%6.2lf Min,',
1040 'GPRINT:avg:AVERAGE:%6.2lf Avg,',
1041 'GPRINT:max:MAX:%6.2lf Max,',
1042 'GPRINT:avg:LAST:%6.2lf Last'
1044 bitrate => ['-v', 'Bits/s',
1045 'DEF:avg={file}:value:AVERAGE',
1046 'DEF:min={file}:value:MIN',
1047 'DEF:max={file}:value:MAX',
1048 "AREA:max#$HalfBlue",
1050 "LINE1:avg#$FullBlue:Bits/s",
1051 'GPRINT:min:MIN:%5.1lf%s Min,',
1052 'GPRINT:avg:AVERAGE:%5.1lf%s Average,',
1053 'GPRINT:max:MAX:%5.1lf%s Max,',
1054 'GPRINT:avg:LAST:%5.1lf%s Last\l'
1056 charge => ['-v', 'Ah',
1057 'DEF:avg={file}:value:AVERAGE',
1058 'DEF:min={file}:value:MIN',
1059 'DEF:max={file}:value:MAX',
1060 "AREA:max#$HalfBlue",
1062 "LINE1:avg#$FullBlue:Charge",
1063 'GPRINT:min:MIN:%5.1lf%sAh Min,',
1064 'GPRINT:avg:AVERAGE:%5.1lf%sAh Avg,',
1065 'GPRINT:max:MAX:%5.1lf%sAh Max,',
1066 'GPRINT:avg:LAST:%5.1lf%sAh Last\l'
1068 connections => ['-v', 'Connections',
1069 'DEF:avg={file}:value:AVERAGE',
1070 'DEF:min={file}:value:MIN',
1071 'DEF:max={file}:value:MAX',
1072 "AREA:max#$HalfBlue",
1074 "LINE1:avg#$FullBlue:Connections",
1075 'GPRINT:min:MIN:%4.1lf Min,',
1076 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1077 'GPRINT:max:MAX:%4.1lf Max,',
1078 'GPRINT:avg:LAST:%4.1lf Last\l'
1080 cpu => ['-v', 'CPU load',
1081 'DEF:avg={file}:value:AVERAGE',
1082 'DEF:min={file}:value:MIN',
1083 'DEF:max={file}:value:MAX',
1084 "AREA:max#$HalfBlue",
1086 "LINE1:avg#$FullBlue:Percent",
1087 'GPRINT:min:MIN:%6.2lf%% Min,',
1088 'GPRINT:avg:AVERAGE:%6.2lf%% Avg,',
1089 'GPRINT:max:MAX:%6.2lf%% Max,',
1090 'GPRINT:avg:LAST:%6.2lf%% Last\l'
1092 current => ['-v', 'Ampere',
1093 'DEF:avg={file}:value:AVERAGE',
1094 'DEF:min={file}:value:MIN',
1095 'DEF:max={file}:value:MAX',
1096 "AREA:max#$HalfBlue",
1098 "LINE1:avg#$FullBlue:Current",
1099 'GPRINT:min:MIN:%5.1lf%sA Min,',
1100 'GPRINT:avg:AVERAGE:%5.1lf%sA Avg,',
1101 'GPRINT:max:MAX:%5.1lf%sA Max,',
1102 'GPRINT:avg:LAST:%5.1lf%sA Last\l'
1104 df => ['-v', 'Percent', '-l', '0',
1105 'DEF:free_avg={file}:free:AVERAGE',
1106 'DEF:free_min={file}:free:MIN',
1107 'DEF:free_max={file}:free:MAX',
1108 'DEF:used_avg={file}:used:AVERAGE',
1109 'DEF:used_min={file}:used:MIN',
1110 'DEF:used_max={file}:used:MAX',
1111 'CDEF:total=free_avg,used_avg,+',
1112 'CDEF:free_pct=100,free_avg,*,total,/',
1113 'CDEF:used_pct=100,used_avg,*,total,/',
1114 'CDEF:free_acc=free_pct,used_pct,+',
1115 'CDEF:used_acc=used_pct',
1116 "AREA:free_acc#$HalfGreen",
1117 "AREA:used_acc#$HalfRed",
1118 "LINE1:free_acc#$FullGreen:Free",
1119 'GPRINT:free_min:MIN:%5.1lf%sB Min,',
1120 'GPRINT:free_avg:AVERAGE:%5.1lf%sB Avg,',
1121 'GPRINT:free_max:MAX:%5.1lf%sB Max,',
1122 'GPRINT:free_avg:LAST:%5.1lf%sB Last\l',
1123 "LINE1:used_acc#$FullRed:Used",
1124 'GPRINT:used_min:MIN:%5.1lf%sB Min,',
1125 'GPRINT:used_avg:AVERAGE:%5.1lf%sB Avg,',
1126 'GPRINT:used_max:MAX:%5.1lf%sB Max,',
1127 'GPRINT:used_avg:LAST:%5.1lf%sB Last\l'
1130 'DEF:rtime_avg={file}:rtime:AVERAGE',
1131 'DEF:rtime_min={file}:rtime:MIN',
1132 'DEF:rtime_max={file}:rtime:MAX',
1133 'DEF:wtime_avg={file}:wtime:AVERAGE',
1134 'DEF:wtime_min={file}:wtime:MIN',
1135 'DEF:wtime_max={file}:wtime:MAX',
1136 'CDEF:rtime_avg_ms=rtime_avg,1000,/',
1137 'CDEF:rtime_min_ms=rtime_min,1000,/',
1138 'CDEF:rtime_max_ms=rtime_max,1000,/',
1139 'CDEF:wtime_avg_ms=wtime_avg,1000,/',
1140 'CDEF:wtime_min_ms=wtime_min,1000,/',
1141 'CDEF:wtime_max_ms=wtime_max,1000,/',
1142 'CDEF:total_avg_ms=rtime_avg_ms,wtime_avg_ms,+',
1143 'CDEF:total_min_ms=rtime_min_ms,wtime_min_ms,+',
1144 'CDEF:total_max_ms=rtime_max_ms,wtime_max_ms,+',
1145 "AREA:total_max_ms#$HalfRed",
1146 "AREA:total_min_ms#$Canvas",
1147 "LINE1:wtime_avg_ms#$FullGreen:Write",
1148 'GPRINT:wtime_min_ms:MIN:%5.1lf%s Min,',
1149 'GPRINT:wtime_avg_ms:AVERAGE:%5.1lf%s Avg,',
1150 'GPRINT:wtime_max_ms:MAX:%5.1lf%s Max,',
1151 'GPRINT:wtime_avg_ms:LAST:%5.1lf%s Last\n',
1152 "LINE1:rtime_avg_ms#$FullBlue:Read ",
1153 'GPRINT:rtime_min_ms:MIN:%5.1lf%s Min,',
1154 'GPRINT:rtime_avg_ms:AVERAGE:%5.1lf%s Avg,',
1155 'GPRINT:rtime_max_ms:MAX:%5.1lf%s Max,',
1156 'GPRINT:rtime_avg_ms:LAST:%5.1lf%s Last\n',
1157 "LINE1:total_avg_ms#$FullRed:Total",
1158 'GPRINT:total_min_ms:MIN:%5.1lf%s Min,',
1159 'GPRINT:total_avg_ms:AVERAGE:%5.1lf%s Avg,',
1160 'GPRINT:total_max_ms:MAX:%5.1lf%s Max,',
1161 'GPRINT:total_avg_ms:LAST:%5.1lf%s Last'
1163 disk_octets => ['-v', 'Bytes/s',
1164 'DEF:out_min={file}:write:MIN',
1165 'DEF:out_avg={file}:write:AVERAGE',
1166 'DEF:out_max={file}:write:MAX',
1167 'DEF:inc_min={file}:read:MIN',
1168 'DEF:inc_avg={file}:read:AVERAGE',
1169 'DEF:inc_max={file}:read:MAX',
1170 'CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF',
1171 'CDEF:mytime=out_avg,TIME,TIME,IF',
1172 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1173 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1174 'CDEF:out_avg_sample=out_avg,UN,0,out_avg,IF,sample_len,*',
1175 'CDEF:out_avg_sum=PREV,UN,0,PREV,IF,out_avg_sample,+',
1176 'CDEF:inc_avg_sample=inc_avg,UN,0,inc_avg,IF,sample_len,*',
1177 'CDEF:inc_avg_sum=PREV,UN,0,PREV,IF,inc_avg_sample,+',
1178 "AREA:out_avg#$HalfGreen",
1179 "AREA:inc_avg#$HalfBlue",
1180 "AREA:overlap#$HalfBlueGreen",
1181 "LINE1:out_avg#$FullGreen:Written",
1182 'GPRINT:out_avg:AVERAGE:%5.1lf%s Avg,',
1183 'GPRINT:out_max:MAX:%5.1lf%s Max,',
1184 'GPRINT:out_avg:LAST:%5.1lf%s Last',
1185 'GPRINT:out_avg_sum:LAST:(ca. %5.1lf%sB Total)\l',
1186 "LINE1:inc_avg#$FullBlue:Read ",
1187 'GPRINT:inc_avg:AVERAGE:%5.1lf%s Avg,',
1188 'GPRINT:inc_max:MAX:%5.1lf%s Max,',
1189 'GPRINT:inc_avg:LAST:%5.1lf%s Last',
1190 'GPRINT:inc_avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
1192 disk_merged => ['-v', 'Merged Ops/s',
1193 'DEF:out_min={file}:write:MIN',
1194 'DEF:out_avg={file}:write:AVERAGE',
1195 'DEF:out_max={file}:write:MAX',
1196 'DEF:inc_min={file}:read:MIN',
1197 'DEF:inc_avg={file}:read:AVERAGE',
1198 'DEF:inc_max={file}:read:MAX',
1199 'CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF',
1200 "AREA:out_avg#$HalfGreen",
1201 "AREA:inc_avg#$HalfBlue",
1202 "AREA:overlap#$HalfBlueGreen",
1203 "LINE1:out_avg#$FullGreen:Written",
1204 'GPRINT:out_avg:AVERAGE:%6.2lf Avg,',
1205 'GPRINT:out_max:MAX:%6.2lf Max,',
1206 'GPRINT:out_avg:LAST:%6.2lf Last\l',
1207 "LINE1:inc_avg#$FullBlue:Read ",
1208 'GPRINT:inc_avg:AVERAGE:%6.2lf Avg,',
1209 'GPRINT:inc_max:MAX:%6.2lf Max,',
1210 'GPRINT:inc_avg:LAST:%6.2lf Last\l'
1212 disk_ops => ['-v', 'Ops/s',
1213 'DEF:out_min={file}:write:MIN',
1214 'DEF:out_avg={file}:write:AVERAGE',
1215 'DEF:out_max={file}:write:MAX',
1216 'DEF:inc_min={file}:read:MIN',
1217 'DEF:inc_avg={file}:read:AVERAGE',
1218 'DEF:inc_max={file}:read:MAX',
1219 'CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF',
1220 "AREA:out_avg#$HalfGreen",
1221 "AREA:inc_avg#$HalfBlue",
1222 "AREA:overlap#$HalfBlueGreen",
1223 "LINE1:out_avg#$FullGreen:Written",
1224 'GPRINT:out_avg:AVERAGE:%6.2lf Avg,',
1225 'GPRINT:out_max:MAX:%6.2lf Max,',
1226 'GPRINT:out_avg:LAST:%6.2lf Last\l',
1227 "LINE1:inc_avg#$FullBlue:Read ",
1228 'GPRINT:inc_avg:AVERAGE:%6.2lf Avg,',
1229 'GPRINT:inc_max:MAX:%6.2lf Max,',
1230 'GPRINT:inc_avg:LAST:%6.2lf Last\l'
1232 disk_time => ['-v', 'Seconds/s',
1233 'DEF:out_min_raw={file}:write:MIN',
1234 'DEF:out_avg_raw={file}:write:AVERAGE',
1235 'DEF:out_max_raw={file}:write:MAX',
1236 'DEF:inc_min_raw={file}:read:MIN',
1237 'DEF:inc_avg_raw={file}:read:AVERAGE',
1238 'DEF:inc_max_raw={file}:read:MAX',
1239 'CDEF:out_min=out_min_raw,1000,/',
1240 'CDEF:out_avg=out_avg_raw,1000,/',
1241 'CDEF:out_max=out_max_raw,1000,/',
1242 'CDEF:inc_min=inc_min_raw,1000,/',
1243 'CDEF:inc_avg=inc_avg_raw,1000,/',
1244 'CDEF:inc_max=inc_max_raw,1000,/',
1245 'CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF',
1246 "AREA:out_avg#$HalfGreen",
1247 "AREA:inc_avg#$HalfBlue",
1248 "AREA:overlap#$HalfBlueGreen",
1249 "LINE1:out_avg#$FullGreen:Written",
1250 'GPRINT:out_avg:AVERAGE:%5.1lf%ss Avg,',
1251 'GPRINT:out_max:MAX:%5.1lf%ss Max,',
1252 'GPRINT:out_avg:LAST:%5.1lf%ss Last\l',
1253 "LINE1:inc_avg#$FullBlue:Read ",
1254 'GPRINT:inc_avg:AVERAGE:%5.1lf%ss Avg,',
1255 'GPRINT:inc_max:MAX:%5.1lf%ss Max,',
1256 'GPRINT:inc_avg:LAST:%5.1lf%ss Last\l'
1258 dns_octets => ['DEF:rsp_min_raw={file}:responses:MIN',
1259 'DEF:rsp_avg_raw={file}:responses:AVERAGE',
1260 'DEF:rsp_max_raw={file}:responses:MAX',
1261 'DEF:qry_min_raw={file}:queries:MIN',
1262 'DEF:qry_avg_raw={file}:queries:AVERAGE',
1263 'DEF:qry_max_raw={file}:queries:MAX',
1264 'CDEF:rsp_min=rsp_min_raw,8,*',
1265 'CDEF:rsp_avg=rsp_avg_raw,8,*',
1266 'CDEF:rsp_max=rsp_max_raw,8,*',
1267 'CDEF:qry_min=qry_min_raw,8,*',
1268 'CDEF:qry_avg=qry_avg_raw,8,*',
1269 'CDEF:qry_max=qry_max_raw,8,*',
1270 'CDEF:overlap=rsp_avg,qry_avg,GT,qry_avg,rsp_avg,IF',
1271 'CDEF:mytime=rsp_avg_raw,TIME,TIME,IF',
1272 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1273 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1274 'CDEF:rsp_avg_sample=rsp_avg_raw,UN,0,rsp_avg_raw,IF,sample_len,*',
1275 'CDEF:rsp_avg_sum=PREV,UN,0,PREV,IF,rsp_avg_sample,+',
1276 'CDEF:qry_avg_sample=qry_avg_raw,UN,0,qry_avg_raw,IF,sample_len,*',
1277 'CDEF:qry_avg_sum=PREV,UN,0,PREV,IF,qry_avg_sample,+',
1278 "AREA:rsp_avg#$HalfGreen",
1279 "AREA:qry_avg#$HalfBlue",
1280 "AREA:overlap#$HalfBlueGreen",
1281 "LINE1:rsp_avg#$FullGreen:Responses",
1282 'GPRINT:rsp_avg:AVERAGE:%5.1lf%s Avg,',
1283 'GPRINT:rsp_max:MAX:%5.1lf%s Max,',
1284 'GPRINT:rsp_avg:LAST:%5.1lf%s Last',
1285 'GPRINT:rsp_avg_sum:LAST:(ca. %5.1lf%sB Total)\l',
1286 "LINE1:qry_avg#$FullBlue:Queries ",
1287 #'GPRINT:qry_min:MIN:%5.1lf %s Min,',
1288 'GPRINT:qry_avg:AVERAGE:%5.1lf%s Avg,',
1289 'GPRINT:qry_max:MAX:%5.1lf%s Max,',
1290 'GPRINT:qry_avg:LAST:%5.1lf%s Last',
1291 'GPRINT:qry_avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
1294 'DEF:avg={file}:value:AVERAGE',
1295 'DEF:min={file}:value:MIN',
1296 'DEF:max={file}:value:MAX',
1297 "AREA:max#$HalfBlue",
1299 "LINE1:avg#$FullBlue:Queries/s",
1300 'GPRINT:min:MIN:%9.3lf Min,',
1301 'GPRINT:avg:AVERAGE:%9.3lf Average,',
1302 'GPRINT:max:MAX:%9.3lf Max,',
1303 'GPRINT:avg:LAST:%9.3lf Last\l'
1305 email_count => ['-v', 'Mails',
1306 'DEF:avg={file}:value:AVERAGE',
1307 'DEF:min={file}:value:MIN',
1308 'DEF:max={file}:value:MAX',
1309 "AREA:max#$HalfMagenta",
1311 "LINE1:avg#$FullMagenta:Count ",
1312 'GPRINT:min:MIN:%4.1lf Min,',
1313 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1314 'GPRINT:max:MAX:%4.1lf Max,',
1315 'GPRINT:avg:LAST:%4.1lf Last\l'
1317 email_size => ['-v', 'Bytes',
1318 'DEF:avg={file}:value:AVERAGE',
1319 'DEF:min={file}:value:MIN',
1320 'DEF:max={file}:value:MAX',
1321 "AREA:max#$HalfMagenta",
1323 "LINE1:avg#$FullMagenta:Count ",
1324 'GPRINT:min:MIN:%4.1lf Min,',
1325 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1326 'GPRINT:max:MAX:%4.1lf Max,',
1327 'GPRINT:avg:LAST:%4.1lf Last\l'
1329 spam_score => ['-v', 'Score',
1330 'DEF:avg={file}:value:AVERAGE',
1331 'DEF:min={file}:value:MIN',
1332 'DEF:max={file}:value:MAX',
1333 "AREA:max#$HalfBlue",
1335 "LINE1:avg#$FullBlue:Score ",
1336 'GPRINT:min:MIN:%4.1lf Min,',
1337 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1338 'GPRINT:max:MAX:%4.1lf Max,',
1339 'GPRINT:avg:LAST:%4.1lf Last\l'
1342 'DEF:avg={file}:value:AVERAGE',
1343 'DEF:min={file}:value:MIN',
1344 'DEF:max={file}:value:MAX',
1345 "AREA:max#$HalfMagenta",
1347 "LINE1:avg#$FullMagenta:Count ",
1348 'GPRINT:min:MIN:%4.1lf Min,',
1349 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1350 'GPRINT:max:MAX:%4.1lf Max,',
1351 'GPRINT:avg:LAST:%4.1lf Last\l'
1353 conntrack => ['-v', 'Entries',
1354 'DEF:avg={file}:entropy:AVERAGE',
1355 'DEF:min={file}:entropy:MIN',
1356 'DEF:max={file}:entropy:MAX',
1357 "AREA:max#$HalfBlue",
1359 "LINE1:avg#$FullBlue:Count",
1360 'GPRINT:min:MIN:%4.0lf Min,',
1361 'GPRINT:avg:AVERAGE:%4.0lf Avg,',
1362 'GPRINT:max:MAX:%4.0lf Max,',
1363 'GPRINT:avg:LAST:%4.0lf Last\l'
1365 entropy => ['-v', 'Bits',
1366 'DEF:avg={file}:entropy:AVERAGE',
1367 'DEF:min={file}:entropy:MIN',
1368 'DEF:max={file}:entropy:MAX',
1369 "AREA:max#$HalfBlue",
1371 "LINE1:avg#$FullBlue:Bits",
1372 'GPRINT:min:MIN:%4.0lfbit Min,',
1373 'GPRINT:avg:AVERAGE:%4.0lfbit Avg,',
1374 'GPRINT:max:MAX:%4.0lfbit Max,',
1375 'GPRINT:avg:LAST:%4.0lfbit Last\l'
1377 fanspeed => ['-v', 'RPM',
1378 'DEF:avg={file}:value:AVERAGE',
1379 'DEF:min={file}:value:MIN',
1380 'DEF:max={file}:value:MAX',
1381 "AREA:max#$HalfMagenta",
1383 "LINE1:avg#$FullMagenta:RPM",
1384 'GPRINT:min:MIN:%4.1lf Min,',
1385 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1386 'GPRINT:max:MAX:%4.1lf Max,',
1387 'GPRINT:avg:LAST:%4.1lf Last\l'
1389 frequency => ['-v', 'Hertz',
1390 'DEF:avg={file}:frequency:AVERAGE',
1391 'DEF:min={file}:frequency:MIN',
1392 'DEF:max={file}:frequency:MAX',
1393 "AREA:max#$HalfBlue",
1395 "LINE1:avg#$FullBlue:Frequency [Hz]",
1396 'GPRINT:min:MIN:%4.1lf Min,',
1397 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1398 'GPRINT:max:MAX:%4.1lf Max,',
1399 'GPRINT:avg:LAST:%4.1lf Last\l'
1401 frequency_offset => [ # NTPd
1402 'DEF:ppm_avg={file}:ppm:AVERAGE',
1403 'DEF:ppm_min={file}:ppm:MIN',
1404 'DEF:ppm_max={file}:ppm:MAX',
1405 "AREA:ppm_max#$HalfBlue",
1406 "AREA:ppm_min#$Canvas",
1407 "LINE1:ppm_avg#$FullBlue:{inst}",
1408 'GPRINT:ppm_min:MIN:%5.2lf Min,',
1409 'GPRINT:ppm_avg:AVERAGE:%5.2lf Avg,',
1410 'GPRINT:ppm_max:MAX:%5.2lf Max,',
1411 'GPRINT:ppm_avg:LAST:%5.2lf Last'
1413 gauge => ['-v', 'Exec value',
1414 'DEF:temp_avg={file}:value:AVERAGE',
1415 'DEF:temp_min={file}:value:MIN',
1416 'DEF:temp_max={file}:value:MAX',
1417 "AREA:temp_max#$HalfBlue",
1418 "AREA:temp_min#$Canvas",
1419 "LINE1:temp_avg#$FullBlue:Exec value",
1420 'GPRINT:temp_min:MIN:%6.2lf Min,',
1421 'GPRINT:temp_avg:AVERAGE:%6.2lf Avg,',
1422 'GPRINT:temp_max:MAX:%6.2lf Max,',
1423 'GPRINT:temp_avg:LAST:%6.2lf Last\l'
1426 'DEF:temp_avg={file}:value:AVERAGE',
1427 'DEF:temp_min={file}:value:MIN',
1428 'DEF:temp_max={file}:value:MAX',
1429 "AREA:temp_max#$HalfRed",
1430 "AREA:temp_min#$Canvas",
1431 "LINE1:temp_avg#$FullRed:Temperature",
1432 'GPRINT:temp_min:MIN:%4.1lf Min,',
1433 'GPRINT:temp_avg:AVERAGE:%4.1lf Avg,',
1434 'GPRINT:temp_max:MAX:%4.1lf Max,',
1435 'GPRINT:temp_avg:LAST:%4.1lf Last\l'
1437 humidity => ['-v', 'Percent',
1438 'DEF:temp_avg={file}:value:AVERAGE',
1439 'DEF:temp_min={file}:value:MIN',
1440 'DEF:temp_max={file}:value:MAX',
1441 "AREA:temp_max#$HalfGreen",
1442 "AREA:temp_min#$Canvas",
1443 "LINE1:temp_avg#$FullGreen:Temperature",
1444 'GPRINT:temp_min:MIN:%4.1lf%% Min,',
1445 'GPRINT:temp_avg:AVERAGE:%4.1lf%% Avg,',
1446 'GPRINT:temp_max:MAX:%4.1lf%% Max,',
1447 'GPRINT:temp_avg:LAST:%4.1lf%% Last\l'
1449 if_errors => ['-v', 'Errors/s',
1450 'DEF:tx_min={file}:tx:MIN',
1451 'DEF:tx_avg={file}:tx:AVERAGE',
1452 'DEF:tx_max={file}:tx:MAX',
1453 'DEF:rx_min={file}:rx:MIN',
1454 'DEF:rx_avg={file}:rx:AVERAGE',
1455 'DEF:rx_max={file}:rx:MAX',
1456 'CDEF:overlap=tx_avg,rx_avg,GT,rx_avg,tx_avg,IF',
1457 'CDEF:mytime=tx_avg,TIME,TIME,IF',
1458 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1459 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1460 'CDEF:tx_avg_sample=tx_avg,UN,0,tx_avg,IF,sample_len,*',
1461 'CDEF:tx_avg_sum=PREV,UN,0,PREV,IF,tx_avg_sample,+',
1462 'CDEF:rx_avg_sample=rx_avg,UN,0,rx_avg,IF,sample_len,*',
1463 'CDEF:rx_avg_sum=PREV,UN,0,PREV,IF,rx_avg_sample,+',
1464 "AREA:tx_avg#$HalfGreen",
1465 "AREA:rx_avg#$HalfBlue",
1466 "AREA:overlap#$HalfBlueGreen",
1467 "LINE1:tx_avg#$FullGreen:TX",
1468 'GPRINT:tx_avg:AVERAGE:%5.1lf%s Avg,',
1469 'GPRINT:tx_max:MAX:%5.1lf%s Max,',
1470 'GPRINT:tx_avg:LAST:%5.1lf%s Last',
1471 'GPRINT:tx_avg_sum:LAST:(ca. %4.0lf%s Total)\l',
1472 "LINE1:rx_avg#$FullBlue:RX",
1473 #'GPRINT:rx_min:MIN:%5.1lf %s Min,',
1474 'GPRINT:rx_avg:AVERAGE:%5.1lf%s Avg,',
1475 'GPRINT:rx_max:MAX:%5.1lf%s Max,',
1476 'GPRINT:rx_avg:LAST:%5.1lf%s Last',
1477 'GPRINT:rx_avg_sum:LAST:(ca. %4.0lf%s Total)\l'
1479 if_collisions => ['-v', 'Collisions/s',
1480 'DEF:min_raw={file}:value:MIN',
1481 'DEF:avg_raw={file}:value:AVERAGE',
1482 'DEF:max_raw={file}:value:MAX',
1483 'CDEF:min=min_raw,8,*',
1484 'CDEF:avg=avg_raw,8,*',
1485 'CDEF:max=max_raw,8,*',
1486 "AREA:max#$HalfBlue",
1488 "LINE1:avg#$FullBlue:Collisions/s",
1489 'GPRINT:min:MIN:%5.1lf %s Min,',
1490 'GPRINT:avg:AVERAGE:%5.1lf%s Avg,',
1491 'GPRINT:max:MAX:%5.1lf%s Max,',
1492 'GPRINT:avg:LAST:%5.1lf%s Last\l'
1494 if_dropped => ['-v', 'Packets/s',
1495 'DEF:tx_min={file}:tx:MIN',
1496 'DEF:tx_avg={file}:tx:AVERAGE',
1497 'DEF:tx_max={file}:tx:MAX',
1498 'DEF:rx_min={file}:rx:MIN',
1499 'DEF:rx_avg={file}:rx:AVERAGE',
1500 'DEF:rx_max={file}:rx:MAX',
1501 'CDEF:overlap=tx_avg,rx_avg,GT,rx_avg,tx_avg,IF',
1502 'CDEF:mytime=tx_avg,TIME,TIME,IF',
1503 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1504 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1505 'CDEF:tx_avg_sample=tx_avg,UN,0,tx_avg,IF,sample_len,*',
1506 'CDEF:tx_avg_sum=PREV,UN,0,PREV,IF,tx_avg_sample,+',
1507 'CDEF:rx_avg_sample=rx_avg,UN,0,rx_avg,IF,sample_len,*',
1508 'CDEF:rx_avg_sum=PREV,UN,0,PREV,IF,rx_avg_sample,+',
1509 "AREA:tx_avg#$HalfGreen",
1510 "AREA:rx_avg#$HalfBlue",
1511 "AREA:overlap#$HalfBlueGreen",
1512 "LINE1:tx_avg#$FullGreen:TX",
1513 'GPRINT:tx_avg:AVERAGE:%5.1lf%s Avg,',
1514 'GPRINT:tx_max:MAX:%5.1lf%s Max,',
1515 'GPRINT:tx_avg:LAST:%5.1lf%s Last',
1516 'GPRINT:tx_avg_sum:LAST:(ca. %4.0lf%s Total)\l',
1517 "LINE1:rx_avg#$FullBlue:RX",
1518 #'GPRINT:rx_min:MIN:%5.1lf %s Min,',
1519 'GPRINT:rx_avg:AVERAGE:%5.1lf%s Avg,',
1520 'GPRINT:rx_max:MAX:%5.1lf%s Max,',
1521 'GPRINT:rx_avg:LAST:%5.1lf%s Last',
1522 'GPRINT:rx_avg_sum:LAST:(ca. %4.0lf%s Total)\l'
1524 if_packets => ['-v', 'Packets/s',
1525 'DEF:tx_min={file}:tx:MIN',
1526 'DEF:tx_avg={file}:tx:AVERAGE',
1527 'DEF:tx_max={file}:tx:MAX',
1528 'DEF:rx_min={file}:rx:MIN',
1529 'DEF:rx_avg={file}:rx:AVERAGE',
1530 'DEF:rx_max={file}:rx:MAX',
1531 'CDEF:overlap=tx_avg,rx_avg,GT,rx_avg,tx_avg,IF',
1532 'CDEF:mytime=tx_avg,TIME,TIME,IF',
1533 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1534 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1535 'CDEF:tx_avg_sample=tx_avg,UN,0,tx_avg,IF,sample_len,*',
1536 'CDEF:tx_avg_sum=PREV,UN,0,PREV,IF,tx_avg_sample,+',
1537 'CDEF:rx_avg_sample=rx_avg,UN,0,rx_avg,IF,sample_len,*',
1538 'CDEF:rx_avg_sum=PREV,UN,0,PREV,IF,rx_avg_sample,+',
1539 "AREA:tx_avg#$HalfGreen",
1540 "AREA:rx_avg#$HalfBlue",
1541 "AREA:overlap#$HalfBlueGreen",
1542 "LINE1:tx_avg#$FullGreen:TX",
1543 'GPRINT:tx_avg:AVERAGE:%5.1lf%s Avg,',
1544 'GPRINT:tx_max:MAX:%5.1lf%s Max,',
1545 'GPRINT:tx_avg:LAST:%5.1lf%s Last',
1546 'GPRINT:tx_avg_sum:LAST:(ca. %4.0lf%s Total)\l',
1547 "LINE1:rx_avg#$FullBlue:RX",
1548 #'GPRINT:rx_min:MIN:%5.1lf %s Min,',
1549 'GPRINT:rx_avg:AVERAGE:%5.1lf%s Avg,',
1550 'GPRINT:rx_max:MAX:%5.1lf%s Max,',
1551 'GPRINT:rx_avg:LAST:%5.1lf%s Last',
1552 'GPRINT:rx_avg_sum:LAST:(ca. %4.0lf%s Total)\l'
1554 if_rx_errors => ['-v', 'Errors/s',
1555 'DEF:min={file}:value:MIN',
1556 'DEF:avg={file}:value:AVERAGE',
1557 'DEF:max={file}:value:MAX',
1558 'CDEF:mytime=avg,TIME,TIME,IF',
1559 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1560 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1561 'CDEF:avg_sample=avg,UN,0,avg,IF,sample_len,*',
1562 'CDEF:avg_sum=PREV,UN,0,PREV,IF,avg_sample,+',
1563 "AREA:avg#$HalfBlue",
1564 "LINE1:avg#$FullBlue:Errors/s",
1565 'GPRINT:avg:AVERAGE:%3.1lf%s Avg,',
1566 'GPRINT:max:MAX:%3.1lf%s Max,',
1567 'GPRINT:avg:LAST:%3.1lf%s Last',
1568 'GPRINT:avg_sum:LAST:(ca. %2.0lf%s Total)\l'
1570 ipt_bytes => ['-v', 'Bits/s',
1571 'DEF:min_raw={file}:value:MIN',
1572 'DEF:avg_raw={file}:value:AVERAGE',
1573 'DEF:max_raw={file}:value:MAX',
1574 'CDEF:min=min_raw,8,*',
1575 'CDEF:avg=avg_raw,8,*',
1576 'CDEF:max=max_raw,8,*',
1577 'CDEF:mytime=avg_raw,TIME,TIME,IF',
1578 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1579 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1580 'CDEF:avg_sample=avg_raw,UN,0,avg_raw,IF,sample_len,*',
1581 'CDEF:avg_sum=PREV,UN,0,PREV,IF,avg_sample,+',
1582 "AREA:max#$HalfBlue",
1584 "LINE1:avg#$FullBlue:Bits/s",
1585 #'GPRINT:min:MIN:%5.1lf %s Min,',
1586 'GPRINT:avg:AVERAGE:%5.1lf%s Avg,',
1587 'GPRINT:max:MAX:%5.1lf%s Max,',
1588 'GPRINT:avg:LAST:%5.1lf%s Last',
1589 'GPRINT:avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
1591 ipt_packets => ['-v', 'Packets/s',
1592 'DEF:min_raw={file}:value:MIN',
1593 'DEF:avg_raw={file}:value:AVERAGE',
1594 'DEF:max_raw={file}:value:MAX',
1595 'CDEF:min=min_raw,8,*',
1596 'CDEF:avg=avg_raw,8,*',
1597 'CDEF:max=max_raw,8,*',
1598 "AREA:max#$HalfBlue",
1600 "LINE1:avg#$FullBlue:Packets/s",
1601 'GPRINT:min:MIN:%5.1lf %s Min,',
1602 'GPRINT:avg:AVERAGE:%5.1lf%s Avg,',
1603 'GPRINT:max:MAX:%5.1lf%s Max,',
1604 'GPRINT:avg:LAST:%5.1lf%s Last\l'
1606 irq => ['-v', 'Issues/s',
1607 'DEF:avg={file}:value:AVERAGE',
1608 'DEF:min={file}:value:MIN',
1609 'DEF:max={file}:value:MAX',
1610 "AREA:max#$HalfBlue",
1612 "LINE1:avg#$FullBlue:Issues/s",
1613 'GPRINT:min:MIN:%6.2lf Min,',
1614 'GPRINT:avg:AVERAGE:%6.2lf Avg,',
1615 'GPRINT:max:MAX:%6.2lf Max,',
1616 'GPRINT:avg:LAST:%6.2lf Last\l'
1618 load => ['-v', 'System load',
1619 'DEF:s_avg={file}:shortterm:AVERAGE',
1620 'DEF:s_min={file}:shortterm:MIN',
1621 'DEF:s_max={file}:shortterm:MAX',
1622 'DEF:m_avg={file}:midterm:AVERAGE',
1623 'DEF:m_min={file}:midterm:MIN',
1624 'DEF:m_max={file}:midterm:MAX',
1625 'DEF:l_avg={file}:longterm:AVERAGE',
1626 'DEF:l_min={file}:longterm:MIN',
1627 'DEF:l_max={file}:longterm:MAX',
1628 "AREA:s_max#$HalfGreen",
1629 "AREA:s_min#$Canvas",
1630 "LINE1:s_avg#$FullGreen: 1m average",
1631 'GPRINT:s_min:MIN:%4.2lf Min,',
1632 'GPRINT:s_avg:AVERAGE:%4.2lf Avg,',
1633 'GPRINT:s_max:MAX:%4.2lf Max,',
1634 'GPRINT:s_avg:LAST:%4.2lf Last\n',
1635 "LINE1:m_avg#$FullBlue: 5m average",
1636 'GPRINT:m_min:MIN:%4.2lf Min,',
1637 'GPRINT:m_avg:AVERAGE:%4.2lf Avg,',
1638 'GPRINT:m_max:MAX:%4.2lf Max,',
1639 'GPRINT:m_avg:LAST:%4.2lf Last\n',
1640 "LINE1:l_avg#$FullRed:15m average",
1641 'GPRINT:l_min:MIN:%4.2lf Min,',
1642 'GPRINT:l_avg:AVERAGE:%4.2lf Avg,',
1643 'GPRINT:l_max:MAX:%4.2lf Max,',
1644 'GPRINT:l_avg:LAST:%4.2lf Last'
1647 'DEF:avg={file}:percent:AVERAGE',
1648 'DEF:min={file}:percent:MIN',
1649 'DEF:max={file}:percent:MAX',
1650 "AREA:max#$HalfBlue",
1652 "LINE1:avg#$FullBlue:Load",
1653 'GPRINT:min:MIN:%5.1lf%s%% Min,',
1654 'GPRINT:avg:AVERAGE:%5.1lf%s%% Avg,',
1655 'GPRINT:max:MAX:%5.1lf%s%% Max,',
1656 'GPRINT:avg:LAST:%5.1lf%s%% Last\l'
1658 mails => ['DEF:rawgood={file}:good:AVERAGE',
1659 'DEF:rawspam={file}:spam:AVERAGE',
1660 'CDEF:good=rawgood,UN,0,rawgood,IF',
1661 'CDEF:spam=rawspam,UN,0,rawspam,IF',
1662 'CDEF:negspam=spam,-1,*',
1663 "AREA:good#$HalfGreen",
1664 "LINE1:good#$FullGreen:Good mails",
1665 'GPRINT:good:AVERAGE:%4.1lf Avg,',
1666 'GPRINT:good:MAX:%4.1lf Max,',
1667 'GPRINT:good:LAST:%4.1lf Last\n',
1668 "AREA:negspam#$HalfRed",
1669 "LINE1:negspam#$FullRed:Spam mails",
1670 'GPRINT:spam:AVERAGE:%4.1lf Avg,',
1671 'GPRINT:spam:MAX:%4.1lf Max,',
1672 'GPRINT:spam:LAST:%4.1lf Last',
1675 memcached_command => ['-v', 'Commands',
1676 'DEF:avg={file}:value:AVERAGE',
1677 'DEF:min={file}:value:MIN',
1678 'DEF:max={file}:value:MAX',
1679 "AREA:max#$HalfBlue",
1681 "LINE1:avg#$FullBlue:Commands",
1682 'GPRINT:min:MIN:%5.1lf%s Min,',
1683 'GPRINT:avg:AVERAGE:%5.1lf Avg,',
1684 'GPRINT:max:MAX:%5.1lf Max,',
1685 'GPRINT:avg:LAST:%5.1lf Last\l'
1687 memcached_connections => ['-v', 'Connections',
1688 'DEF:avg={file}:value:AVERAGE',
1689 'DEF:min={file}:value:MIN',
1690 'DEF:max={file}:value:MAX',
1691 "AREA:max#$HalfBlue",
1693 "LINE1:avg#$FullBlue:Connections",
1694 'GPRINT:min:MIN:%4.1lf Min,',
1695 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1696 'GPRINT:max:MAX:%4.1lf Max,',
1697 'GPRINT:avg:LAST:%4.1lf Last\l'
1699 memcached_items => ['-v', 'Items',
1700 'DEF:avg={file}:value:AVERAGE',
1701 'DEF:min={file}:value:MIN',
1702 'DEF:max={file}:value:MAX',
1703 "AREA:max#$HalfBlue",
1705 "LINE1:avg#$FullBlue:Items",
1706 'GPRINT:min:MIN:%4.1lf Min,',
1707 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1708 'GPRINT:max:MAX:%4.1lf Max,',
1709 'GPRINT:avg:LAST:%4.1lf Last\l'
1711 memcached_octets => ['-v', 'Bits/s',
1712 'DEF:out_min={file}:tx:MIN',
1713 'DEF:out_avg={file}:tx:AVERAGE',
1714 'DEF:out_max={file}:tx:MAX',
1715 'DEF:inc_min={file}:rx:MIN',
1716 'DEF:inc_avg={file}:rx:AVERAGE',
1717 'DEF:inc_max={file}:rx:MAX',
1718 'CDEF:mytime=out_avg,TIME,TIME,IF',
1719 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1720 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1721 'CDEF:out_avg_sample=out_avg,UN,0,out_avg,IF,sample_len,*',
1722 'CDEF:out_avg_sum=PREV,UN,0,PREV,IF,out_avg_sample,+',
1723 'CDEF:inc_avg_sample=inc_avg,UN,0,inc_avg,IF,sample_len,*',
1724 'CDEF:inc_avg_sum=PREV,UN,0,PREV,IF,inc_avg_sample,+',
1725 'CDEF:out_bit_min=out_min,8,*',
1726 'CDEF:out_bit_avg=out_avg,8,*',
1727 'CDEF:out_bit_max=out_max,8,*',
1728 'CDEF:inc_bit_min=inc_min,8,*',
1729 'CDEF:inc_bit_avg=inc_avg,8,*',
1730 'CDEF:inc_bit_max=inc_max,8,*',
1731 'CDEF:overlap=out_bit_avg,inc_bit_avg,GT,inc_bit_avg,out_bit_avg,IF',
1732 "AREA:out_bit_avg#$HalfGreen",
1733 "AREA:inc_bit_avg#$HalfBlue",
1734 "AREA:overlap#$HalfBlueGreen",
1735 "LINE1:out_bit_avg#$FullGreen:Written",
1736 'GPRINT:out_bit_avg:AVERAGE:%5.1lf%s Avg,',
1737 'GPRINT:out_bit_max:MAX:%5.1lf%s Max,',
1738 'GPRINT:out_bit_avg:LAST:%5.1lf%s Last',
1739 'GPRINT:out_avg_sum:LAST:(ca. %5.1lf%sB Total)\l',
1740 "LINE1:inc_bit_avg#$FullBlue:Read ",
1741 'GPRINT:inc_bit_avg:AVERAGE:%5.1lf%s Avg,',
1742 'GPRINT:inc_bit_max:MAX:%5.1lf%s Max,',
1743 'GPRINT:inc_bit_avg:LAST:%5.1lf%s Last',
1744 'GPRINT:inc_avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
1746 memcached_ops => ['-v', 'Ops',
1747 'DEF:avg={file}:value:AVERAGE',
1748 'DEF:min={file}:value:MIN',
1749 'DEF:max={file}:value:MAX',
1750 "AREA:max#$HalfBlue",
1752 "LINE1:avg#$FullBlue:Ops",
1753 'GPRINT:min:MIN:%4.1lf Min,',
1754 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
1755 'GPRINT:max:MAX:%4.1lf Max,',
1756 'GPRINT:avg:LAST:%4.1lf Last\l'
1758 memory => ['-b', '1024', '-v', 'Bytes',
1759 'DEF:avg={file}:value:AVERAGE',
1760 'DEF:min={file}:value:MIN',
1761 'DEF:max={file}:value:MAX',
1762 "AREA:max#$HalfBlue",
1764 "LINE1:avg#$FullBlue:Memory",
1765 'GPRINT:min:MIN:%5.1lf%sbyte Min,',
1766 'GPRINT:avg:AVERAGE:%5.1lf%sbyte Avg,',
1767 'GPRINT:max:MAX:%5.1lf%sbyte Max,',
1768 'GPRINT:avg:LAST:%5.1lf%sbyte Last\l'
1771 'DEF:used_avg={file}:used:AVERAGE',
1772 'DEF:free_avg={file}:free:AVERAGE',
1773 'DEF:buffers_avg={file}:buffers:AVERAGE',
1774 'DEF:cached_avg={file}:cached:AVERAGE',
1775 'DEF:used_min={file}:used:MIN',
1776 'DEF:free_min={file}:free:MIN',
1777 'DEF:buffers_min={file}:buffers:MIN',
1778 'DEF:cached_min={file}:cached:MIN',
1779 'DEF:used_max={file}:used:MAX',
1780 'DEF:free_max={file}:free:MAX',
1781 'DEF:buffers_max={file}:buffers:MAX',
1782 'DEF:cached_max={file}:cached:MAX',
1783 'CDEF:cached_avg_nn=cached_avg,UN,0,cached_avg,IF',
1784 'CDEF:buffers_avg_nn=buffers_avg,UN,0,buffers_avg,IF',
1785 'CDEF:free_cached_buffers_used=free_avg,cached_avg_nn,+,buffers_avg_nn,+,used_avg,+',
1786 'CDEF:cached_buffers_used=cached_avg,buffers_avg_nn,+,used_avg,+',
1787 'CDEF:buffers_used=buffers_avg,used_avg,+',
1788 "AREA:free_cached_buffers_used#$HalfGreen",
1789 "AREA:cached_buffers_used#$HalfBlue",
1790 "AREA:buffers_used#$HalfYellow",
1791 "AREA:used_avg#$HalfRed",
1792 "LINE1:free_cached_buffers_used#$FullGreen:Free ",
1793 'GPRINT:free_min:MIN:%5.1lf%s Min,',
1794 'GPRINT:free_avg:AVERAGE:%5.1lf%s Avg,',
1795 'GPRINT:free_max:MAX:%5.1lf%s Max,',
1796 'GPRINT:free_avg:LAST:%5.1lf%s Last\n',
1797 "LINE1:cached_buffers_used#$FullBlue:Page cache ",
1798 'GPRINT:cached_min:MIN:%5.1lf%s Min,',
1799 'GPRINT:cached_avg:AVERAGE:%5.1lf%s Avg,',
1800 'GPRINT:cached_max:MAX:%5.1lf%s Max,',
1801 'GPRINT:cached_avg:LAST:%5.1lf%s Last\n',
1802 "LINE1:buffers_used#$FullYellow:Buffer cache",
1803 'GPRINT:buffers_min:MIN:%5.1lf%s Min,',
1804 'GPRINT:buffers_avg:AVERAGE:%5.1lf%s Avg,',
1805 'GPRINT:buffers_max:MAX:%5.1lf%s Max,',
1806 'GPRINT:buffers_avg:LAST:%5.1lf%s Last\n',
1807 "LINE1:used_avg#$FullRed:Used ",
1808 'GPRINT:used_min:MIN:%5.1lf%s Min,',
1809 'GPRINT:used_avg:AVERAGE:%5.1lf%s Avg,',
1810 'GPRINT:used_max:MAX:%5.1lf%s Max,',
1811 'GPRINT:used_avg:LAST:%5.1lf%s Last'
1813 mysql_commands => ['-v', 'Issues/s',
1814 "DEF:val_avg={file}:value:AVERAGE",
1815 "DEF:val_min={file}:value:MIN",
1816 "DEF:val_max={file}:value:MAX",
1817 "AREA:val_max#$HalfBlue",
1818 "AREA:val_min#$Canvas",
1819 "LINE1:val_avg#$FullBlue:Issues/s",
1820 'GPRINT:val_min:MIN:%5.2lf Min,',
1821 'GPRINT:val_avg:AVERAGE:%5.2lf Avg,',
1822 'GPRINT:val_max:MAX:%5.2lf Max,',
1823 'GPRINT:val_avg:LAST:%5.2lf Last'
1825 mysql_handler => ['-v', 'Issues/s',
1826 "DEF:val_avg={file}:value:AVERAGE",
1827 "DEF:val_min={file}:value:MIN",
1828 "DEF:val_max={file}:value:MAX",
1829 "AREA:val_max#$HalfBlue",
1830 "AREA:val_min#$Canvas",
1831 "LINE1:val_avg#$FullBlue:Issues/s",
1832 'GPRINT:val_min:MIN:%5.2lf Min,',
1833 'GPRINT:val_avg:AVERAGE:%5.2lf Avg,',
1834 'GPRINT:val_max:MAX:%5.2lf Max,',
1835 'GPRINT:val_avg:LAST:%5.2lf Last'
1837 mysql_octets => ['-v', 'Bits/s',
1838 'DEF:out_min={file}:tx:MIN',
1839 'DEF:out_avg={file}:tx:AVERAGE',
1840 'DEF:out_max={file}:tx:MAX',
1841 'DEF:inc_min={file}:rx:MIN',
1842 'DEF:inc_avg={file}:rx:AVERAGE',
1843 'DEF:inc_max={file}:rx:MAX',
1844 'CDEF:mytime=out_avg,TIME,TIME,IF',
1845 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
1846 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
1847 'CDEF:out_avg_sample=out_avg,UN,0,out_avg,IF,sample_len,*',
1848 'CDEF:out_avg_sum=PREV,UN,0,PREV,IF,out_avg_sample,+',
1849 'CDEF:inc_avg_sample=inc_avg,UN,0,inc_avg,IF,sample_len,*',
1850 'CDEF:inc_avg_sum=PREV,UN,0,PREV,IF,inc_avg_sample,+',
1851 'CDEF:out_bit_min=out_min,8,*',
1852 'CDEF:out_bit_avg=out_avg,8,*',
1853 'CDEF:out_bit_max=out_max,8,*',
1854 'CDEF:inc_bit_min=inc_min,8,*',
1855 'CDEF:inc_bit_avg=inc_avg,8,*',
1856 'CDEF:inc_bit_max=inc_max,8,*',
1857 'CDEF:overlap=out_bit_avg,inc_bit_avg,GT,inc_bit_avg,out_bit_avg,IF',
1858 "AREA:out_bit_avg#$HalfGreen",
1859 "AREA:inc_bit_avg#$HalfBlue",
1860 "AREA:overlap#$HalfBlueGreen",
1861 "LINE1:out_bit_avg#$FullGreen:Written",
1862 'GPRINT:out_bit_avg:AVERAGE:%5.1lf%s Avg,',
1863 'GPRINT:out_bit_max:MAX:%5.1lf%s Max,',
1864 'GPRINT:out_bit_avg:LAST:%5.1lf%s Last',
1865 'GPRINT:out_avg_sum:LAST:(ca. %5.1lf%sB Total)\l',
1866 "LINE1:inc_bit_avg#$FullBlue:Read ",
1867 'GPRINT:inc_bit_avg:AVERAGE:%5.1lf%s Avg,',
1868 'GPRINT:inc_bit_max:MAX:%5.1lf%s Max,',
1869 'GPRINT:inc_bit_avg:LAST:%5.1lf%s Last',
1870 'GPRINT:inc_avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
1872 mysql_qcache => ['-v', 'Queries/s',
1873 "DEF:hits_min={file}:hits:MIN",
1874 "DEF:hits_avg={file}:hits:AVERAGE",
1875 "DEF:hits_max={file}:hits:MAX",
1876 "DEF:inserts_min={file}:inserts:MIN",
1877 "DEF:inserts_avg={file}:inserts:AVERAGE",
1878 "DEF:inserts_max={file}:inserts:MAX",
1879 "DEF:not_cached_min={file}:not_cached:MIN",
1880 "DEF:not_cached_avg={file}:not_cached:AVERAGE",
1881 "DEF:not_cached_max={file}:not_cached:MAX",
1882 "DEF:lowmem_prunes_min={file}:lowmem_prunes:MIN",
1883 "DEF:lowmem_prunes_avg={file}:lowmem_prunes:AVERAGE",
1884 "DEF:lowmem_prunes_max={file}:lowmem_prunes:MAX",
1885 "DEF:queries_min={file}:queries_in_cache:MIN",
1886 "DEF:queries_avg={file}:queries_in_cache:AVERAGE",
1887 "DEF:queries_max={file}:queries_in_cache:MAX",
1888 "CDEF:unknown=queries_avg,UNKN,+",
1889 "CDEF:not_cached_agg=hits_avg,inserts_avg,+,not_cached_avg,+",
1890 "CDEF:inserts_agg=hits_avg,inserts_avg,+",
1891 "CDEF:hits_agg=hits_avg",
1892 "AREA:not_cached_agg#$HalfYellow",
1893 "AREA:inserts_agg#$HalfBlue",
1894 "AREA:hits_agg#$HalfGreen",
1895 "LINE1:not_cached_agg#$FullYellow:Not Cached ",
1896 'GPRINT:not_cached_min:MIN:%5.2lf Min,',
1897 'GPRINT:not_cached_avg:AVERAGE:%5.2lf Avg,',
1898 'GPRINT:not_cached_max:MAX:%5.2lf Max,',
1899 'GPRINT:not_cached_avg:LAST:%5.2lf Last\l',
1900 "LINE1:inserts_agg#$FullBlue:Inserts ",
1901 'GPRINT:inserts_min:MIN:%5.2lf Min,',
1902 'GPRINT:inserts_avg:AVERAGE:%5.2lf Avg,',
1903 'GPRINT:inserts_max:MAX:%5.2lf Max,',
1904 'GPRINT:inserts_avg:LAST:%5.2lf Last\l',
1905 "LINE1:hits_agg#$FullGreen:Hits ",
1906 'GPRINT:hits_min:MIN:%5.2lf Min,',
1907 'GPRINT:hits_avg:AVERAGE:%5.2lf Avg,',
1908 'GPRINT:hits_max:MAX:%5.2lf Max,',
1909 'GPRINT:hits_avg:LAST:%5.2lf Last\l',
1910 "LINE1:lowmem_prunes_avg#$FullRed:Lowmem Prunes ",
1911 'GPRINT:lowmem_prunes_min:MIN:%5.2lf Min,',
1912 'GPRINT:lowmem_prunes_avg:AVERAGE:%5.2lf Avg,',
1913 'GPRINT:lowmem_prunes_max:MAX:%5.2lf Max,',
1914 'GPRINT:lowmem_prunes_avg:LAST:%5.2lf Last\l',
1915 "LINE1:unknown#$Canvas:Queries in cache",
1916 'GPRINT:queries_min:MIN:%5.0lf Min,',
1917 'GPRINT:queries_avg:AVERAGE:%5.0lf Avg,',
1918 'GPRINT:queries_max:MAX:%5.0lf Max,',
1919 'GPRINT:queries_avg:LAST:%5.0lf Last\l'
1921 mysql_threads => ['-v', 'Threads',
1922 "DEF:running_min={file}:running:MIN",
1923 "DEF:running_avg={file}:running:AVERAGE",
1924 "DEF:running_max={file}:running:MAX",
1925 "DEF:connected_min={file}:connected:MIN",
1926 "DEF:connected_avg={file}:connected:AVERAGE",
1927 "DEF:connected_max={file}:connected:MAX",
1928 "DEF:cached_min={file}:cached:MIN",
1929 "DEF:cached_avg={file}:cached:AVERAGE",
1930 "DEF:cached_max={file}:cached:MAX",
1931 "DEF:created_min={file}:created:MIN",
1932 "DEF:created_avg={file}:created:AVERAGE",
1933 "DEF:created_max={file}:created:MAX",
1934 "CDEF:unknown=created_avg,UNKN,+",
1935 "CDEF:cached_agg=connected_avg,cached_avg,+",
1936 "AREA:cached_agg#$HalfGreen",
1937 "AREA:connected_avg#$HalfBlue",
1938 "AREA:running_avg#$HalfRed",
1939 "LINE1:cached_agg#$FullGreen:Cached ",
1940 'GPRINT:cached_min:MIN:%5.1lf Min,',
1941 'GPRINT:cached_avg:AVERAGE:%5.1lf Avg,',
1942 'GPRINT:cached_max:MAX:%5.1lf Max,',
1943 'GPRINT:cached_avg:LAST:%5.1lf Last\l',
1944 "LINE1:connected_avg#$FullBlue:Connected",
1945 'GPRINT:connected_min:MIN:%5.1lf Min,',
1946 'GPRINT:connected_avg:AVERAGE:%5.1lf Avg,',
1947 'GPRINT:connected_max:MAX:%5.1lf Max,',
1948 'GPRINT:connected_avg:LAST:%5.1lf Last\l',
1949 "LINE1:running_avg#$FullRed:Running ",
1950 'GPRINT:running_min:MIN:%5.1lf Min,',
1951 'GPRINT:running_avg:AVERAGE:%5.1lf Avg,',
1952 'GPRINT:running_max:MAX:%5.1lf Max,',
1953 'GPRINT:running_avg:LAST:%5.1lf Last\l',
1954 "LINE1:unknown#$Canvas:Created ",
1955 'GPRINT:created_min:MIN:%5.0lf Min,',
1956 'GPRINT:created_avg:AVERAGE:%5.0lf Avg,',
1957 'GPRINT:created_max:MAX:%5.0lf Max,',
1958 'GPRINT:created_avg:LAST:%5.0lf Last\l'
1960 nfs_procedure => ['-v', 'Issues/s',
1961 'DEF:avg={file}:value:AVERAGE',
1962 'DEF:min={file}:value:MIN',
1963 'DEF:max={file}:value:MAX',
1964 "AREA:max#$HalfBlue",
1966 "LINE1:avg#$FullBlue:Issues/s",
1967 'GPRINT:min:MIN:%6.2lf Min,',
1968 'GPRINT:avg:AVERAGE:%6.2lf Avg,',
1969 'GPRINT:max:MAX:%6.2lf Max,',
1970 'GPRINT:avg:LAST:%6.2lf Last\l'
1972 nfs3_procedures => [
1973 "DEF:null_avg={file}:null:AVERAGE",
1974 "DEF:getattr_avg={file}:getattr:AVERAGE",
1975 "DEF:setattr_avg={file}:setattr:AVERAGE",
1976 "DEF:lookup_avg={file}:lookup:AVERAGE",
1977 "DEF:access_avg={file}:access:AVERAGE",
1978 "DEF:readlink_avg={file}:readlink:AVERAGE",
1979 "DEF:read_avg={file}:read:AVERAGE",
1980 "DEF:write_avg={file}:write:AVERAGE",
1981 "DEF:create_avg={file}:create:AVERAGE",
1982 "DEF:mkdir_avg={file}:mkdir:AVERAGE",
1983 "DEF:symlink_avg={file}:symlink:AVERAGE",
1984 "DEF:mknod_avg={file}:mknod:AVERAGE",
1985 "DEF:remove_avg={file}:remove:AVERAGE",
1986 "DEF:rmdir_avg={file}:rmdir:AVERAGE",
1987 "DEF:rename_avg={file}:rename:AVERAGE",
1988 "DEF:link_avg={file}:link:AVERAGE",
1989 "DEF:readdir_avg={file}:readdir:AVERAGE",
1990 "DEF:readdirplus_avg={file}:readdirplus:AVERAGE",
1991 "DEF:fsstat_avg={file}:fsstat:AVERAGE",
1992 "DEF:fsinfo_avg={file}:fsinfo:AVERAGE",
1993 "DEF:pathconf_avg={file}:pathconf:AVERAGE",
1994 "DEF:commit_avg={file}:commit:AVERAGE",
1995 "DEF:null_max={file}:null:MAX",
1996 "DEF:getattr_max={file}:getattr:MAX",
1997 "DEF:setattr_max={file}:setattr:MAX",
1998 "DEF:lookup_max={file}:lookup:MAX",
1999 "DEF:access_max={file}:access:MAX",
2000 "DEF:readlink_max={file}:readlink:MAX",
2001 "DEF:read_max={file}:read:MAX",
2002 "DEF:write_max={file}:write:MAX",
2003 "DEF:create_max={file}:create:MAX",
2004 "DEF:mkdir_max={file}:mkdir:MAX",
2005 "DEF:symlink_max={file}:symlink:MAX",
2006 "DEF:mknod_max={file}:mknod:MAX",
2007 "DEF:remove_max={file}:remove:MAX",
2008 "DEF:rmdir_max={file}:rmdir:MAX",
2009 "DEF:rename_max={file}:rename:MAX",
2010 "DEF:link_max={file}:link:MAX",
2011 "DEF:readdir_max={file}:readdir:MAX",
2012 "DEF:readdirplus_max={file}:readdirplus:MAX",
2013 "DEF:fsstat_max={file}:fsstat:MAX",
2014 "DEF:fsinfo_max={file}:fsinfo:MAX",
2015 "DEF:pathconf_max={file}:pathconf:MAX",
2016 "DEF:commit_max={file}:commit:MAX",
2017 "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,+,+,+,+,+,+,+,+,+,+,+,+,+,+",
2018 "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,+,+,+,+,+,+,+,+,+,+,+,+,+,+",
2019 "CDEF:stack_read=read_avg",
2020 "CDEF:stack_getattr=stack_read,getattr_avg,+",
2021 "CDEF:stack_access=stack_getattr,access_avg,+",
2022 "CDEF:stack_lookup=stack_access,lookup_avg,+",
2023 "CDEF:stack_write=stack_lookup,write_avg,+",
2024 "CDEF:stack_commit=stack_write,commit_avg,+",
2025 "CDEF:stack_setattr=stack_commit,setattr_avg,+",
2026 "CDEF:stack_other=stack_setattr,other_avg,+",
2027 "AREA:stack_other#$HalfRed",
2028 "AREA:stack_setattr#$HalfGreen",
2029 "AREA:stack_commit#$HalfYellow",
2030 "AREA:stack_write#$HalfGreen",
2031 "AREA:stack_lookup#$HalfBlue",
2032 "AREA:stack_access#$HalfMagenta",
2033 "AREA:stack_getattr#$HalfCyan",
2034 "AREA:stack_read#$HalfBlue",
2035 "LINE1:stack_other#$FullRed:Other ",
2036 'GPRINT:other_max:MAX:%5.1lf Max,',
2037 'GPRINT:other_avg:AVERAGE:%5.1lf Avg,',
2038 'GPRINT:other_avg:LAST:%5.1lf Last\l',
2039 "LINE1:stack_setattr#$FullGreen:setattr",
2040 'GPRINT:setattr_max:MAX:%5.1lf Max,',
2041 'GPRINT:setattr_avg:AVERAGE:%5.1lf Avg,',
2042 'GPRINT:setattr_avg:LAST:%5.1lf Last\l',
2043 "LINE1:stack_commit#$FullYellow:commit ",
2044 'GPRINT:commit_max:MAX:%5.1lf Max,',
2045 'GPRINT:commit_avg:AVERAGE:%5.1lf Avg,',
2046 'GPRINT:commit_avg:LAST:%5.1lf Last\l',
2047 "LINE1:stack_write#$FullGreen:write ",
2048 'GPRINT:write_max:MAX:%5.1lf Max,',
2049 'GPRINT:write_avg:AVERAGE:%5.1lf Avg,',
2050 'GPRINT:write_avg:LAST:%5.1lf Last\l',
2051 "LINE1:stack_lookup#$FullBlue:lookup ",
2052 'GPRINT:lookup_max:MAX:%5.1lf Max,',
2053 'GPRINT:lookup_avg:AVERAGE:%5.1lf Avg,',
2054 'GPRINT:lookup_avg:LAST:%5.1lf Last\l',
2055 "LINE1:stack_access#$FullMagenta:access ",
2056 'GPRINT:access_max:MAX:%5.1lf Max,',
2057 'GPRINT:access_avg:AVERAGE:%5.1lf Avg,',
2058 'GPRINT:access_avg:LAST:%5.1lf Last\l',
2059 "LINE1:stack_getattr#$FullCyan:getattr",
2060 'GPRINT:getattr_max:MAX:%5.1lf Max,',
2061 'GPRINT:getattr_avg:AVERAGE:%5.1lf Avg,',
2062 'GPRINT:getattr_avg:LAST:%5.1lf Last\l',
2063 "LINE1:stack_read#$FullBlue:read ",
2064 'GPRINT:read_max:MAX:%5.1lf Max,',
2065 'GPRINT:read_avg:AVERAGE:%5.1lf Avg,',
2066 'GPRINT:read_avg:LAST:%5.1lf Last\l'
2069 "DEF:rbyte_avg={file}:rbytes:AVERAGE",
2070 "DEF:rbyte_min={file}:rbytes:MIN",
2071 "DEF:rbyte_max={file}:rbytes:MAX",
2072 "DEF:wbyte_avg={file}:wbytes:AVERAGE",
2073 "DEF:wbyte_min={file}:wbytes:MIN",
2074 "DEF:wbyte_max={file}:wbytes:MAX",
2075 'CDEF:overlap=wbyte_avg,rbyte_avg,GT,rbyte_avg,wbyte_avg,IF',
2076 "AREA:wbyte_avg#$HalfGreen",
2077 "AREA:rbyte_avg#$HalfBlue",
2078 "AREA:overlap#$HalfBlueGreen",
2079 "LINE1:wbyte_avg#$FullGreen:Write",
2080 'GPRINT:wbyte_min:MIN:%5.1lf%s Min,',
2081 'GPRINT:wbyte_avg:AVERAGE:%5.1lf%s Avg,',
2082 'GPRINT:wbyte_max:MAX:%5.1lf%s Max,',
2083 'GPRINT:wbyte_avg:LAST:%5.1lf%s Last\l',
2084 "LINE1:rbyte_avg#$FullBlue:Read ",
2085 'GPRINT:rbyte_min:MIN:%5.1lf%s Min,',
2086 'GPRINT:rbyte_avg:AVERAGE:%5.1lf%s Avg,',
2087 'GPRINT:rbyte_max:MAX:%5.1lf%s Max,',
2088 'GPRINT:rbyte_avg:LAST:%5.1lf%s Last\l'
2090 percent => ['-v', 'Percent',
2091 'DEF:avg={file}:percent:AVERAGE',
2092 'DEF:min={file}:percent:MIN',
2093 'DEF:max={file}:percent:MAX',
2094 "AREA:max#$HalfBlue",
2096 "LINE1:avg#$FullBlue:Percent",
2097 'GPRINT:min:MIN:%5.1lf%% Min,',
2098 'GPRINT:avg:AVERAGE:%5.1lf%% Avg,',
2099 'GPRINT:max:MAX:%5.1lf%% Max,',
2100 'GPRINT:avg:LAST:%5.1lf%% Last\l'
2102 ping => ['DEF:ping_avg={file}:ping:AVERAGE',
2103 'DEF:ping_min={file}:ping:MIN',
2104 'DEF:ping_max={file}:ping:MAX',
2105 "AREA:ping_max#$HalfBlue",
2106 "AREA:ping_min#$Canvas",
2107 "LINE1:ping_avg#$FullBlue:Ping",
2108 'GPRINT:ping_min:MIN:%4.1lf ms Min,',
2109 'GPRINT:ping_avg:AVERAGE:%4.1lf ms Avg,',
2110 'GPRINT:ping_max:MAX:%4.1lf ms Max,',
2111 'GPRINT:ping_avg:LAST:%4.1lf ms Last'],
2112 pg_blks => ['DEF:pg_blks_avg={file}:value:AVERAGE',
2113 'DEF:pg_blks_min={file}:value:MIN',
2114 'DEF:pg_blks_max={file}:value:MAX',
2115 "AREA:pg_blks_max#$HalfBlue",
2116 "AREA:pg_blks_min#$Canvas",
2117 "LINE1:pg_blks_avg#$FullBlue:Blocks",
2118 'GPRINT:pg_blks_min:MIN:%4.1lf%s Min,',
2119 'GPRINT:pg_blks_avg:AVERAGE:%4.1lf%s Avg,',
2120 'GPRINT:pg_blks_max:MAX:%4.1lf%s Max,',
2121 'GPRINT:pg_blks_avg:LAST:%4.1lf%s Last'],
2122 pg_db_size => ['DEF:pg_db_size_avg={file}:value:AVERAGE',
2123 'DEF:pg_db_size_min={file}:value:MIN',
2124 'DEF:pg_db_size_max={file}:value:MAX',
2125 "AREA:pg_db_size_max#$HalfBlue",
2126 "AREA:pg_db_size_min#$Canvas",
2127 "LINE1:pg_db_size_avg#$FullBlue:Bytes",
2128 'GPRINT:pg_db_size_min:MIN:%4.1lf%s Min,',
2129 'GPRINT:pg_db_size_avg:AVERAGE:%4.1lf%s Avg,',
2130 'GPRINT:pg_db_size_max:MAX:%4.1lf%s Max,',
2131 'GPRINT:pg_db_size_avg:LAST:%4.1lf%s Last'],
2132 pg_n_tup_c => ['DEF:pg_n_tup_avg={file}:value:AVERAGE',
2133 'DEF:pg_n_tup_min={file}:value:MIN',
2134 'DEF:pg_n_tup_max={file}:value:MAX',
2135 "AREA:pg_n_tup_max#$HalfBlue",
2136 "AREA:pg_n_tup_min#$Canvas",
2137 "LINE1:pg_n_tup_avg#$FullBlue:Tuples",
2138 'GPRINT:pg_n_tup_min:MIN:%4.1lf%s Min,',
2139 'GPRINT:pg_n_tup_avg:AVERAGE:%4.1lf%s Avg,',
2140 'GPRINT:pg_n_tup_max:MAX:%4.1lf%s Max,',
2141 'GPRINT:pg_n_tup_avg:LAST:%4.1lf%s Last'],
2142 pg_n_tup_g => ['DEF:pg_n_tup_avg={file}:value:AVERAGE',
2143 'DEF:pg_n_tup_min={file}:value:MIN',
2144 'DEF:pg_n_tup_max={file}:value:MAX',
2145 "AREA:pg_n_tup_max#$HalfBlue",
2146 "AREA:pg_n_tup_min#$Canvas",
2147 "LINE1:pg_n_tup_avg#$FullBlue:Tuples",
2148 'GPRINT:pg_n_tup_min:MIN:%4.1lf%s Min,',
2149 'GPRINT:pg_n_tup_avg:AVERAGE:%4.1lf%s Avg,',
2150 'GPRINT:pg_n_tup_max:MAX:%4.1lf%s Max,',
2151 'GPRINT:pg_n_tup_avg:LAST:%4.1lf%s Last'],
2152 pg_numbackends => ['DEF:pg_numbackends_avg={file}:value:AVERAGE',
2153 'DEF:pg_numbackends_min={file}:value:MIN',
2154 'DEF:pg_numbackends_max={file}:value:MAX',
2155 "AREA:pg_numbackends_max#$HalfBlue",
2156 "AREA:pg_numbackends_min#$Canvas",
2157 "LINE1:pg_numbackends_avg#$FullBlue:Backends",
2158 'GPRINT:pg_numbackends_min:MIN:%4.1lf%s Min,',
2159 'GPRINT:pg_numbackends_avg:AVERAGE:%4.1lf%s Avg,',
2160 'GPRINT:pg_numbackends_max:MAX:%4.1lf%s Max,',
2161 'GPRINT:pg_numbackends_avg:LAST:%4.1lf%s Last'],
2162 pg_scan => ['DEF:pg_scan_avg={file}:value:AVERAGE',
2163 'DEF:pg_scan_min={file}:value:MIN',
2164 'DEF:pg_scan_max={file}:value:MAX',
2165 "AREA:pg_scan_max#$HalfBlue",
2166 "AREA:pg_scan_min#$Canvas",
2167 "LINE1:pg_scan_avg#$FullBlue:Scans",
2168 'GPRINT:pg_scan_min:MIN:%4.1lf%s Min,',
2169 'GPRINT:pg_scan_avg:AVERAGE:%4.1lf%s Avg,',
2170 'GPRINT:pg_scan_max:MAX:%4.1lf%s Max,',
2171 'GPRINT:pg_scan_avg:LAST:%4.1lf%s Last'],
2172 pg_xact => ['DEF:pg_xact_avg={file}:value:AVERAGE',
2173 'DEF:pg_xact_min={file}:value:MIN',
2174 'DEF:pg_xact_max={file}:value:MAX',
2175 "AREA:pg_xact_max#$HalfBlue",
2176 "AREA:pg_xact_min#$Canvas",
2177 "LINE1:pg_xact_avg#$FullBlue:Transactions",
2178 'GPRINT:pg_xact_min:MIN:%4.1lf%s Min,',
2179 'GPRINT:pg_xact_avg:AVERAGE:%4.1lf%s Avg,',
2180 'GPRINT:pg_xact_max:MAX:%4.1lf%s Max,',
2181 'GPRINT:pg_xact_avg:LAST:%4.1lf%s Last'],
2182 power => ['-v', 'Watt',
2183 'DEF:avg={file}:value:AVERAGE',
2184 'DEF:min={file}:value:MIN',
2185 'DEF:max={file}:value:MAX',
2186 "AREA:max#$HalfBlue",
2188 "LINE1:avg#$FullBlue:Watt",
2189 'GPRINT:min:MIN:%5.1lf%sW Min,',
2190 'GPRINT:avg:AVERAGE:%5.1lf%sW Avg,',
2191 'GPRINT:max:MAX:%5.1lf%sW Max,',
2192 'GPRINT:avg:LAST:%5.1lf%sW Last\l'
2195 "DEF:running_avg={file}:running:AVERAGE",
2196 "DEF:running_min={file}:running:MIN",
2197 "DEF:running_max={file}:running:MAX",
2198 "DEF:sleeping_avg={file}:sleeping:AVERAGE",
2199 "DEF:sleeping_min={file}:sleeping:MIN",
2200 "DEF:sleeping_max={file}:sleeping:MAX",
2201 "DEF:zombies_avg={file}:zombies:AVERAGE",
2202 "DEF:zombies_min={file}:zombies:MIN",
2203 "DEF:zombies_max={file}:zombies:MAX",
2204 "DEF:stopped_avg={file}:stopped:AVERAGE",
2205 "DEF:stopped_min={file}:stopped:MIN",
2206 "DEF:stopped_max={file}:stopped:MAX",
2207 "DEF:paging_avg={file}:paging:AVERAGE",
2208 "DEF:paging_min={file}:paging:MIN",
2209 "DEF:paging_max={file}:paging:MAX",
2210 "DEF:blocked_avg={file}:blocked:AVERAGE",
2211 "DEF:blocked_min={file}:blocked:MIN",
2212 "DEF:blocked_max={file}:blocked:MAX",
2213 'CDEF:paging_acc=sleeping_avg,running_avg,stopped_avg,zombies_avg,blocked_avg,paging_avg,+,+,+,+,+',
2214 'CDEF:blocked_acc=sleeping_avg,running_avg,stopped_avg,zombies_avg,blocked_avg,+,+,+,+',
2215 'CDEF:zombies_acc=sleeping_avg,running_avg,stopped_avg,zombies_avg,+,+,+',
2216 'CDEF:stopped_acc=sleeping_avg,running_avg,stopped_avg,+,+',
2217 'CDEF:running_acc=sleeping_avg,running_avg,+',
2218 'CDEF:sleeping_acc=sleeping_avg',
2219 "AREA:paging_acc#$HalfYellow",
2220 "AREA:blocked_acc#$HalfCyan",
2221 "AREA:zombies_acc#$HalfRed",
2222 "AREA:stopped_acc#$HalfMagenta",
2223 "AREA:running_acc#$HalfGreen",
2224 "AREA:sleeping_acc#$HalfBlue",
2225 "LINE1:paging_acc#$FullYellow:Paging ",
2226 'GPRINT:paging_min:MIN:%5.1lf Min,',
2227 'GPRINT:paging_avg:AVERAGE:%5.1lf Average,',
2228 'GPRINT:paging_max:MAX:%5.1lf Max,',
2229 'GPRINT:paging_avg:LAST:%5.1lf Last\l',
2230 "LINE1:blocked_acc#$FullCyan:Blocked ",
2231 'GPRINT:blocked_min:MIN:%5.1lf Min,',
2232 'GPRINT:blocked_avg:AVERAGE:%5.1lf Average,',
2233 'GPRINT:blocked_max:MAX:%5.1lf Max,',
2234 'GPRINT:blocked_avg:LAST:%5.1lf Last\l',
2235 "LINE1:zombies_acc#$FullRed:Zombies ",
2236 'GPRINT:zombies_min:MIN:%5.1lf Min,',
2237 'GPRINT:zombies_avg:AVERAGE:%5.1lf Average,',
2238 'GPRINT:zombies_max:MAX:%5.1lf Max,',
2239 'GPRINT:zombies_avg:LAST:%5.1lf Last\l',
2240 "LINE1:stopped_acc#$FullMagenta:Stopped ",
2241 'GPRINT:stopped_min:MIN:%5.1lf Min,',
2242 'GPRINT:stopped_avg:AVERAGE:%5.1lf Average,',
2243 'GPRINT:stopped_max:MAX:%5.1lf Max,',
2244 'GPRINT:stopped_avg:LAST:%5.1lf Last\l',
2245 "LINE1:running_acc#$FullGreen:Running ",
2246 'GPRINT:running_min:MIN:%5.1lf Min,',
2247 'GPRINT:running_avg:AVERAGE:%5.1lf Average,',
2248 'GPRINT:running_max:MAX:%5.1lf Max,',
2249 'GPRINT:running_avg:LAST:%5.1lf Last\l',
2250 "LINE1:sleeping_acc#$FullBlue:Sleeping",
2251 'GPRINT:sleeping_min:MIN:%5.1lf Min,',
2252 'GPRINT:sleeping_avg:AVERAGE:%5.1lf Average,',
2253 'GPRINT:sleeping_max:MAX:%5.1lf Max,',
2254 'GPRINT:sleeping_avg:LAST:%5.1lf Last\l'
2256 ps_count => ['-v', 'Processes',
2257 'DEF:procs_avg={file}:processes:AVERAGE',
2258 'DEF:procs_min={file}:processes:MIN',
2259 'DEF:procs_max={file}:processes:MAX',
2260 'DEF:thrds_avg={file}:threads:AVERAGE',
2261 'DEF:thrds_min={file}:threads:MIN',
2262 'DEF:thrds_max={file}:threads:MAX',
2263 "AREA:thrds_avg#$HalfBlue",
2264 "AREA:procs_avg#$HalfRed",
2265 "LINE1:thrds_avg#$FullBlue:Threads ",
2266 'GPRINT:thrds_min:MIN:%5.1lf Min,',
2267 'GPRINT:thrds_avg:AVERAGE:%5.1lf Avg,',
2268 'GPRINT:thrds_max:MAX:%5.1lf Max,',
2269 'GPRINT:thrds_avg:LAST:%5.1lf Last\l',
2270 "LINE1:procs_avg#$FullRed:Processes",
2271 'GPRINT:procs_min:MIN:%5.1lf Min,',
2272 'GPRINT:procs_avg:AVERAGE:%5.1lf Avg,',
2273 'GPRINT:procs_max:MAX:%5.1lf Max,',
2274 'GPRINT:procs_avg:LAST:%5.1lf Last\l'
2276 ps_cputime => ['-v', 'Jiffies',
2277 'DEF:user_avg_raw={file}:user:AVERAGE',
2278 'DEF:user_min_raw={file}:user:MIN',
2279 'DEF:user_max_raw={file}:user:MAX',
2280 'DEF:syst_avg_raw={file}:syst:AVERAGE',
2281 'DEF:syst_min_raw={file}:syst:MIN',
2282 'DEF:syst_max_raw={file}:syst:MAX',
2283 'CDEF:user_avg=user_avg_raw,1000000,/',
2284 'CDEF:user_min=user_min_raw,1000000,/',
2285 'CDEF:user_max=user_max_raw,1000000,/',
2286 'CDEF:syst_avg=syst_avg_raw,1000000,/',
2287 'CDEF:syst_min=syst_min_raw,1000000,/',
2288 'CDEF:syst_max=syst_max_raw,1000000,/',
2289 'CDEF:user_syst=syst_avg,UN,0,syst_avg,IF,user_avg,+',
2290 "AREA:user_syst#$HalfBlue",
2291 "AREA:syst_avg#$HalfRed",
2292 "LINE1:user_syst#$FullBlue:User ",
2293 'GPRINT:user_min:MIN:%5.1lf%s Min,',
2294 'GPRINT:user_avg:AVERAGE:%5.1lf%s Avg,',
2295 'GPRINT:user_max:MAX:%5.1lf%s Max,',
2296 'GPRINT:user_avg:LAST:%5.1lf%s Last\l',
2297 "LINE1:syst_avg#$FullRed:System",
2298 'GPRINT:syst_min:MIN:%5.1lf%s Min,',
2299 'GPRINT:syst_avg:AVERAGE:%5.1lf%s Avg,',
2300 'GPRINT:syst_max:MAX:%5.1lf%s Max,',
2301 'GPRINT:syst_avg:LAST:%5.1lf%s Last\l'
2303 ps_pagefaults => ['-v', 'Pagefaults/s',
2304 'DEF:minor_avg={file}:minflt:AVERAGE',
2305 'DEF:minor_min={file}:minflt:MIN',
2306 'DEF:minor_max={file}:minflt:MAX',
2307 'DEF:major_avg={file}:majflt:AVERAGE',
2308 'DEF:major_min={file}:majflt:MIN',
2309 'DEF:major_max={file}:majflt:MAX',
2310 'CDEF:minor_major=major_avg,UN,0,major_avg,IF,minor_avg,+',
2311 "AREA:minor_major#$HalfBlue",
2312 "AREA:major_avg#$HalfRed",
2313 "LINE1:minor_major#$FullBlue:Minor",
2314 'GPRINT:minor_min:MIN:%5.1lf%s Min,',
2315 'GPRINT:minor_avg:AVERAGE:%5.1lf%s Avg,',
2316 'GPRINT:minor_max:MAX:%5.1lf%s Max,',
2317 'GPRINT:minor_avg:LAST:%5.1lf%s Last\l',
2318 "LINE1:major_avg#$FullRed:Major",
2319 'GPRINT:major_min:MIN:%5.1lf%s Min,',
2320 'GPRINT:major_avg:AVERAGE:%5.1lf%s Avg,',
2321 'GPRINT:major_max:MAX:%5.1lf%s Max,',
2322 'GPRINT:major_avg:LAST:%5.1lf%s Last\l'
2324 ps_rss => ['-v', 'Bytes',
2325 'DEF:avg={file}:value:AVERAGE',
2326 'DEF:min={file}:value:MIN',
2327 'DEF:max={file}:value:MAX',
2328 "AREA:avg#$HalfBlue",
2329 "LINE1:avg#$FullBlue:RSS",
2330 'GPRINT:min:MIN:%5.1lf%s Min,',
2331 'GPRINT:avg:AVERAGE:%5.1lf%s Avg,',
2332 'GPRINT:max:MAX:%5.1lf%s Max,',
2333 'GPRINT:avg:LAST:%5.1lf%s Last\l'
2335 ps_state => ['-v', 'Processes',
2336 'DEF:avg={file}:value:AVERAGE',
2337 'DEF:min={file}:value:MIN',
2338 'DEF:max={file}:value:MAX',
2339 "AREA:max#$HalfBlue",
2341 "LINE1:avg#$FullBlue:Processes",
2342 'GPRINT:min:MIN:%6.2lf Min,',
2343 'GPRINT:avg:AVERAGE:%6.2lf Avg,',
2344 'GPRINT:max:MAX:%6.2lf Max,',
2345 'GPRINT:avg:LAST:%6.2lf Last\l'
2347 signal_noise => ['-v', 'dBm',
2348 'DEF:avg={file}:value:AVERAGE',
2349 'DEF:min={file}:value:MIN',
2350 'DEF:max={file}:value:MAX',
2351 "AREA:max#$HalfBlue",
2353 "LINE1:avg#$FullBlue:Noise",
2354 'GPRINT:min:MIN:%5.1lf%sdBm Min,',
2355 'GPRINT:avg:AVERAGE:%5.1lf%sdBm Avg,',
2356 'GPRINT:max:MAX:%5.1lf%sdBm Max,',
2357 'GPRINT:avg:LAST:%5.1lf%sdBm Last\l'
2359 signal_power => ['-v', 'dBm',
2360 'DEF:avg={file}:value:AVERAGE',
2361 'DEF:min={file}:value:MIN',
2362 'DEF:max={file}:value:MAX',
2363 "AREA:max#$HalfBlue",
2365 "LINE1:avg#$FullBlue:Power",
2366 'GPRINT:min:MIN:%5.1lf%sdBm Min,',
2367 'GPRINT:avg:AVERAGE:%5.1lf%sdBm Avg,',
2368 'GPRINT:max:MAX:%5.1lf%sdBm Max,',
2369 'GPRINT:avg:LAST:%5.1lf%sdBm Last\l'
2371 signal_quality => ['-v', '%',
2372 'DEF:avg={file}:value:AVERAGE',
2373 'DEF:min={file}:value:MIN',
2374 'DEF:max={file}:value:MAX',
2375 "AREA:max#$HalfBlue",
2377 "LINE1:avg#$FullBlue:Quality",
2378 'GPRINT:min:MIN:%5.1lf%s%% Min,',
2379 'GPRINT:avg:AVERAGE:%5.1lf%s%% Avg,',
2380 'GPRINT:max:MAX:%5.1lf%s%% Max,',
2381 'GPRINT:avg:LAST:%5.1lf%s%% Last\l'
2383 swap => ['-v', 'Bytes', '-b', '1024',
2384 'DEF:avg={file}:value:AVERAGE',
2385 'DEF:min={file}:value:MIN',
2386 'DEF:max={file}:value:MAX',
2387 "AREA:max#$HalfBlue",
2389 "LINE1:avg#$FullBlue:Bytes",
2390 'GPRINT:min:MIN:%6.2lf%sByte Min,',
2391 'GPRINT:avg:AVERAGE:%6.2lf%sByte Avg,',
2392 'GPRINT:max:MAX:%6.2lf%sByte Max,',
2393 'GPRINT:avg:LAST:%6.2lf%sByte Last\l'
2396 'DEF:used_avg={file}:used:AVERAGE',
2397 'DEF:used_min={file}:used:MIN',
2398 'DEF:used_max={file}:used:MAX',
2399 'DEF:free_avg={file}:free:AVERAGE',
2400 'DEF:free_min={file}:free:MIN',
2401 'DEF:free_max={file}:free:MAX',
2402 'DEF:cach_avg={file}:cached:AVERAGE',
2403 'DEF:cach_min={file}:cached:MIN',
2404 'DEF:cach_max={file}:cached:MAX',
2405 'DEF:resv_avg={file}:resv:AVERAGE',
2406 'DEF:resv_min={file}:resv:MIN',
2407 'DEF:resv_max={file}:resv:MAX',
2408 'CDEF:cach_avg_notnull=cach_avg,UN,0,cach_avg,IF',
2409 'CDEF:resv_avg_notnull=resv_avg,UN,0,resv_avg,IF',
2410 'CDEF:used_acc=used_avg',
2411 'CDEF:resv_acc=used_acc,resv_avg_notnull,+',
2412 'CDEF:cach_acc=resv_acc,cach_avg_notnull,+',
2413 'CDEF:free_acc=cach_acc,free_avg,+',
2414 "AREA:free_acc#$HalfGreen",
2415 "AREA:cach_acc#$HalfBlue",
2416 "AREA:resv_acc#$HalfYellow",
2417 "AREA:used_acc#$HalfRed",
2418 "LINE1:free_acc#$FullGreen:Free ",
2419 'GPRINT:free_min:MIN:%5.1lf%s Min,',
2420 'GPRINT:free_avg:AVERAGE:%5.1lf%s Avg,',
2421 'GPRINT:free_max:MAX:%5.1lf%s Max,',
2422 'GPRINT:free_avg:LAST:%5.1lf%s Last\n',
2423 "LINE1:cach_acc#$FullBlue:Cached ",
2424 'GPRINT:cach_min:MIN:%5.1lf%s Min,',
2425 'GPRINT:cach_avg:AVERAGE:%5.1lf%s Avg,',
2426 'GPRINT:cach_max:MAX:%5.1lf%s Max,',
2427 'GPRINT:cach_avg:LAST:%5.1lf%s Last\l',
2428 "LINE1:resv_acc#$FullYellow:Reserved",
2429 'GPRINT:resv_min:MIN:%5.1lf%s Min,',
2430 'GPRINT:resv_avg:AVERAGE:%5.1lf%s Avg,',
2431 'GPRINT:resv_max:MAX:%5.1lf%s Max,',
2432 'GPRINT:resv_avg:LAST:%5.1lf%s Last\n',
2433 "LINE1:used_acc#$FullRed:Used ",
2434 'GPRINT:used_min:MIN:%5.1lf%s Min,',
2435 'GPRINT:used_avg:AVERAGE:%5.1lf%s Avg,',
2436 'GPRINT:used_max:MAX:%5.1lf%s Max,',
2437 'GPRINT:used_avg:LAST:%5.1lf%s Last\l'
2439 tcp_connections => ['-v', 'Connections',
2440 'DEF:avg={file}:value:AVERAGE',
2441 'DEF:min={file}:value:MIN',
2442 'DEF:max={file}:value:MAX',
2443 "AREA:max#$HalfBlue",
2445 "LINE1:avg#$FullBlue:Connections",
2446 'GPRINT:min:MIN:%4.1lf Min,',
2447 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
2448 'GPRINT:max:MAX:%4.1lf Max,',
2449 'GPRINT:avg:LAST:%4.1lf Last\l'
2451 temperature => ['-v', 'Celsius',
2452 'DEF:temp_avg={file}:value:AVERAGE',
2453 'DEF:temp_min={file}:value:MIN',
2454 'DEF:temp_max={file}:value:MAX',
2455 'CDEF:average=temp_avg,0.2,*,PREV,UN,temp_avg,PREV,IF,0.8,*,+',
2456 "AREA:temp_max#$HalfRed",
2457 "AREA:temp_min#$Canvas",
2458 "LINE1:temp_avg#$FullRed:Temperature",
2459 'GPRINT:temp_min:MIN:%4.1lf Min,',
2460 'GPRINT:temp_avg:AVERAGE:%4.1lf Avg,',
2461 'GPRINT:temp_max:MAX:%4.1lf Max,',
2462 'GPRINT:temp_avg:LAST:%4.1lf Last\l'
2464 timeleft => ['-v', 'Minutes',
2465 'DEF:avg={file}:timeleft:AVERAGE',
2466 'DEF:min={file}:timeleft:MIN',
2467 'DEF:max={file}:timeleft:MAX',
2468 "AREA:max#$HalfBlue",
2470 "LINE1:avg#$FullBlue:Time left [min]",
2471 'GPRINT:min:MIN:%5.1lf%s Min,',
2472 'GPRINT:avg:AVERAGE:%5.1lf%s Avg,',
2473 'GPRINT:max:MAX:%5.1lf%s Max,',
2474 'GPRINT:avg:LAST:%5.1lf%s Last\l'
2476 time_offset => [ # NTPd
2477 'DEF:s_avg={file}:seconds:AVERAGE',
2478 'DEF:s_min={file}:seconds:MIN',
2479 'DEF:s_max={file}:seconds:MAX',
2480 "AREA:s_max#$HalfBlue",
2481 "AREA:s_min#$Canvas",
2482 "LINE1:s_avg#$FullBlue:{inst}",
2483 'GPRINT:s_min:MIN:%7.3lf%s Min,',
2484 'GPRINT:s_avg:AVERAGE:%7.3lf%s Avg,',
2485 'GPRINT:s_max:MAX:%7.3lf%s Max,',
2486 'GPRINT:s_avg:LAST:%7.3lf%s Last'
2488 if_octets => ['-v', 'Bits/s', '-l', '0',
2489 'DEF:out_min_raw={file}:tx:MIN',
2490 'DEF:out_avg_raw={file}:tx:AVERAGE',
2491 'DEF:out_max_raw={file}:tx:MAX',
2492 'DEF:inc_min_raw={file}:rx:MIN',
2493 'DEF:inc_avg_raw={file}:rx:AVERAGE',
2494 'DEF:inc_max_raw={file}:rx:MAX',
2495 'CDEF:out_min=out_min_raw,8,*',
2496 'CDEF:out_avg=out_avg_raw,8,*',
2497 'CDEF:out_max=out_max_raw,8,*',
2498 'CDEF:inc_min=inc_min_raw,8,*',
2499 'CDEF:inc_avg=inc_avg_raw,8,*',
2500 'CDEF:inc_max=inc_max_raw,8,*',
2501 'CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF',
2502 'CDEF:mytime=out_avg_raw,TIME,TIME,IF',
2503 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
2504 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
2505 'CDEF:out_avg_sample=out_avg_raw,UN,0,out_avg_raw,IF,sample_len,*',
2506 'CDEF:out_avg_sum=PREV,UN,0,PREV,IF,out_avg_sample,+',
2507 'CDEF:inc_avg_sample=inc_avg_raw,UN,0,inc_avg_raw,IF,sample_len,*',
2508 'CDEF:inc_avg_sum=PREV,UN,0,PREV,IF,inc_avg_sample,+',
2509 "AREA:out_avg#$HalfGreen",
2510 "AREA:inc_avg#$HalfBlue",
2511 "AREA:overlap#$HalfBlueGreen",
2512 "LINE1:out_avg#$FullGreen:Outgoing",
2513 'GPRINT:out_avg:AVERAGE:%5.1lf%s Avg,',
2514 'GPRINT:out_max:MAX:%5.1lf%s Max,',
2515 'GPRINT:out_avg:LAST:%5.1lf%s Last',
2516 'GPRINT:out_avg_sum:LAST:(ca. %5.1lf%sB Total)\l',
2517 "LINE1:inc_avg#$FullBlue:Incoming",
2518 #'GPRINT:inc_min:MIN:%5.1lf %s Min,',
2519 'GPRINT:inc_avg:AVERAGE:%5.1lf%s Avg,',
2520 'GPRINT:inc_max:MAX:%5.1lf%s Max,',
2521 'GPRINT:inc_avg:LAST:%5.1lf%s Last',
2522 'GPRINT:inc_avg_sum:LAST:(ca. %5.1lf%sB Total)\l'
2525 'DEF:cpufreq_avg={file}:value:AVERAGE',
2526 'DEF:cpufreq_min={file}:value:MIN',
2527 'DEF:cpufreq_max={file}:value:MAX',
2528 "AREA:cpufreq_max#$HalfBlue",
2529 "AREA:cpufreq_min#$Canvas",
2530 "LINE1:cpufreq_avg#$FullBlue:Frequency",
2531 'GPRINT:cpufreq_min:MIN:%5.1lf%s Min,',
2532 'GPRINT:cpufreq_avg:AVERAGE:%5.1lf%s Avg,',
2533 'GPRINT:cpufreq_max:MAX:%5.1lf%s Max,',
2534 'GPRINT:cpufreq_avg:LAST:%5.1lf%s Last\l'
2537 'DEF:multimeter_avg={file}:value:AVERAGE',
2538 'DEF:multimeter_min={file}:value:MIN',
2539 'DEF:multimeter_max={file}:value:MAX',
2540 "AREA:multimeter_max#$HalfBlue",
2541 "AREA:multimeter_min#$Canvas",
2542 "LINE1:multimeter_avg#$FullBlue:Multimeter",
2543 'GPRINT:multimeter_min:MIN:%4.1lf Min,',
2544 'GPRINT:multimeter_avg:AVERAGE:%4.1lf Average,',
2545 'GPRINT:multimeter_max:MAX:%4.1lf Max,',
2546 'GPRINT:multimeter_avg:LAST:%4.1lf Last\l'
2548 users => ['-v', 'Users',
2549 'DEF:users_avg={file}:users:AVERAGE',
2550 'DEF:users_min={file}:users:MIN',
2551 'DEF:users_max={file}:users:MAX',
2552 "AREA:users_max#$HalfBlue",
2553 "AREA:users_min#$Canvas",
2554 "LINE1:users_avg#$FullBlue:Users",
2555 'GPRINT:users_min:MIN:%4.1lf Min,',
2556 'GPRINT:users_avg:AVERAGE:%4.1lf Average,',
2557 'GPRINT:users_max:MAX:%4.1lf Max,',
2558 'GPRINT:users_avg:LAST:%4.1lf Last\l'
2560 voltage => ['-v', 'Voltage',
2561 'DEF:avg={file}:value:AVERAGE',
2562 'DEF:min={file}:value:MIN',
2563 'DEF:max={file}:value:MAX',
2564 "AREA:max#$HalfBlue",
2566 "LINE1:avg#$FullBlue:Voltage",
2567 'GPRINT:min:MIN:%5.1lf%sV Min,',
2568 'GPRINT:avg:AVERAGE:%5.1lf%sV Avg,',
2569 'GPRINT:max:MAX:%5.1lf%sV Max,',
2570 'GPRINT:avg:LAST:%5.1lf%sV Last\l'
2573 "DEF:avg={file}:value:AVERAGE",
2574 "DEF:min={file}:value:MIN",
2575 "DEF:max={file}:value:MAX",
2576 "AREA:max#$HalfBlue",
2578 "LINE1:avg#$FullBlue:Threads",
2579 'GPRINT:min:MIN:%5.1lf Min,',
2580 'GPRINT:avg:AVERAGE:%5.1lf Avg.,',
2581 'GPRINT:max:MAX:%5.1lf Max,',
2582 'GPRINT:avg:LAST:%5.1lf Last\l',
2584 vs_memory => ['-b', '1024', '-v', 'Bytes',
2585 "DEF:avg={file}:value:AVERAGE",
2586 "DEF:min={file}:value:MIN",
2587 "DEF:max={file}:value:MAX",
2588 "AREA:max#$HalfBlue",
2590 "LINE1:avg#$FullBlue:",
2591 'GPRINT:min:MIN:%5.1lf%sbytes Min,',
2592 'GPRINT:avg:AVERAGE:%5.1lf%sbytes Avg.,',
2593 'GPRINT:max:MAX:%5.1lf%sbytes Max,',
2594 'GPRINT:avg:LAST:%5.1lf%sbytes Last\l',
2597 "DEF:avg={file}:value:AVERAGE",
2598 "DEF:min={file}:value:MIN",
2599 "DEF:max={file}:value:MAX",
2600 "AREA:max#$HalfBlue",
2602 "LINE1:avg#$FullBlue:Processes",
2603 'GPRINT:min:MIN:%5.1lf Min,',
2604 'GPRINT:avg:AVERAGE:%5.1lf Avg.,',
2605 'GPRINT:max:MAX:%5.1lf Max,',
2606 'GPRINT:avg:LAST:%5.1lf Last\l',
2608 vmpage_number => ['-v', 'Pages',
2609 'DEF:avg={file}:value:AVERAGE',
2610 'DEF:min={file}:value:MIN',
2611 'DEF:max={file}:value:MAX',
2612 "AREA:max#$HalfBlue",
2614 "LINE1:avg#$FullBlue:Number",
2615 'GPRINT:min:MIN:%4.1lf Min,',
2616 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
2617 'GPRINT:max:MAX:%4.1lf Max,',
2618 'GPRINT:avg:LAST:%4.1lf Last\l'
2621 "DEF:minf_avg={file}:minflt:AVERAGE",
2622 "DEF:minf_min={file}:minflt:MIN",
2623 "DEF:minf_max={file}:minflt:MAX",
2624 "DEF:majf_avg={file}:majflt:AVERAGE",
2625 "DEF:majf_min={file}:majflt:MIN",
2626 "DEF:majf_max={file}:majflt:MAX",
2627 'CDEF:overlap=majf_avg,minf_avg,GT,minf_avg,majf_avg,IF',
2628 "AREA:majf_avg#$HalfGreen",
2629 "AREA:minf_avg#$HalfBlue",
2630 "AREA:overlap#$HalfBlueGreen",
2631 "LINE1:majf_avg#$FullGreen:Major",
2632 'GPRINT:majf_min:MIN:%5.1lf%s Min,',
2633 'GPRINT:majf_avg:AVERAGE:%5.1lf%s Avg,',
2634 'GPRINT:majf_max:MAX:%5.1lf%s Max,',
2635 'GPRINT:majf_avg:LAST:%5.1lf%s Last\l',
2636 "LINE1:minf_avg#$FullBlue:Minor",
2637 'GPRINT:minf_min:MIN:%5.1lf%s Min,',
2638 'GPRINT:minf_avg:AVERAGE:%5.1lf%s Avg,',
2639 'GPRINT:minf_max:MAX:%5.1lf%s Max,',
2640 'GPRINT:minf_avg:LAST:%5.1lf%s Last\l'
2643 "DEF:rpag_avg={file}:in:AVERAGE",
2644 "DEF:rpag_min={file}:in:MIN",
2645 "DEF:rpag_max={file}:in:MAX",
2646 "DEF:wpag_avg={file}:out:AVERAGE",
2647 "DEF:wpag_min={file}:out:MIN",
2648 "DEF:wpag_max={file}:out:MAX",
2649 'CDEF:overlap=wpag_avg,rpag_avg,GT,rpag_avg,wpag_avg,IF',
2650 "AREA:wpag_avg#$HalfGreen",
2651 "AREA:rpag_avg#$HalfBlue",
2652 "AREA:overlap#$HalfBlueGreen",
2653 "LINE1:wpag_avg#$FullGreen:OUT",
2654 'GPRINT:wpag_min:MIN:%5.1lf%s Min,',
2655 'GPRINT:wpag_avg:AVERAGE:%5.1lf%s Avg,',
2656 'GPRINT:wpag_max:MAX:%5.1lf%s Max,',
2657 'GPRINT:wpag_avg:LAST:%5.1lf%s Last\l',
2658 "LINE1:rpag_avg#$FullBlue:IN ",
2659 'GPRINT:rpag_min:MIN:%5.1lf%s Min,',
2660 'GPRINT:rpag_avg:AVERAGE:%5.1lf%s Avg,',
2661 'GPRINT:rpag_max:MAX:%5.1lf%s Max,',
2662 'GPRINT:rpag_avg:LAST:%5.1lf%s Last\l'
2664 vmpage_action => ['-v', 'Pages',
2665 'DEF:avg={file}:value:AVERAGE',
2666 'DEF:min={file}:value:MIN',
2667 'DEF:max={file}:value:MAX',
2668 "AREA:max#$HalfBlue",
2670 "LINE1:avg#$FullBlue:Number",
2671 'GPRINT:min:MIN:%4.1lf Min,',
2672 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
2673 'GPRINT:max:MAX:%4.1lf Max,',
2674 'GPRINT:avg:LAST:%4.1lf Last\l'
2676 virt_cpu_total => ['-v', 'Milliseconds',
2677 'DEF:avg_raw={file}:ns:AVERAGE',
2678 'DEF:min_raw={file}:ns:MIN',
2679 'DEF:max_raw={file}:ns:MAX',
2680 'CDEF:avg=avg_raw,1000000,/',
2681 'CDEF:min=min_raw,1000000,/',
2682 'CDEF:max=max_raw,1000000,/',
2683 "AREA:avg#$HalfBlue",
2684 "LINE1:avg#$FullBlue:CPU time",
2685 'GPRINT:min:MIN:%4.1lf Min,',
2686 'GPRINT:avg:AVERAGE:%4.1lf Avg,',
2687 'GPRINT:max:MAX:%4.1lf Max,',
2688 'GPRINT:avg:LAST:%4.1lf Last\l'
2691 $GraphDefs->{'if_multicast'} = $GraphDefs->{'ipt_packets'};
2692 $GraphDefs->{'if_tx_errors'} = $GraphDefs->{'if_rx_errors'};
2693 $GraphDefs->{'dns_qtype'} = $GraphDefs->{'dns_opcode'};
2694 $GraphDefs->{'dns_rcode'} = $GraphDefs->{'dns_opcode'};
2695 $GraphDefs->{'vmpage_io-memory'} = $GraphDefs->{'vmpage_io'};
2696 $GraphDefs->{'vmpage_io-swap'} = $GraphDefs->{'vmpage_io'};
2697 $GraphDefs->{'virt_cpu_total'} = $GraphDefs->{'virt_cpu_total'};
2699 $MetaGraphDefs->{'cpu'} = \&meta_graph_cpu;
2700 $MetaGraphDefs->{'dns_qtype'} = \&meta_graph_dns;
2701 $MetaGraphDefs->{'dns_rcode'} = \&meta_graph_dns;
2702 $MetaGraphDefs->{'if_rx_errors'} = \&meta_graph_if_rx_errors;
2703 $MetaGraphDefs->{'if_tx_errors'} = \&meta_graph_if_rx_errors;
2704 $MetaGraphDefs->{'memory'} = \&meta_graph_memory;
2705 $MetaGraphDefs->{'nfs_procedure'} = \&meta_graph_nfs_procedure;
2706 $MetaGraphDefs->{'ps_state'} = \&meta_graph_ps_state;
2707 $MetaGraphDefs->{'swap'} = \&meta_graph_swap;
2708 $MetaGraphDefs->{'mysql_commands'} = \&meta_graph_mysql_commands;
2709 $MetaGraphDefs->{'mysql_handler'} = \&meta_graph_mysql_commands;
2710 $MetaGraphDefs->{'tcp_connections'} = \&meta_graph_tcp_connections;
2711 $MetaGraphDefs->{'vmpage_number'} = \&meta_graph_vmpage_number;
2712 $MetaGraphDefs->{'vmpage_action'} = \&meta_graph_vmpage_action;
2713 } # load_graph_definitions
2715 sub meta_graph_generic_stack
2717 confess ("Wrong number of arguments") if (@_ != 2);
2720 my $sources = shift;
2723 my $timespan_str = _get_param_timespan ();
2724 my $timespan_int = (-1) * $ValidTimespan->{$timespan_str};
2726 $opts->{'title'} ||= 'Unknown title';
2727 $opts->{'rrd_opts'} ||= [];
2728 $opts->{'colors'} ||= {};
2730 my @cmd = ('-', '-a', 'PNG', '-s', $timespan_int,
2731 '-t', $opts->{'title'} || 'Unknown title',
2732 @RRDDefaultArgs, @{$opts->{'rrd_opts'}});
2734 my $max_inst_name = 0;
2737 for ($i = 0; $i < @$sources; $i++)
2739 my $tmp = $sources->[$i]->{'name'};
2740 $tmp =~ tr/A-Za-z0-9\-_/_/c;
2741 $vnames[$i] = $i . $tmp;
2744 for ($i = 0; $i < @$sources; $i++)
2746 my $inst_data = $sources->[$i];
2747 my $inst_name = $inst_data->{'name'} || confess;
2748 my $file = $inst_data->{'file'} || confess;
2749 my $vname = $vnames[$i];
2751 if (length ($inst_name) > $max_inst_name)
2753 $max_inst_name = length ($inst_name);
2756 confess ("No such file: $file") if (!-e $file);
2759 qq#DEF:${vname}_min=$file:value:MIN#,
2760 qq#DEF:${vname}_avg=$file:value:AVERAGE#,
2761 qq#DEF:${vname}_max=$file:value:MAX#,
2762 qq#CDEF:${vname}_nnl=${vname}_avg,UN,0,${vname}_avg,IF#);
2766 my $vname = $vnames[@vnames - 1];
2768 push (@cmd, qq#CDEF:${vname}_stk=${vname}_nnl#);
2770 for (my $i = 1; $i < @$sources; $i++)
2772 my $vname0 = $vnames[@vnames - ($i + 1)];
2773 my $vname1 = $vnames[@vnames - $i];
2775 push (@cmd, qq#CDEF:${vname0}_stk=${vname0}_nnl,${vname1}_stk,+#);
2778 for (my $i = 0; $i < @$sources; $i++)
2780 my $inst_data = $sources->[$i];
2781 my $inst_name = $inst_data->{'name'};
2783 my $vname = $vnames[$i];
2785 my $legend = sprintf ('%-*s', $max_inst_name, $inst_name);
2790 my $number_format = $opts->{'number_format'} || '%6.1lf';
2792 if (exists ($opts->{'colors'}{$inst_name}))
2794 $line_color = $opts->{'colors'}{$inst_name};
2795 $area_color = _string_to_color ($line_color);
2799 $area_color = _get_random_color ();
2800 $line_color = _color_to_string ($area_color);
2802 $area_color = _color_to_string (_get_faded_color ($area_color));
2804 push (@cmd, qq(AREA:${vname}_stk#$area_color),
2805 qq(LINE1:${vname}_stk#$line_color:$legend),
2806 qq(GPRINT:${vname}_min:MIN:$number_format Min,),
2807 qq(GPRINT:${vname}_avg:AVERAGE:$number_format Avg,),
2808 qq(GPRINT:${vname}_max:MAX:$number_format Max,),
2809 qq(GPRINT:${vname}_avg:LAST:$number_format Last\\l),
2814 if (my $errmsg = RRDs::error ())
2816 confess ("RRDs::graph: $errmsg");
2818 } # meta_graph_generic_stack
2822 confess ("Wrong number of arguments") if (@_ != 5);
2826 my $plugin_instance = shift;
2828 my $type_instances = shift;
2833 $opts->{'title'} = "$host/$plugin"
2834 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
2836 $opts->{'rrd_opts'} = ['-v', 'Percent'];
2846 'system' => 'ff0000',
2847 'softirq' => 'ff00ff',
2848 'interrupt' => 'a000a0',
2852 _custom_sort_arrayref ($type_instances,
2853 [qw(idle nice user wait system softirq interrupt steal)]);
2855 for (@$type_instances)
2859 my $title = $opts->{'title'};
2863 if (-e "$_/$title-$inst.rrd")
2865 $file = "$_/$title-$inst.rrd";
2869 confess ("No file found for $title") if ($file eq '');
2877 } # for (@$type_instances)
2879 return (meta_graph_generic_stack ($opts, $sources));
2884 confess ("Wrong number of arguments") if (@_ != 5);
2888 my $plugin_instance = shift;
2890 my $type_instances = shift;
2895 $opts->{'title'} = "$host/$plugin"
2896 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
2898 $opts->{'rrd_opts'} = ['-v', 'Queries/s'];
2902 @$type_instances = sort @$type_instances;
2904 $opts->{'colors'} = _get_n_colors ($type_instances);
2906 for (@$type_instances)
2910 my $title = $opts->{'title'};
2914 if (-e "$_/$title-$inst.rrd")
2916 $file = "$_/$title-$inst.rrd";
2920 confess ("No file found for $title") if ($file eq '');
2928 } # for (@$type_instances)
2930 return (meta_graph_generic_stack ($opts, $sources));
2933 sub meta_graph_memory
2935 confess ("Wrong number of arguments") if (@_ != 5);
2939 my $plugin_instance = shift;
2941 my $type_instances = shift;
2946 $opts->{'title'} = "$host/$plugin"
2947 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
2948 $opts->{'number_format'} = '%5.1lf%s';
2950 $opts->{'rrd_opts'} = ['-b', '1024', '-v', 'Bytes'];
2957 'cached' => '0000ff',
2958 'buffered' => 'ffb000',
2962 _custom_sort_arrayref ($type_instances,
2963 [qw(free cached buffered used)]);
2965 for (@$type_instances)
2969 my $title = $opts->{'title'};
2973 if (-e "$_/$title-$inst.rrd")
2975 $file = "$_/$title-$inst.rrd";
2979 confess ("No file found for $title") if ($file eq '');
2987 } # for (@$type_instances)
2989 return (meta_graph_generic_stack ($opts, $sources));
2990 } # meta_graph_memory
2992 sub meta_graph_if_rx_errors
2994 confess ("Wrong number of arguments") if (@_ != 5);
2998 my $plugin_instance = shift;
3000 my $type_instances = shift;
3005 $opts->{'title'} = "$host/$plugin"
3006 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3007 $opts->{'number_format'} = '%5.2lf';
3008 $opts->{'rrd_opts'} = ['-v', 'Errors/s'];
3012 for (sort @$type_instances)
3016 my $title = $opts->{'title'};
3020 if (-e "$_/$title-$inst.rrd")
3022 $file = "$_/$title-$inst.rrd";
3026 confess ("No file found for $title") if ($file eq '');
3034 } # for (@$type_instances)
3036 return (meta_graph_generic_stack ($opts, $sources));
3037 } # meta_graph_if_rx_errors
3039 sub meta_graph_mysql_commands
3041 confess ("Wrong number of arguments") if (@_ != 5);
3045 my $plugin_instance = shift;
3047 my $type_instances = shift;
3052 $opts->{'title'} = "$host/$plugin"
3053 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3054 $opts->{'number_format'} = '%5.2lf';
3058 for (sort @$type_instances)
3062 my $title = $opts->{'title'};
3066 if (-e "$_/$title-$inst.rrd")
3068 $file = "$_/$title-$inst.rrd";
3072 confess ("No file found for $title") if ($file eq '');
3080 } # for (@$type_instances)
3082 return (meta_graph_generic_stack ($opts, $sources));
3083 } # meta_graph_mysql_commands
3085 sub meta_graph_nfs_procedure
3087 confess ("Wrong number of arguments") if (@_ != 5);
3091 my $plugin_instance = shift;
3093 my $type_instances = shift;
3098 $opts->{'title'} = "$host/$plugin"
3099 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3100 $opts->{'number_format'} = '%5.1lf%s';
3104 for (sort @$type_instances)
3108 my $title = $opts->{'title'};
3112 if (-e "$_/$title-$inst.rrd")
3114 $file = "$_/$title-$inst.rrd";
3118 confess ("No file found for $title") if ($file eq '');
3126 } # for (@$type_instances)
3128 return (meta_graph_generic_stack ($opts, $sources));
3129 } # meta_graph_nfs_procedure
3131 sub meta_graph_ps_state
3133 confess ("Wrong number of arguments") if (@_ != 5);
3137 my $plugin_instance = shift;
3139 my $type_instances = shift;
3144 $opts->{'title'} = "$host/$plugin"
3145 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3146 $opts->{'rrd_opts'} = ['-v', 'Processes'];
3152 'Running' => '00e000',
3153 'Sleeping' => '0000ff',
3154 'Paging' => 'ffb000',
3155 'Zombies' => 'ff0000',
3156 'Blocked' => 'ff00ff',
3157 'Stopped' => 'a000a0'
3160 _custom_sort_arrayref ($type_instances,
3161 [qw(paging blocked zombies stopped running sleeping)]);
3163 for (@$type_instances)
3167 my $title = $opts->{'title'};
3171 if (-e "$_/$title-$inst.rrd")
3173 $file = "$_/$title-$inst.rrd";
3177 confess ("No file found for $title") if ($file eq '');
3181 name => ucfirst ($inst),
3185 } # for (@$type_instances)
3187 return (meta_graph_generic_stack ($opts, $sources));
3188 } # meta_graph_ps_state
3192 confess ("Wrong number of arguments") if (@_ != 5);
3196 my $plugin_instance = shift;
3198 my $type_instances = shift;
3203 $opts->{'title'} = "$host/$plugin"
3204 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3205 $opts->{'number_format'} = '%5.1lf%s';
3206 $opts->{'rrd_opts'} = ['-v', 'Bytes'];
3213 'Cached' => '0000ff',
3214 'Reserved' => 'ffb000',
3218 _custom_sort_arrayref ($type_instances,
3219 [qw(free cached reserved used)]);
3221 for (@$type_instances)
3225 my $title = $opts->{'title'};
3229 if (-e "$_/$title-$inst.rrd")
3231 $file = "$_/$title-$inst.rrd";
3235 confess ("No file found for $title") if ($file eq '');
3239 name => ucfirst ($inst),
3243 } # for (@$type_instances)
3245 return (meta_graph_generic_stack ($opts, $sources));
3248 sub meta_graph_tcp_connections
3250 confess ("Wrong number of arguments") if (@_ != 5);
3254 my $plugin_instance = shift;
3256 my $type_instances = shift;
3261 $opts->{'title'} = "$host/$plugin"
3262 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3263 $opts->{'number_format'} = '%6.2lf';
3265 $opts->{'rrd_opts'} = ['-v', 'Connections'];
3271 ESTABLISHED => '00e000',
3272 SYN_SENT => '00e0ff',
3273 SYN_RECV => '00e0a0',
3274 FIN_WAIT1 => 'f000f0',
3275 FIN_WAIT2 => 'f000a0',
3276 TIME_WAIT => 'ffb000',
3278 CLOSE_WAIT => '0000a0',
3279 LAST_ACK => '000080',
3284 _custom_sort_arrayref ($type_instances,
3285 [reverse qw(ESTABLISHED SYN_SENT SYN_RECV FIN_WAIT1 FIN_WAIT2 TIME_WAIT CLOSE
3286 CLOSE_WAIT LAST_ACK CLOSING LISTEN)]);
3288 for (@$type_instances)
3292 my $title = $opts->{'title'};
3296 if (-e "$_/$title-$inst.rrd")
3298 $file = "$_/$title-$inst.rrd";
3302 confess ("No file found for $title") if ($file eq '');
3310 } # for (@$type_instances)
3312 return (meta_graph_generic_stack ($opts, $sources));
3313 } # meta_graph_tcp_connections
3315 sub meta_graph_vmpage_number
3317 confess ("Wrong number of arguments") if (@_ != 5);
3321 my $plugin_instance = shift;
3323 my $type_instances = shift;
3328 $opts->{'title'} = "$host/$plugin"
3329 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3330 $opts->{'number_format'} = '%6.2lf';
3332 $opts->{'rrd_opts'} = ['-v', 'Pages'];
3338 anon_pages => '00e000',
3341 file_pages => 'f000f0',
3343 page_table_pages => 'ffb000',
3345 unstable => '0000a0',
3346 writeback => 'ff0000',
3349 _custom_sort_arrayref ($type_instances,
3350 [reverse qw(anon_pages bounce dirty file_pages mapped page_table_pages slab unstable writeback)]);
3352 for (@$type_instances)
3356 my $title = $opts->{'title'};
3360 if (-e "$_/$title-$inst.rrd")
3362 $file = "$_/$title-$inst.rrd";
3366 confess ("No file found for $title") if ($file eq '');
3374 } # for (@$type_instances)
3376 return (meta_graph_generic_stack ($opts, $sources));
3377 } # meta_graph_vmpage_number
3379 sub meta_graph_vmpage_action
3381 confess ("Wrong number of arguments") if (@_ != 5);
3385 my $plugin_instance = shift;
3387 my $type_instances = shift;
3392 $opts->{'title'} = "$host/$plugin"
3393 . (defined ($plugin_instance) ? "-$plugin_instance" : '') . "/$type";
3394 $opts->{'number_format'} = '%6.2lf';
3396 $opts->{'rrd_opts'} = ['-v', 'Pages'];
3402 activate => '00e000',
3403 deactivate => '00e0ff',
3407 scan_direct => 'ffb000',
3408 scan_kswapd => '0000f0',
3412 _custom_sort_arrayref ($type_instances,
3413 [reverse qw(activate deactivate alloc free refill scan_direct scan_kswapd steal)]);
3415 for (@$type_instances)
3419 my $title = $opts->{'title'};
3423 if (-e "$_/$title-$inst.rrd")
3425 $file = "$_/$title-$inst.rrd";
3429 confess ("No file found for $title") if ($file eq '');
3437 } # for (@$type_instances)
3439 return (meta_graph_generic_stack ($opts, $sources));
3440 } # meta_graph_vmpage_action
3441 # vim: shiftwidth=2:softtabstop=2:tabstop=8