PIDUSAGE_USE_PS
, PIDUSAGE_MAXAGE
, PIDUSAGE_SILENT
)uptime
returns undefined
60000ms
but you can specify it with the maxage
option, see this file) 1740a4fps
use elapsed instead of etime to avoid negative cpu values 0994268ps
command #68 7d55518advanced
option/proc
(procfiles) anymore but use ps
insteadstat
method, module exports a single functionunmonitor
method, this is handed internallythe default call now returns more data:
{
cpu: 10.0, // percentage (it may happen to be greater than 100%)
memory: 357306368, // bytes
ppid: 312, // PPID
pid: 727, // PID
ctime: 867000, // ms user + system time
elapsed: 6650000, // ms since the start of the process
timestamp: 864000000 // ms since epoch
}
Introduce advanced
option to get time, and start
Windows: (wmic) goes back to the first version of wmic, naming wmic process {pid} get workingsetsize,usermodetime,kernelmodetime
. CPU usage % is computed on the flight, per pid.
Windows: (wmic) Use raw data instead of formatted this should speed up wmic
API changes:
require('pidusage').stat(pid, fn)
instead of:
require('pidusage')(pid, fn)
Adds a unmonitor
method to clear process history