For example tomcat (PID is 4739 ) is initiated connection to postgress (Which is another server) to retrieve data from DB because, tomcat got the request from client( curl 192.168.1.12:8088/get ). In this, tomcat uses a random tcp source port to connection postgress . Now, is there any way to get these source ports that was by created tomcat PID . I used netstat -tp , but I'm not getting PID of the connection. Getting PID only I use l -...
Originally asked by veerendra2 on Stack Exchange (unix) (CC BY-SA 4.0).