From: Dietmar Maurer Date: Mon, 15 Oct 2012 04:33:43 +0000 (+0200) Subject: fix bug in read_memory_usage X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=845f01b6c46da03f1a31fd808d4bdcd64c893fb9 fix bug in read_memory_usage --- diff --git a/Makefile b/Makefile index b7dfb0f..3b26eb0 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ RELEASE=2.2 VERSION=1.0 -PKGREL=34 +PKGREL=35 PACKAGE=libpve-common-perl diff --git a/data/PVE/ProcFSTools.pm b/data/PVE/ProcFSTools.pm index bdb6e52..d501082 100644 --- a/data/PVE/ProcFSTools.pm +++ b/data/PVE/ProcFSTools.pm @@ -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; diff --git a/debian/changelog b/debian/changelog index 94b1918..5ebd7b4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libpve-common-perl (1.0-35) unstable; urgency=low + + * fix bug in read_memory_usage + + -- Proxmox Support Team Mon, 15 Oct 2012 06:32:30 +0200 + libpve-common-perl (1.0-34) unstable; urgency=low * file_read_firstline: avoid warning with empty files