Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,870 questions

51,793 answers

573 users

How to get information about each logical CPU core in Node.js

1 Answer

0 votes
const os = require('os');

console.log(os.cpus());
  
  
       
/*
run:
     
[
  {
    model: 'Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz',
    speed: 3600,
    times: {
      user: 93834673,
      nice: 0,
      sys: 6745265,
      idle: 6473635,
      irq: 9001083
    }
  },
  {
    model: 'Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz',
    speed: 3600,
    times: {
      user: 1236451,
      nice: 0,
      sys: 9873021,
      idle: 6435212,
      irq: 7464910
    }
  },
  ...
  }
]
   
*/

 



answered Mar 10, 2020 by avibootz

Related questions

1 answer 241 views
1 answer 434 views
1 answer 139 views
1 answer 189 views
1 answer 126 views
2 answers 161 views
4 answers 521 views
...