Package Exports
- @sedracoin/process-list
- @sedracoin/process-list/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@sedracoin/process-list) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Cross-platform native method to receive the list of the launched processes
Install
npm i process-list
# or
yarn add process-listIt's that easy! npm will download one of the prebuilt binaries for your OS. If you need to build process-list, see node-gyp for more details.
Supported OS
WindowsWindows 7+, Windows Server 2008 R2+Linuxany Linux-based distributivesOS XSoon...
Usage
const { snapshot } = require("process-list");
const tasks = await snapshot('pid', 'name');
console.log(tasks);
// output
// [{
// name: "1.exe",
// pid: 1234,
// }, ... ]API
snapshot(...field: String): Promise<[]Object>
Returns the list of the launched processes.
allowedFields: []String
List of allowed fields.
pid: Number- process pidppid: Number- parent process pidname: String- process name (title)path: String- full path to the process binary filethreads: Number- threads per processowner: String- the owner of the processpriority: Number- an os-specific process prioritycmdline: String- full command line of the processstarttime: Date- the process start date / timevmem: String- virtual memory size in bytes used by processpmem: String- physical memory size in bytes used by processcpu: Number- cpu usage by process in percentutime: String- amount of time in ms that this process has been scheduled in user modestime: String- amount of time that in ms this process has been scheduled in kernel mode
License
MIT, Copyright © 2014 - 2019 Dmitry Tsvettsikh