Skip to content

Cross-platform native method to receive the list of the launched processes

License

Notifications You must be signed in to change notification settings

AnumaDev/node-process-list

This branch is up to date with aspectron/node-process-list:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f189af3 · Jun 2, 2020
Jun 10, 2018
Apr 26, 2017
Apr 6, 2017
Aug 17, 2014
Apr 4, 2017
Oct 18, 2019
Apr 19, 2017
Apr 15, 2017
Apr 15, 2017
Oct 18, 2019
Oct 18, 2019
Jun 2, 2020
Oct 18, 2019
Apr 6, 2017
Apr 4, 2017
Apr 30, 2017
Apr 19, 2017
May 20, 2017
May 28, 2020

Repository files navigation

logo

Cross-platform native method to receive the list of the launched processes

Build Status Build status npm license downloads Greenkeeper badge

Install

npm i process-list
# or
yarn add process-list

It'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

  • Windows Windows 7+, Windows Server 2008 R2+
  • Linux any Linux-based distributives
  • OS X Soon...

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 pid
  • ppid: Number - parent process pid
  • name: String - process name (title)
  • path: String - full path to the process binary file
  • threads: Number - threads per process
  • owner: String - the owner of the process
  • priority: Number - an os-specific process priority
  • cmdline: String - full command line of the process
  • starttime: Date - the process start date / time
  • vmem: String - virtual memory size in bytes used by process
  • pmem: String - physical memory size in bytes used by process
  • cpu: Number - cpu usage by process in percent
  • utime: String - amount of time in ms that this process has been scheduled in user mode
  • stime: String - amount of time that in ms this process has been scheduled in kernel mode

License

MIT, Copyright © 2014 - 2019 Dmitry Tsvettsikh

About

Cross-platform native method to receive the list of the launched processes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 83.1%
  • JavaScript 7.9%
  • Python 5.7%
  • Makefile 1.1%
  • C 1.0%
  • Batchfile 0.7%
  • Dockerfile 0.5%