Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Trying to figure out where my system's connections are being used (i.e. how many connections belong to what processes - could even be filtered by some expression through grep, if it applies). The system is running CentOS 6.

How can I determine what the connection usage is for a server?

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

The netstat command is what you are looking for:

$ netstat --all --programs --tcp --udp
share|improve this answer
    
Excellent! Running netstat --all --programs --tcp --udp | grep postgres | wc -l gives me all the PostgreSQL connections on that server, which is what I was looking for. Thanks! –  Juan Carlos Coto Apr 17 '13 at 19:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.