O'Reilly logo

Sams Teach Yourself Network Troubleshooting in 24 Hours, Second Edition by Jonathan Feldman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Ports, Sockets, and Netstat, Oh My

When you’ve restarted a daemon, checked the log files, and nothing seems to be working, you’ll need finer diagnostics. A good place to start is by checking the ports and socket pairs on your UNIX server.

Enter netstat -a . This command is to network sockets what ps is to processes. You’ll remember from Hour 1, “Understanding Networking: The Telephone Analogy,” that a listening socket means that a service is listening at a certain extension (port) for calls.

The netstat command can list each socket that’s being used for a current connection or being listened to for a connection. It tells you whether things are backlogged, where they are backlogged from, and which socket is in use on both sides of the call. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required