New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pstracker

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pstracker

EventEmitter to track process start/stop by process title or pid.

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

PSTracker

A Node.js module for tracking process spawning and killing.

PSTracker emits spawned and killed events for a particular process tracked by either pid or command (as provided by ps-node).

Install

$ npm install pstracker

Usage

Create a tracker for a particular process with a specified pid:

var psn = require('pstracker');

var t = psn({ pid: 12345 });

// registers listeners for 'spawned' and 'killed' events
t.on('spawned', function (proc) {
  console.log('spawned:', proc);
});
t.on('killed', function (proc) {
  console.log('killed:', proc);
});

Or use a RegExp to filter command and arguments to track a process(es):

var psn = require('pstracker');

var t = psn({
  command: 'node',
  arguments: '--debug'
});

// register listeners for 'spawned and 'killed' events
...

Note: When multiple process match a filter, individual spawned and killed events will be fired per process match.

Keywords

FAQs

Package last updated on 30 Jun 2015

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc