Change the "free memory" graph to add buffers and cache and add a "free swap" graph

3.2
Richard Fuchs 15 years ago
parent ae3526f562
commit 39c1eb7b59

@ -43,8 +43,14 @@ sub system : Local {
$c->stash->{template} = 'tt/dashboard.tt';
my @plotdata = ();
push @plotdata, {name=>"mem", title=>"Free Memory",
url=>"/rrd/get?path=memory/memory-free.rrd", si=>1};
push @plotdata, {name=>"mem", title=>"Free Physical Memory",
url=>[qw(
/rrd/get?path=memory/memory-free.rrd
/rrd/get?path=memory/memory-cached.rrd
/rrd/get?path=memory/memory-buffered.rrd
)], si=>1};
push @plotdata, {name=>"swap", title=>"Free Swap Memory",
url=>"/rrd/get?path=swap/swap-free.rrd", si=>1};
push @plotdata, {name=>"load", title=>"Load",
url=>"/rrd/get?path=load/load.rrd", si=>0};
push @plotdata, {name=>"rdisk", title=>"Root Disk",

@ -71,7 +71,11 @@
}
[% FOREACH item IN plotdata %]
fname_update(["[% item.url %]"], "plot_[% item.name %]", [% item.si ? "true" : "false" %]);
fname_update([
[% FOREACH url IN item.url %]
"[% url %]",
[% END %]
], "plot_[% item.name %]", [% item.si ? "true" : "false" %]);
[% END %]
</script>

Loading…
Cancel
Save