Syntax
port2pid(integer)
Description
The port2pid() function returns a hash containing process id’s and process name for a given port number.
If no process can be found, then an empty hash is returned.
Note: If called as a standard user, port2pid() will only show process id’s of the calling user.
Example
include("net")
println(port2pid(80))
println(port2pid(22))
println(port2pid(8000))
{"pids": [1086, 164844, 164845], "proc": "apache2"}
{"pids": [797], "proc": "sshd"}
{}