]> git.proxmox.com Git - pve-common.git/blobdiff - data/PVE/ProcFSTools.pm
fix bug in read_memory_usage
[pve-common.git] / data / PVE / ProcFSTools.pm
index bdb6e52abe86a85e78a2e71c371117138b50cfcc..d501082f2efe07e0a5a325d01495ff17f6c8b53a 100644 (file)
@@ -210,7 +210,7 @@ sub read_memory_usage {
 
     my $line = PVE::Tools::file_read_firstline("/proc/$$/statm");
 
-    if ($line =~ m/^(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+/) {
+    if ($line =~ m/^(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s*/) {
        $res->{size} = $1*$ps;
        $res->{resident} = $2*$ps;
        $res->{shared} = $3*$ps;