number of connections per vm

tincboy

Renowned Member
Apr 13, 2010
466
6
83
Does any one know a way to find out the number of network connections an specified vm has?
 
I believe this can only be determined within the VM itself. KVM/QEMU doesn't supply that level of detail that I know of.
 
I believe this can only be determined within the VM itself. KVM/QEMU doesn't supply that level of detail that I know of.

but I can see the network connectivity per connection via iftop command,
All i need is to know number of connections too.
 
but I can see the network connectivity per connection via iftop command,
All i need is to know number of connections too.
Hi,
i'n feel, that's possible to get an output via command (perhaps openvz-only). There was an thread a long time ago - but i have forgotten this.

But you can do something like this for kvm-vms (running) with bridged networks (first with name, second only count):
E.G. for vm 114
Code:
ifconfig -a | grep tap114
ifconfig -a | grep tap114 | wc -l

You can also play with grep on the vm-configs - then you get the output all vms.

Udo