Cross-platform native method to receive the list of the launched processes.
You need build tools for native module.
- Install Python 2.7
- Windows: Install MSVC 2013 or newer
- Unix: install GCC to 4.8 or newer
- install node build tool
npm i -g pangyp
See pangyp for more info.
npm i process-list
Supported OS:
- Windows 7+ (maybe Vista and XP)
- Linux (Ubuntu, CentOS and other)
- MacOS - ???.
Supported engines:
- nodejs 0.10+
- iojs
N.B. Windows x64 + iojs <= 1.3 has error when build.
var tasks = require("process-list");
tasks.snapshot(function(err, data){
console.log(data);
});
// output
// ["1.exe", "2.exe", ... ]
var tasks = require("process-list");
tasks.snapshot({verbose:true}, function(err, data){
console.log(data);
});
// output
// [{
// name: "1.exe", // process name
// path: "c:\\windows\\1.exe", // full path to process (if available)
// threads: 5,
// owner:"root",
// pid: 1234, // process pid
// ppid: 12, // parent ptocess pid
// priority: 15 // process priority (OS specific value)
// }, ... ]
var tasks = require("process-list");
console.log(tasks.snapshotSync());
- CPU usage per process
- Memory usage per process
- Command line (for Windows)
- Сustomizable information
- Dependencies of the process
Process priority