monitoring compute nodes

Asked by gobexe

I was wondering what would be the proper way of monitoring the utilization of compute nodes. Specifically, I am interested in how many instances are running on a node and what the actual CPU and memory utilization of the instances are.

I figured that one could do it by doing "ps ax|grep kvm", grab the PIDs and look at /proc/[pid] for the relevant information. Is there a more elegant way to do this?

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Brian Lamar
Solved:
Last query:
Last reply:
Revision history for this message
Brian Lamar (blamar) said :
#1

Currently I don't believe OpenStack Nova has any features which allows for easy/convenient monitoring of compute hosts. If you're using KVM/libvirt I might suggest looking for KVM-specific monitoring/mangement tools such as: http://www.linux-kvm.org/page/Management_Tools

I know that probably doesn't help you out a lot, but I've never found anything in my past searches and this is not an area of expertise for me.

Revision history for this message
Mike Raab (mike-nw2wg) said :
#2

if you can get to the OS, you can use revealcloud http://copperegg.com/free . It will show you graphical display of all your linux instances for CPU, Memory, Load etc that will update every few seconds.

Revision history for this message
Guido Davide Dall'Olio (guidodavide-dallolio) said :
#3

I'm using/testing some features in nova-instancemonitor.

Revision history for this message
gobexe (gobexe) said :
#4

nova-instancemonitor sounds to be closer to what I need. However, I could not find any documentation about it on the net. Where do I start/how do I use it?

Thanks.

Revision history for this message
Best Brian Lamar (blamar) said :
#5

Recently Nova removed all pieces of code which used the Python twisted library because from what I understand there was nobody maintaining the code and it did not reliably work. I don't have direct experience with instancemonitor but I do know what it was removed and will not be in the next OpenStack Nova release.

Revision history for this message
gobexe (gobexe) said :
#6

Here is, I think, the proper way to go about it.

Thank you everyone for your inputs.

#!/usr/bin/python
from nova.virt import connection as virt_connection
conn = virt_connection.get_connection(read_only=True)
instances = conn.list_instances()
for i in instances:
 print(i,conn.get_info(i))

Revision history for this message
gobexe (gobexe) said :
#7

Thanks Brian Lamar, that solved my question.