Socket
Socket
Sign inDemoInstall

netstats

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

netstats

Get the netstat activity on a given port.


Version published
Maintainers
1
Created
Source

netstats

Get the netstat activity on a given port.

Build Status

Install

$ npm install --save netstats

Usage

const netstats = require('netstats');

netstats(8017).then(results => {
    console.log(results);
});
/*
[ 'COMMAND   PID    USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME',
  'nc      20661 michael    3u  IPv4 0x3b190d9d07c2c3db      0t0  TCP *:8017 (LISTEN)',
  'nc      21145 michael    3u  IPv4 0x3b190d9d054773db      0t0  TCP *:8017 (LISTEN)',
  'Python  21221 michael    3u  IPv4 0x3b190d9ceb8dfd7b      0t0  UDP localhost:8017' ]
*/  

Returns an array containing the line output of the following commands:

  • on linux/mac: lsof -i :<port>
  • on windows: netstat.exe -a -n -o | findstr :<port>

License

MIT © Michael Wuergler

Keywords

FAQs

Package last updated on 24 Jan 2016

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