New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

psnode

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

psnode

A process utility for OSX and Windows

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

psnode

A Node.js KISS module to list and kill process on OSX and Windows.

This use ps and tasklist to list processes and kill and taskkill to kill a process.

Install

$ npm install psnode

Usage

List processes

var ps = require('psnode');

ps.list(function(err, results) {
  if (err)
    throw new Error( err );

  console.log(results); // [{pid: 2352, command: 'command'}, {...}]
});

Kill process by PID

var ps = require('psnode');

ps.kill(12345, function(err, stdout) {
  if (err)
    throw new Error(err);

  console.log(stdout); // stdout for kill or taskkill command if any
});

Note

If the full command line is required on windows wmic.exe would be the way to go but it's not available on Windows XP Home Edition.

Licence

(MIT)

Keywords

ps

FAQs

Package last updated on 22 Jul 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts