5
0
mirror of git://git.proxmox.com/git/pve-common.git synced 2025-01-09 05:17:35 +03:00

fix bug in read_memory_usage

This commit is contained in:
Dietmar Maurer 2012-10-15 06:33:43 +02:00
parent 88955a2e69
commit 845f01b6c4
3 changed files with 8 additions and 2 deletions

View File

@ -1,7 +1,7 @@
RELEASE=2.2
VERSION=1.0
PKGREL=34
PKGREL=35
PACKAGE=libpve-common-perl

View 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;

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
libpve-common-perl (1.0-35) unstable; urgency=low
* fix bug in read_memory_usage
-- Proxmox Support Team <support@proxmox.com> 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