Hello, Oops, actually the Guest time is already accounted in the User time, so we have to subtract it there... Here is an updated patch.
Samuel
diff -ur xosview-1.8.3+debian/linux/cpumeter.cc xosview-1.8.3+debian-mine/linux/cpumeter.cc --- xosview-1.8.3+debian/linux/cpumeter.cc 2008-06-23 08:51:10.000000000 -0400 +++ xosview-1.8.3+debian-mine/linux/cpumeter.cc 2008-06-23 08:55:36.000000000 -0400 @@ -19,10 +19,10 @@ #define MAX_PROCSTAT_LENGTH 4096 CPUMeter::CPUMeter(XOSView *parent, const char *cpuID) -: FieldMeterGraph( parent, 8, toUpper(cpuID), "USR/NICE/SYS/SI/HI/WIO/FREE/ST" ) { +: FieldMeterGraph( parent, 9, toUpper(cpuID), "USR/NICE/SYS/SI/HI/WIO/FREE/GST/ST" ) { _lineNum = findLine(cpuID); for ( int i = 0 ; i < 2 ; i++ ) - for ( int j = 0 ; j < 8 ; j++ ) + for ( int j = 0 ; j < 9 ; j++ ) cputime_[i][j] = 0; cpuindex_ = 0; @@ -41,7 +41,8 @@ setfieldcolor( 4, parent_->getResource( "cpuInterruptColor" ) ); setfieldcolor( 5, parent_->getResource( "cpuWaitColor" ) ); setfieldcolor( 6, parent_->getResource( "cpuFreeColor" ) ); - setfieldcolor( 7, parent_->getResource( "cpuStolenColor" ) ); + setfieldcolor( 7, parent_->getResource( "cpuGuestColor" ) ); + setfieldcolor( 8, parent_->getResource( "cpuStolenColor" ) ); priority_ = atoi (parent_->getResource( "cpuPriority" ) ); dodecay_ = parent_->isResourceTrue( "cpuDecay" ); useGraph_ = parent_->isResourceTrue( "cpuGraph" ); @@ -77,18 +78,21 @@ >>cputime_[cpuindex_][4] >>cputime_[cpuindex_][5] >>cputime_[cpuindex_][6] - >>cputime_[cpuindex_][7]; + >>cputime_[cpuindex_][7] + >>cputime_[cpuindex_][8]; int oldindex = (cpuindex_+1)%2; - for ( int i = 0 ; i < 8 ; i++ ){ - static int cputime_to_field[8] = { 0, 1, 2, 6, 5, 4, 3, 7 }; + for ( int i = 0 ; i < 9 ; i++ ){ + static int cputime_to_field[9] = { 0, 1, 2, 6, 5, 4, 3, 8, 7 }; int field = cputime_to_field[i]; fields_[field] = cputime_[cpuindex_][i] - cputime_[oldindex][i]; total_ += fields_[field]; } + fields_[0] -= fields_[8]; + total_ -= fields_[8]; if (total_){ - setUsed (total_ - (fields_[5] + fields_[6] + fields_[7]), total_); + setUsed (total_ - (fields_[5] + fields_[6] + fields_[7] + fields_[8]), total_); cpuindex_ = (cpuindex_ + 1) % 2; } } diff -ur xosview-1.8.3+debian/linux/cpumeter.h xosview-1.8.3+debian-mine/linux/cpumeter.h --- xosview-1.8.3+debian/linux/cpumeter.h 2008-06-23 08:51:10.000000000 -0400 +++ xosview-1.8.3+debian-mine/linux/cpumeter.h 2008-06-23 08:51:23.000000000 -0400 @@ -25,7 +25,7 @@ static const char *cpuStr(int num); protected: int _lineNum; - long cputime_[2][8]; + long cputime_[2][9]; int cpuindex_; void getcputime(void); diff -ur xosview-1.8.3+debian/Xdefaults xosview-1.8.3+debian-mine/Xdefaults --- xosview-1.8.3+debian/Xdefaults 2008-06-23 08:51:10.000000000 -0400 +++ xosview-1.8.3+debian-mine/Xdefaults 2008-06-23 08:51:23.000000000 -0400 @@ -75,7 +75,8 @@ xosview*cpuSoftIntColor: red xosview*cpuWaitColor: lightblue xosview*cpuFreeColor: aquamarine -xosview*cpuStolenColor: blue +xosview*cpuGuestColor: blue +xosview*cpuStolenColor: purple xosview*cpuPriority: 1 xosview*cpuDecay: True xosview*cpuGraph: True diff -ur xosview-1.8.3+debian/Xdefaults.in xosview-1.8.3+debian-mine/Xdefaults.in --- xosview-1.8.3+debian/Xdefaults.in 2008-06-23 08:51:10.000000000 -0400 +++ xosview-1.8.3+debian-mine/Xdefaults.in 2008-06-23 08:51:23.000000000 -0400 @@ -75,7 +75,8 @@ xosview*cpuSoftIntColor: red xosview*cpuWaitColor: lightblue xosview*cpuFreeColor: aquamarine -xosview*cpuStolenColor: blue +xosview*cpuGuestColor: blue +xosview*cpuStolenColor: purple xosview*cpuPriority: 1 xosview*cpuDecay: True xosview*cpuGraph: True diff -ur xosview-1.8.3+debian/Xdefaults.stipple xosview-1.8.3+debian-mine/Xdefaults.stipple --- xosview-1.8.3+debian/Xdefaults.stipple 2008-06-23 08:51:10.000000000 -0400 +++ xosview-1.8.3+debian-mine/Xdefaults.stipple 2008-06-23 08:51:23.000000000 -0400 @@ -12,6 +12,7 @@ xosvstipple*cpuInterruptColor: red xosvstipple*cpuSInterruptColor: red xosvstipple*cpuFreeColor: red +xosvstipple*cpuGuestColor: red xosvstipple*cpuStolenColor: red xosvstipple*memUsedColor: orange xosvstipple*memSharedColor: orange @@ -51,6 +52,7 @@ xosvstipplebw*cpuInterruptColor:black xosvstipplebw*cpuSInterruptColor:black xosvstipplebw*cpuFreeColor: black +xosvstipplebw*cpuGuestColor: black xosvstipplebw*cpuStolenColor: black xosvstipplebw*memUsedColor: black xosvstipplebw*memSharedColor: black