Ask Your Question
0

Count number of hosts per network

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

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

Comments

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 -0600 )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 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 56 times

Last updated: Jan 04 '17