I have a socket connection between a client process and a server process, both running on my machine. There are two entries shown for the connection as,
sudo netstat -ntp | grep 56442 tcp 1 0 127.0.0.1:56442 127.0.0.1:8002 CLOSE_WAIT 8276/python tcp 0 0 127.0.0.1:8002 127.0.0.1:56442 FIN_WAIT2 -
How can I figure out which is the server in this case?
I know that the TCP server is running on port
8002, and a client connects to the listening server from port
I am trying to figure out a way to distinguish between server and client, by looking at the
netstat output entries.
And why doesn't the process id/description appear when the socket is in