Ask Your Question

Count number of hosts per network

asked 2017-01-04 01:33:37 -0500

abhilash-goyal gravatar image

I am trying to calculate number of hosts connected to a specific network in openstack. Is there any efficient way to do so ?

KIndly Help.

edit retag flag offensive close merge delete


What do you mean by "host"? If you mean instances, run openstack server list --all-projects and use the Networks column to count instances per network.

Bernd Bausch gravatar imageBernd Bausch ( 2017-01-04 01:39:30 -0500 )edit

Hi Bernd, this command gives all nodes. What I am trying to do is count hosts attached to a specific network-id. The process of using openstack server list --all-projects would be very inefficient, I think.

abhilash-goyal gravatar imageabhilash-goyal ( 2017-01-04 05:02:16 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-01-04 06:20:54 -0500

You can add --ip <ip-address-regex>, thereby filtering for certain IP addresses. This may enable you to narrow the list down to the servers connected to one network, or at least fewer networks. Whether it's really faster, I don't know.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2017-01-04 01:33:37 -0500

Seen: 85 times

Last updated: Jan 04 '17