Score:0

Showing all http connections in vm instance

cn flag

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?

John Hanley avatar
cn flag
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.
ezra-s avatar
ru flag
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.
Anant Swaraj avatar
cn flag
Can you please confirm whether your issue has been resolved or not?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.