Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: How about more than one CPU instance when using systeminformation? #864

Open
liaodalin19903 opened this issue Nov 1, 2023 · 3 comments

Comments

@liaodalin19903
Copy link

Is your feature request related to a problem? Please describe.

as we know when using systeminformation to get CPU information like below:

const si = require('systeminformation');

// promises style - new since version 3
si.cpu()
  .then(data => console.log(data))
  .catch(error => console.error(error));

it will get response :

{
  manufacturer: 'Apple',
  brand: 'M1',
  vendor: 'Apple',
  family: '458787763',
  model: '',
  stepping: '2',
  revision: '',
  voltage: '',
  speed: 2.4,
  speedMin: 2.4,
  speedMax: 2.4,
  governor: '',
  cores: 8,
  physicalCores: 8,
  performanceCores: 4,
  efficiencyCores: 4,
  processors: 1,
  socket: 'SOC',
  flags: '',
  virtualization: true,
  cache: { l1d: 131072, l1i: 65536, l2: 4194304, l3: null }
}

but how about 2 CPUs, what will return?

Describe the solution you'd like

I mean if it response a list, it will be more reasonable.

[
{
  manufacturer: 'Apple',
  brand: 'M1',
  vendor: 'Apple',
  family: '458787763',
  model: '',
  stepping: '2',
  revision: '',
  voltage: '',
  speed: 2.4,
  speedMin: 2.4,
  speedMax: 2.4,
  governor: '',
  cores: 8,
  physicalCores: 8,
  performanceCores: 4,
  efficiencyCores: 4,
  processors: 1,
  socket: 'SOC',
  flags: '',
  virtualization: true,
  cache: { l1d: 131072, l1i: 65536, l2: 4194304, l3: null }
}
]
@sebhildebrandt
Copy link
Owner

@liaodalin19903 thank you for your proposal!

I need to think about that because in 99% of all cases we only would habe 1 CPU and at least we can detect multiple CPUS and this is reported in si.cpu(). I have some more questions:

  • if there are more CPUs - do you have scenarios where there are multiple different CPUs?
  • on MacOS I guess this will never be the case, right?
  • if yes, can you provide the following information (for linux and windows) on one of those machines
# WINDOWS PowerShell
Get-CimInstance Win32_processor | select Name, Revision, L2CacheSize, L3CacheSize, Manufacturer, MaxClockSpeed, Description, UpgradeMethod, Caption, NumberOfLogicalProcessors, NumberOfCores | fl

# LINUX
lscpu; 
echo -n "Governor: "; cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 2>/dev/null;

Thank you in advance!

@juukee
Copy link

juukee commented Apr 8, 2024

I am an IT network administrator and I need to know detailed information about multiple CPUs on my computer. How can I solve this situation? Looking forward to your reply

@juukee
Copy link

juukee commented Apr 8, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants