summaryrefslogtreecommitdiff
path: root/html
diff options
context:
space:
mode:
Diffstat (limited to 'html')
-rw-r--r--html/memory.tmpl14
1 files changed, 11 insertions, 3 deletions
diff --git a/html/memory.tmpl b/html/memory.tmpl
index bfc8fa6..1d1d980 100644
--- a/html/memory.tmpl
+++ b/html/memory.tmpl
@@ -33,7 +33,7 @@
USE my_graph = GD.Graph.lines(500,300);
# Xsteps
- steps = param.stack.size / 5 | format('%d');
+ steps = param.stack.size div 5;
label = gettext('Memory usage since');
label = "${label} ${d.first.first}";
@@ -64,13 +64,21 @@
# ------------------- Piegraph für Speicher
FILTER null;
name = 'memory_now';
+ MemTotal = data.MemTotal div 1024;
+ Active = data.Active div 1024;
+ Cached = data.Cached div 1024;
+ Inactive = data.Inactive div 1024;
+ MemFree = data.MemFree div 1024;
+ Buffers = data.Buffers div 1024;
+
d2 = [
- ["Active ${data.Active}","Cached ${data.Cached}","Inactive ${data.Inactive}","MemFree ${data.MemFree}","Buffers ${data.Buffers}"],
+ ["Active ${Active} MB","Cached ${Cached} MB","Inactive ${Inactive} MB","MemFree ${MemFree} MB","Buffers ${Buffers} MB"],
[ data.Active, data.Cached, data.Inactive, data.MemFree, data.Buffers]
];
+
USE my_graph = GD.Graph.pie(400, 300);
label = gettext('Total Memory');
- label = "${label} ${data.MemTotal}";
+ label = "${label} ${MemTotal} MB";
my_graph.set(
title => label,
axislabelclr => 'black',