add cpu_info.cores_per_socket
This commit is contained in:
1 parent
e4c00a7b92
commit
51b607866f
9 files changed
+17
-4
No files matched your search
@@ -509,6 +509,10 @@ use vars qw(%classes %cmds);
|
||||
name => 'total_sockets', type => 'Int',
|
||||
desc => 'Total CPU sockets (physical)',
|
||||
},
|
||||
{
|
||||
name => 'cores_per_socket', type => 'Int',
|
||||
desc => 'Number of CPU cores per CPU socket',
|
||||
},
|
||||
],
|
||||
Uptime => [
|
||||
{
|
||||
|
||||
@@ -66,6 +66,7 @@ public class CpuInfo extends SigarCommandBase {
|
||||
println("Total CPUs....." + info.getTotalCores());
|
||||
if (info.getTotalCores() != info.getTotalSockets()) {
|
||||
println("Physical CPUs.." + info.getTotalSockets());
|
||||
println("Cores per CPU.." + info.getCoresPerSocket());
|
||||
}
|
||||
|
||||
if (cacheSize != Sigar.FIELD_NOTIMPL) {
|
||||
|
||||
Reference in new issue
Block a user