Coder Social home page Coder Social logo

orzmaster / node-process-list Goto Github PK

View Code? Open in Web Editor NEW

This project forked from reklatsmasters/node-process-list

0.0 1.0 0.0 497 KB

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

License: MIT License

Dockerfile 0.48% Makefile 1.13% Python 3.26% JavaScript 8.07% Batchfile 0.72% C++ 85.28% C 1.06%

node-process-list's Introduction

logo

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

Build Status Build status npm license downloads JavaScript Style Guide 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");

snapshot('pid', 'name').then(tasks => 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 (c) 2014 Dmitry Tsvettsikh

node-process-list's People

Contributors

reklatsmasters avatar greenkeeper[bot] avatar

Watchers

Master avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.