Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

License

NotificationsYou must be signed in to change notification settings

reklatsmasters/node-process-list

Repository files navigation

logo

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

Build StatusBuild statusnpmlicensedownloadsGreenkeeper badge

Install

npm i process-list# oryarn add process-list

It's that easy! npm will download one of theprebuilt binaries for your OS. If you need to buildprocess-list, seenode-gyp for more details.

Supported OS

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

Usage

const{ snapshot}=require("process-list");consttasks=awaitsnapshot('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


[8]ページ先頭

©2009-2025 Movatter.jp