In most unix systems you can use the lsof command which is normally available under /usr/local/bin/lsof. The only catch is you have to be root or have sudo access to run this command.
lsof -i TCP:
Once you find the process id, you can get more information about the process by using the ps command.
There is a developer works article that has good usage information about lsof.
If your system does not have the lsof command due to security restrictions, you may want to try the script found here.
1 comment:
You can also find out about the process id by running the netstat command with -p option.
For example the following command will list all the process that are listening for connections from other clients.
netstat -lp
If the process is not owned by the user who is running the command, the process information will not be displayed, unless you are running the command as a super user.
Post a Comment