diff options
| author | Andreas Brachold <vdr07@deltab.de> | 2009-12-19 13:50:17 +0000 |
|---|---|---|
| committer | Andreas Brachold <vdr07@deltab.de> | 2009-12-19 13:50:17 +0000 |
| commit | ac6040823f365ef7bb6d455d070aaecec8dc744a (patch) | |
| tree | c46d3e883752f58773b7a12cbc226b6842237b02 /skins/stone_flat/memory.tmpl | |
| parent | 65ababad8a7ef911f29a29cfcac775ad26e68445 (diff) | |
| download | xxv-ac6040823f365ef7bb6d455d070aaecec8dc744a.tar.gz xxv-ac6040823f365ef7bb6d455d070aaecec8dc744a.tar.bz2 | |
* CHANNELS: allow query a compact list ( by cmd=clist&compact=1 )
* STATUS: Refactoring output (network/filesys/memory/vitals)
* STREAM: Fix SMB streaming (div by zero)
* html/xstyle: footer updated
* xstyle: css fix correct z-index on schema for timemarker
* jason: use one loading mask for many tasks
* jason: timer self updating if new timer created
* jason: stream allow external video player
* jason: use compact channel list (reduce memory footprint)
* update translations
Diffstat (limited to 'skins/stone_flat/memory.tmpl')
| -rw-r--r-- | skins/stone_flat/memory.tmpl | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/skins/stone_flat/memory.tmpl b/skins/stone_flat/memory.tmpl index 2fc2f1d..27b01fb 100644 --- a/skins/stone_flat/memory.tmpl +++ b/skins/stone_flat/memory.tmpl @@ -9,43 +9,42 @@ <?% USE date; statusfiles = []; + fields = data.shift; FILTER null; name = 'memory_stat'; swapdata = []; activedata = []; cacheddata = []; - buffersdata = []; + inactivedata = []; timestamps = []; - FOREACH item = param.stack; - t = date.format(item.timestamp, '%H:%M:%S'); + FOREACH row = data; + t = date.format(row.6, '%H:%M'); timestamps.push(t); - swapdata.push(item.memory.SwapTotal); - activedata.push(item.memory.Active); - cacheddata.push(item.memory.Cached); - buffersdata.push(item.memory.Buffers); + activedata.push(row.2 / (1024)); + inactivedata.push(row.3 / (1024)); + cacheddata.push(row.4 / (1024)); + swapdata.push(row.5 / (1024)); END; - # Maximum wert - max = param.stack.last.memory.MemTotal; - # Data ... d = [ timestamps , - swapdata , - cacheddata , activedata , - buffersdata , + inactivedata + cacheddata , + swapdata ]; - USE my_graph = GD.Graph.lines(575,300); + USE my_graph = GD.Graph.lines(575,375); # Xsteps - steps = param.stack.size div 5; + steps = data.size div 5; label = gettext('Memory usage since'); - y_label = gettext('Memory usage in bytes'), - label = "${label} ${d.first.first} (${y_label})"; + label_y = gettext('Memory usage in MB') + label = "${label} ${d.first.first} (${label_y})"; + my_graph.set( x_label_skip => steps, x_long_ticks => 1, @@ -54,9 +53,9 @@ line_width => 2, box_axis => 1, - boxclr => '#FFFFCC', + boxclr => '#FFFFFF', fgclr => '#BBBBBB' - legend_placement => 'RD', + legend_placement => '>BO', legend_spacing => 5, ); my_graph.set_title_font(param.font,10); @@ -64,28 +63,29 @@ my_graph.set_x_label_font(param.font,10); my_graph.set_x_axis_font(param.font,6); my_graph.set_y_axis_font(param.font,6); - my_graph.set_legend( 'Swap', 'Active', 'Cached', 'Buffers'); + my_graph.set_legend( fields.2, fields.3, fields.4, fields.5); file = writefile("status_${name}.gif", my_graph.plot(d).gif ); - statusfiles.push([label, file]); + statusfiles.push([ label , file ]); END; # ------------------- Piegraph für Speicher + row = data.last; 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; + MemTotal = row.0 div 1024; + MemFree = row.1 div 1024; + Active = row.2 div 1024; + Cached = row.4 div 1024; + Inactive = row.3 div 1024; + Swapped = row.5 div 1024; d2 = [ - ["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] + [ "${fields.2} ${Active} MB","${fields.3} ${Inactive} MB","${fields.4} ${Cached} MB","${fields.5} ${Swapped} MB","${fields.1} ${MemFree} MB"], + [ row.2, row.3, row.4, row.5, row.1] ]; - USE my_graph = GD.Graph.pie(500, 300); - label = gettext('Total Memory'); + USE my_graph = GD.Graph.pie(300, 200); + label = fields.0; label = "${label} ${MemTotal} MB"; my_graph.set( axislabelclr => 'black', @@ -96,7 +96,7 @@ my_graph.set_label_font(param.font,10); my_graph.set_value_font(param.font,8); file = writefile("status_${name}.gif", my_graph.plot(d2).gif ); - statusfiles.push([label, file]); + statusfiles.push([ label , file ]); END; %?> |
