Quasic / cpuinfo

Hopefully an improvement to os.cpus()

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Hopefully an improvement to os.cpus()

License:MIT License


Languages

Language:JavaScript 100.0%