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

ps

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ps

A process lookup utility

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

ps

A Node.js module for looking up running processes.

Install

$ npm install ps

Usage

const ps = require('ps');

const [ proc ] = await ps({ pid: 12345 });

console.log(proc); // { "pid": 12345, "comm": "node" }

const procs = await ps({ pid: [ 23456, 34567 ] });

console.log(procs); // [ { "pid": 23456, "comm": "node" }, { "pid": 34567, "comm": "node" }

// Available options
{
    pid: 12345 || [ 23456, 34567 ],  // Search by pid
    ppid: 12345 || [ 23456, 34567 ],  // Search by parent pid
    user: "bob",  // Search by user
    group: "users",  // Search by group
    command: "node",  // Search by command
    all: true,  // List all processes
    fields: [ 'pid', 'comm' ]  // The fields to return
}

Keywords

ps

FAQs

Package last updated on 03 Sep 2018

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