soyuka / pidusage

Cross-platform process cpu % and memory usage of a PID
MIT License
512 stars 55 forks source link

Get ports occupied by certain process. #151

Closed zsh2401 closed 1 year ago

zsh2401 commented 2 years ago

Description
Get all the ports used by process.

Example

const { ports } = await pidusage(12345) // consider pid 12345 is some server that using some ports.
//Ports should be an array of number.
soyuka commented 1 year ago

This would use system tools we don't really support its a good idea but for another project. Thanks for the interest though.