Wednesday, August 3, 2011

Find socket/port status on Linux

When debugging or monitoring a client-server application or any connected application, it is necessary to find out what is going on at socket level.

To start, use
netstat -an

To start with TCP connections, use
netstat -ant

Although the option -p should show process information (PID), it usually gives a "-" for that field. Remember to use ifconfig to find interfaces and IP addresses.

No comments:

Post a Comment