0

Looking for a linux function that returns the count of connections in a port.

Was researching about the "lsof", but it only prints connections in a door, and does not return the sum of all connections, for example: if I have two connections at port 80, it will return 2, and not the connections.

Rizier123
  • 58,877
  • 16
  • 101
  • 156
guisantogui
  • 4,017
  • 9
  • 49
  • 93
  • by 'does not return the connection' do you mean you need the 4-tuple for the connection ? Look at the sockstat utility. It shows per process connections with the 4-tuple. What do you mean 'prints connections in a door' ? – Finslicer Jan 10 '12 at 15:59

1 Answers1

0

Did you try netstat?

Olha Puzhay
  • 370
  • 2
  • 9