[Libvir] a couple of questions -Newbie

Richard W.M. Jones rjones at redhat.com
Tue Mar 4 16:06:13 UTC 2008

On Tue, Mar 04, 2008 at 09:01:22AM -0700, Spencer Parker wrote:
> Now when I run virt-top with the script option it just hangs...how long 
> till it dies?  Or is there a way to daemonize it?

Which version of virt-top is this?

Script mode is designed to run forever.  If used in conjunction with
--csv then you'll get an ever longer CSV file.  But you also add
either '-n <iterations>' or '--end-time <time>'[1] to make it stop
early (or just kill it instead).

For example:

  virt-top -c test:///default --script --csv /tmp/test.csv -n 10

will run for 30 seconds, produce a 11 line (10 measurements + title)
CSV file, and then exit.  If it _doesn't_ do that, then please file a

The virt-top manpage explains all the options in some detail.


[1] Various <time> formats as explained in the manpage.

Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.

More information about the libvir-list mailing list