Physical IDs may not start at 0.
bump version to 1.0-41
-RELEASE=2.2
+RELEASE=2.3
VERSION=1.0
-PKGREL=40
+PKGREL=41
PACKAGE=libpve-common-perl
my $fh = IO::File->new ($fn, "r");
return $res if !$fh;
+ my $idhash = {};
my $count = 0;
while (defined(my $line = <$fh>)) {
if ($line =~ m/^processor\s*:\s*\d+\s*$/i) {
} elsif ($line =~ m/^flags\s*:.*(vmx|svm)/) {
$res->{hvm} = 1; # Hardware Virtual Machine (Intel VT / AMD-V)
} elsif ($line =~ m/^physical id\s*:\s*(\d+)\s*$/i) {
- my $sid = $1 + 1;
- $res->{sockets} = $sid if $sid > $res->{sockets};
+ $idhash->{$1} = 1;
}
-
}
+ $res->{sockets} = scalar(keys %$idhash) || 1;
+
$res->{cpus} = $count;
$fh->close;
+libpve-common-perl (1.0-41) unstable; urgency=low
+
+ * correctly count physical sockets
+
+ -- Proxmox Support Team <support@proxmox.com> Mon, 31 Dec 2012 08:24:40 +0100
+
libpve-common-perl (1.0-40) unstable; urgency=low
* run_command: implement afterfork callback