[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Run "guest CPUs" under Linux? I need your help



Craig Small dijo [Fri, Sep 12, 2008 at 12:26:41PM +1000]:
> Hello,
>   I'm the Debian maintainer for procps, which is the package that gives
> you things like ps,killall and top.  The latest version of procps now
> handles all 7 cpu numbers, so all is well?
> 
> Actually no, since kernel 2.6.24 there is a 9th CPU field! It's called
> a guest field and is the amount of time the CPU spends running a virtual
> CPU.  My problem is, its not defined too well. I get 0 all the time as
> I run a standard Linux installation.
> 
> What am I looking for?
>   * Someone who knows that this field means, or
>   * Someone who can spend some time with me checking some things and
>     has something in that field.

Ok. I qualify for the second case only ;-)

> Look for the 9th number in your cpu lines in /proc/stat
> $ grep cpu /proc/stat
> cpu  10056425 163340 3340784 167972553 1183037 103876 31053 0 0
> cpu0 10056425 163340 3340784 167972553 1183037 103876 31053 0 0
> 
> That second 0 right at the end is my "guest cpu" time. If you don't
> have 0 and got some time, can you reply back? I'll probably just
> need some greps of a few lines in /proc  Ideally you have a rather large
> number there, or at least something that is in the same order as the
> others.

This is at a quad-core machine running 15 kvm hosts:

0 gwolf@pulpo[1]~$ grep cpu /proc/stat
cpu  7295971 94 4705482 104732978 112016 1477 196473 0 5259532
cpu0 1990863 26 1266385 24541064 26959 474 51863 0 1443897
cpu1 2011231 29 1290433 26663687 29237 349 57570 0 1438583
cpu2 1658982 21 1080896 26900462 27728 323 42251 0 1198182
cpu3 1634894 16 1067767 26627764 28091 330 44788 0 1178868

0 gwolf@pulpo[2]~$ uname -a
Linux pulpo 2.6.26-1-amd64 #1 SMP Thu Aug 28 11:13:42 UTC 2008 x86_64 GNU/Linux

So... Anything you might want me to run, please ask.

-- 
Gunnar Wolf - gwolf@gwolf.org - (+52-55)5623-0154 / 1451-2244
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973  F800 D80E F35A 8BB5 27AF


Reply to: