Coder Social home page Coder Social logo

kevinbrill / 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 1.0 180 KB

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

License: MIT License

Python 6.94% JavaScript 6.07% C++ 86.44% C 0.55%

node-process-list's Introduction

node-process-list

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

Install

You need build tools for native module.

  1. Install Python 2.7
  2. Windows: Install MSVC 2013 or newer
  3. Unix: install GCC to 4.8 or newer
  4. install node build tool npm i -g pangyp See pangyp for more info.
npm i process-list

Supported OS:

  • Windows 7+ (maybe Vista and XP)
  • Linux (Ubuntu, CentOS and other)
  • MacOS - ???.

Supported engines:

  • nodejs 0.10+
  • iojs

N.B. Windows x64 + iojs <= 1.3 has error when build.

Example: simple info

var tasks = require("process-list");

tasks.snapshot(function(err, data){
	console.log(data);
});

// output
// ["1.exe", "2.exe", ... ]

Example 2: Extended info

var tasks = require("process-list");

tasks.snapshot({verbose:true}, function(err, data){
	console.log(data);
});

// output
// [{
// 		name: "1.exe",              // process name
// 		path: "c:\\windows\\1.exe", // full path to process (if available)
// 		threads: 5, 
// 		owner:"root",
// 		pid: 1234,                  // process pid
// 		ppid: 12,                   // parent ptocess pid
//	    priority: 15                // process priority (OS specific value)
// }, ... ]

Example 3: Sync API

var tasks = require("process-list");
console.log(tasks.snapshotSync());

TODO

  • CPU usage per process
  • Memory usage per process
  • Command line (for Windows)
  • Сustomizable information
  • Dependencies of the process
  • Process priority

node-process-list's People

Contributors

reklatsmasters avatar kevinbrill avatar

Watchers

 avatar

Forkers

bebo

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.