Log Uptime of Active VMs Periodically

asked 2014-04-08 15:28:58 -0600

anonymous user



I am trying to write a script to log the uptime of VMs on a periodic basis. I was thinking of using the novaclient python api, but I cannot seem to be able to figure out how to get the information in a machine readable format. Should I just 'cut' through it to pull out the individual characters?


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-04-08 17:07:11 -0600

SamYaple gravatar image

You might find it easier to do a query to the database. It will list start times and current state. You can build one fairly quickly to pull out that info and convert it to uptime.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-04-08 15:28:58 -0600

Seen: 419 times

Last updated: Apr 08 '14