Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 743 Bytes

README.md

File metadata and controls

15 lines (10 loc) · 743 Bytes

cpuinfo Build Status

Hopefully an improvement to os.cpus()

Instead of returning undefined on errors, this package returns any information it is able to collect using standard (err, result) callbacks.

The individual methods of getting this information are also exposed.

Usage

To simply get the number of virtual CPUs, use

require("cpuinfo").getCPUNumber(callback);

The first parameter of the callback will be null on success or contain error information on failure. The second parameter will be the number of virtual CPUs. This method has submethods that return counts obtained from various sources, using the same callback form.