process-cpu-utilization
v1.0.2
Published
show process's cpu utilization by executing ps shell command
Downloads
4
Readme
process-cpu-utilization
The solution is based on PS
command
Sample Code
.cpu(err,value)
var pcu=require('process-cpu-utilization');
pcu.cpu(function(err,value){
console.log('CPU Usage of this process is %d %% across all processors', value);
});
.get([Specifier Array],callback)
var pcu=require('process-cpu-utilization');
pcu.get(['%cpu'],function(err,data){
console.log('CPU Usage of this process is %s %%',data['%cpu']);
});
License
MIT