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?
Asked
Active
Viewed 272 times
0

WhiteIntel
- 697
- 1
- 9
- 24
1 Answers
1
-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".

Digital Trauma
- 15,475
- 3
- 51
- 83
-
Yeah looks nice, but the problem is, that every value in the secion is 0. – WhiteIntel Mar 27 '14 at 09:43
-
1Perhaps `virt-top` needs a couple of iterations before it starts reporting reasonable numbers. Can you try `-n 2` instead, and just capture the output of the last iteration? – Digital Trauma Mar 27 '14 at 14:45