Reputation: 796
On the most left column, there are the processes with ports running on my server. I got this by running : iftop -i eth0 -P
.
Some of the ports I can easily find out which process/application it is. But there are some, I cound not find out by using netstat -anlp|grep <PORT>
or ps -ef|grep <PORT>
.
So, my question is how can I find out those 'temporary' ports relates to which processes running on my server?
Upvotes: 1
Views: 1399
Reputation: 796
we can find the related process by running lsof | grep <port number>
.
The output of the lsof command contains pid, by which, ps -ef|grep <pid>
, we can find out which process this is.
Upvotes: 1