项目作者: jchip

项目描述 :
Get running processes through ps
高级语言: TypeScript
项目地址: git://github.com/jchip/ps-get.git
创建时间: 2020-04-26T20:23:41Z
项目社区:https://github.com/jchip/ps-get

开源协议:Other

下载


ps-get

Get running processes through ps.

  • Support getting a tree of children that belong to a parent
  • Platforms
    • Unix: uses ps
    • Windows: try to use wmic and then powershell

https://github.com/jchip/ps-get

APIs

API references can be found here

Or just use your IDE for hint if it supports TypeScript and typedoc.

Examples

  1. import { ps, psChildren } from "ps-get";
  2. async function test() {
  3. const procs = await ps();
  4. }
  5. async function testChildren() {
  6. const children = await psChildren(1);
  7. }

Why

There are already quite a few modules like this that has millions of weekly downloads, so why another one?

  • ps-tree - event-stream, bug, no activity.
  • ps-list - no API to get children, me not a fan of embedding .exe, even if it’s 5x faster.
  • others - I didn’t do enough searching.

License

Licensed under the Apache License, Version 2.0.