0

I have a Google Cloud VM instance running Debian and a dockerized Apache httpd inside. I'm trying to count all the http connections in the machine.

I run this:

for i in {1..1000}; do netstat -at | wc -l; sleep 0.2; done

and then I run multiple concurrent http requests, using JMeter, but count doesn't change.

If I execute it inside the Apache container, it works fine because traffic is forwarded to the container. But I would like to see it in the host machine. Is this possible?

Héctor
  • 187
  • 1
  • 4
  • 15
  • netstat is showing you socket details. Since the sockets are opened in the container and not in the host, netstat running in the host, cannot list sockets in the container. – John Hanley Sep 08 '21 at 19:03
  • IIRC mod_status shows number of accesses/connections, have you tried checking that instead? You would just have to compare the numbers between checks to see how many there have been. – Daniel Ferradal Sep 09 '21 at 09:40
  • Can you please confirm whether your issue has been resolved or not? – Anant Swaraj Sep 16 '21 at 09:28

0 Answers0