list
portcheck list¶
List sockets and the processes that own them
Synopsis¶
List local TCP and UDP sockets together with their owning process.
Without elevated privileges some owners may be hidden; portcheck prints a hint when that happens.
Examples¶
portcheck list --listening
portcheck list --port 3000-3999 --proto tcp
portcheck list --name 'node*' --json
portcheck list -l --watch 2s
portcheck list -l --wide # who started each process, and its command line
Options¶
-h, --help help for list
-l, --listening only sockets accepting connections (TCP LISTEN, unconnected UDP)
--name string only processes whose name matches this glob (case-insensitive)
--pid int32Slice only sockets owned by these PIDs (default [])
--port string local ports, e.g. 80,443,8000-8100 or a preset (common, well-known, ...)
--proto strings protocols to include: tcp, udp
--state strings only these states, e.g. LISTEN,ESTABLISHED
--watch duration refresh every interval until interrupted, e.g. 2s
-w, --wide also show the parent process and command line
Options inherited from parent commands¶
--json shorthand for --output json
--log-format string log format: text or json (default "text")
--no-color disable colors (also honors NO_COLOR)
-o, --output string output format: table, plain, csv, json (default: table on a terminal, plain otherwise)
-v, --verbose log diagnostic details to stderr
SEE ALSO¶
- portcheck - See what's using your ports, find free ones, and free them up