Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pstree.remy

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pstree.remy

Collects the full tree of processes from /proc

  • 1.1.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.4M
increased by6.22%
Maintainers
1
Weekly downloads
 
Created

What is pstree.remy?

The pstree.remy npm package is used to retrieve the process tree of a given PID (Process ID) in a Node.js environment. It is particularly useful for debugging and monitoring purposes, allowing developers to understand the hierarchy and relationships between processes.

What are pstree.remy's main functionalities?

Retrieve Process Tree

This feature allows you to retrieve the process tree of the current process. The code sample demonstrates how to use the pstree function to get the children of the current process and log them to the console.

const pstree = require('pstree.remy');

pstree(process.pid, (err, children) => {
  if (err) {
    console.error(err);
  } else {
    console.log(children);
  }
});

Retrieve Process Tree with Signal

This feature allows you to retrieve the process tree and send a signal to each process in the tree. The code sample demonstrates how to use the pstree function with a signal option to send a SIGTERM signal to each child process.

const pstree = require('pstree.remy');

pstree(process.pid, { signal: 'SIGTERM' }, (err, children) => {
  if (err) {
    console.error(err);
  } else {
    console.log(children);
  }
});

Other packages similar to pstree.remy

Keywords

FAQs

Package last updated on 16 May 2020

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