A simple CLI tool that scans a specific port and displays the PID and full path of the process that initiated the TCP connection.
npm install -g estportestport <PORT=0-65535>estport <PORT=0-65535> --output=jsonCheck version
estport --versionHelp usage
estport [--help | -h]$ estport 3000
#0 [2479] /Applications/Google Chrome.app/{...}/Google Chrome Helper --type=utility {...}
#1 [98169] /opt/homebrew/Cellar/node@22/22.11.0/bin/node /{...}/node_modules/react-scripts/scripts/start.json Windows is below:
PS C:\WINDOWS> estport 3000
#0 [2284] C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
#1 [16992] C:\Program Files\nodejs\node.exe$ estport 3000 --output=json --pretty
[
{
"pid": "2479",
"command": "/Applications/Google Chrome.app/{...}/Google Chrome Helper --type=utility {...}"
},
{
"pid": "98169",
"command": "/opt/homebrew/Cellar/node@22/22.11.0/bin/node /{...}/node_modules/react-scripts/scripts/start.js"
}
]on Windows is below:
PS C:\WINDOWS> estport 3000 --output=json --pretty
[
{
"pid": "2284",
"command": "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe"
},
{
"pid": "16992",
"command": "C:\\Program Files\\nodejs\\node.exe"
}
]