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

port-pid

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

port-pid

Get the pid(s) of a process on a given port

0.0.7
latest
Source
npm
Version published
Weekly downloads
4.7K
-18.09%
Maintainers
1
Weekly downloads
 
Created
Source

port-pid Build Status

Get the pid(s) of the process on a given port.

Install

$ npm install --save port-pid

Usage

Get all the pids on a given port, or filter by udp (UDP) or tcp (TCP):

const pids = require('port-pid');

pids(8017).then(pids => {
    
    console.log(pids.all);
    //=> [1234, 5678]
    
    console.log(pids.tcp);
    //=> [1234]
    
    console.log(pids.udp);
     //=> [5678]
});

License

MIT © Michael Wuergler

Keywords

netstat

FAQs

Package last updated on 09 Jun 2019

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