query KSM page sharing
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 1 Feb 2013 08:05:18 +0000 (09:05 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 1 Feb 2013 08:05:18 +0000 (09:05 +0100)
bump version to 1.0-45

Makefile
data/PVE/ProcFSTools.pm
debian/changelog

index 5a96338..2972ec9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 RELEASE=2.3
 
 VERSION=1.0
-PKGREL=44
+PKGREL=45
 
 PACKAGE=libpve-common-perl
 
index 4c1591c..2c2b376 100644 (file)
@@ -175,6 +175,7 @@ sub read_meminfo {
        memtotal => 0,
        memfree => 0,
        memused => 0,
+       memshared => 0,
        swaptotal => 0,
        swapfree => 0,
        swapused => 0,
@@ -199,6 +200,9 @@ sub read_meminfo {
     $res->{swapfree} = $d->{swapfree};
     $res->{swapused} = $res->{swaptotal} - $res->{swapfree};
 
+    my $spages = PVE::Tools::file_read_firstline("/sys/kernel/mm/ksm/pages_sharing");
+    $res->{memshared} = int($spages) * 4096;
+
     return $res;
 }
 
index e0b8e02..6b434fa 100644 (file)
@@ -1,3 +1,9 @@
+libpve-common-perl (1.0-45) unstable; urgency=low
+
+  * read_meminfo: query KSM page sharing
+
+ -- Proxmox Support Team <support@proxmox.com>  Fri, 01 Feb 2013 09:04:27 +0100
+
 libpve-common-perl (1.0-44) unstable; urgency=low
 
   * vlan changes: use ip command instead of old vconfig, activate gvrp