Question

Is it possible to get one single result of the current stats from virt-top? I´ve tried to use the --stream parameter but with that I get a new result every second. I only need one result every execute of the command. How can I reach that?

Was it helpful?

Solution

From the virt-top man page:

-b Batch mode. In this mode keypresses are ignored.

-n iterations Set the number of iterations to run. The default is to run continuously.

So I think what you want is:

virt-top -b -n 1

This is exactly the same as how you would achieve the same with normal "top".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top