]> git.proxmox.com Git - pve-common.git/commitdiff
return number of sockets in read_cpuinfo
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 26 Mar 2012 05:54:29 +0000 (07:54 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 26 Mar 2012 05:54:29 +0000 (07:54 +0200)
Makefile
data/PVE/ProcFSTools.pm
debian/changelog

index b244fa50d707f52ba32a119eb01cfd65d5abf78e..dd457b3bf17bdacab41ba335730c45379f02ec4f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 RELEASE=2.0
 
 VERSION=1.0
-PKGREL=21
+PKGREL=22
 
 PACKAGE=libpve-common-perl
 
index 723fd422e19347c1fb49f20821983f2527a1b27a..bdb6e52abe86a85e78a2e71c371117138b50cfcc 100644 (file)
@@ -20,6 +20,7 @@ sub read_cpuinfo {
        model => 'unknown',
        mhz => 0,
        cpus => 1,
+       sockets => 1,
     };
 
     my $fh = IO::File->new ($fn, "r");
@@ -35,7 +36,11 @@ sub read_cpuinfo {
            $res->{mhz} = $1 if !$res->{mhz};
        } 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};
        }
+
     }
 
     $res->{cpus} = $count;
index 3844561dd3de89d8a4d0cba08c0ca9834049b8af..85277a4f42f6a1c8c667ec10f110d0d7d1c2e573 100644 (file)
@@ -1,3 +1,9 @@
+libpve-common-perl (1.0-22) unstable; urgency=low
+
+  * return number of sockets in read_cpuinfo
+
+ -- Proxmox Support Team <support@proxmox.com>  Mon, 26 Mar 2012 07:53:35 +0200
+
 libpve-common-perl (1.0-21) unstable; urgency=low
 
   * use Digest::SHA instead of Digest::SHA1