3

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?

Juan Carlos Coto
  • 677
  • 2
  • 6
  • 13

1 Answers1

2

The netstat command is what you are looking for:

$ netstat --all --programs --tcp --udp
Spack
  • 1,594
  • 13
  • 22
  • 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