I would like to get information about network connections (like netcat) using the command:
/proc/net/tcp
by obtaining an output with the following columns:
sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode
Now I would like to get the PID of each row.
How can I do?
It is possible to do it with the command?
/proc/PID/net/tcp
Or the best way is to go to(via inode):
/proc/<PID>/fd/
In any case, what are the steps to follow?