Commit c60a4435 authored by Dietmar Maurer's avatar Dietmar Maurer

display KSM sharing on node status panel

parent 7e9bf4e6
......@@ -246,6 +246,11 @@ __PACKAGE__->register_method({
total => $meminfo->{memtotal},
used => $meminfo->{memused},
};
$res->{ksm} = {
shared => $meminfo->{memshared},
};
$res->{swap} = {
free => $meminfo->{swapfree},
total => $meminfo->{swaptotal},
......
......@@ -25,6 +25,10 @@ Ext.define('PVE.node.StatusView', {
return per.toFixed(2) + "%";
};
var render_ksm = function(value) {
return PVE.Utils.format_size(value.shared);
};
var render_meminfo = function(value) {
var per = (value.used / value.total)*100;
var text = "<div>Total: " + PVE.Utils.format_size(value.total) + "</div>" +
......@@ -40,6 +44,7 @@ Ext.define('PVE.node.StatusView', {
wait: { header: 'IO delay', required: true, renderer: render_cpu },
memory: { header: 'RAM usage', required: true, renderer: render_meminfo },
swap: { header: 'SWAP usage', required: true, renderer: render_meminfo },
ksm: { header: 'KSM sharing', required: true, renderer: render_ksm },
rootfs: { header: 'HD space (root)', required: true, renderer: render_meminfo },
pveversion: { header: 'PVE Manager version', required: true },
kversion: { header: 'Kernel version', required: true }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment