4

How do I (or does netstat-p or ss -p) find the owning PID from /proc/net/tcp output?

Given output below:

 sl  local_address rem_address   st tx_queue rx_queue tr tm->when retrnsmt   uid  timeout inode                      
  3: 00000000:07D1 00000000:0000 0A 00000000:00000000 00:00000000 00000000   500        0 29345 1 ffff8800210ce740 299 0 0 2 -1                     

do I need to recurse through /proc/$PID searching for inode?

I have tried running find on /proc/ looking to match the inode from the above, without any luck.

Can someone explain what the fields of inode mean?

Thanks!

Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
The_Viper
  • 391
  • 1
  • 6
  • 14
  • 1
    Note that there isn't necessarily exactly one owning PID - the socket can be open in multiple processes. – caf May 06 '11 at 02:06

0 Answers0