Serious discrepancy between 'topas' CPU% and 'ps -o pcpu' - Aix
This is a discussion on Serious discrepancy between 'topas' CPU% and 'ps -o pcpu' - Aix ; Hi,
I'd like to know why the use of these 2 commands return
me results so different. For example below see the output
of a 'topas' and a 'ps' run at the same time:
Name PID CPU% PgSp Owner ServerV2 ...
-
Serious discrepancy between 'topas' CPU% and 'ps -o pcpu'
Hi,
I'd like to know why the use of these 2 commands return
me results so different. For example below see the output
of a 'topas' and a 'ps' run at the same time:
Name PID CPU% PgSp Owner ServerV2 0
oracle 12685330 45.0 423.9 oracle ClientV2 0
Press:
opmn 12660934 2.3 20.6 oracle ServerV3 0 "h"
for help
topas 6664366 0.4 3.0 oracle ClientV3 0 "q"
to quit
oracle 12783806 0.2 15.2 oracle
oracle 631004 0.2 6.5 oracle
hagsd 1011830 0.2 5.1 root
$ ps -p 12685330 -o pcpu
%CPU
1.6
As you can see I get a 45% cpu usage for 12685330 while
ps gives me 1.6% only... Both implementations /usr/bin/ps
and /usr/sysv/bin/ps show this result. I'm on a 5.3 AIX machine.
Thanks for any enlightenment...
Regards,
SR
-
Re: Serious discrepancy between 'topas' CPU% and 'ps -o pcpu'
On Jun 28, 8:47 am, Sébastien de Mapias wrote:
> Hi,
> I'd like to know why the use of these 2 commands return
> me results so different. For example below see the output
> of a 'topas' and a 'ps' run at the same time:
>
> Name PID CPU% PgSp Owner ServerV2 0
> oracle 12685330 45.0 423.9 oracle ClientV2 0
> Press:
> opmn 12660934 2.3 20.6 oracle ServerV3 0 "h"
> for help
> topas 6664366 0.4 3.0 oracle ClientV3 0 "q"
> to quit
> oracle 12783806 0.2 15.2 oracle
> oracle 631004 0.2 6.5 oracle
> hagsd 1011830 0.2 5.1 root
>
> $ ps -p 12685330 -o pcpu
> %CPU
> 1.6
>
> As you can see I get a 45% cpu usage for 12685330 while
> ps gives me 1.6% only... Both implementations /usr/bin/ps
> and /usr/sysv/bin/ps show this result. I'm on a 5.3 AIX machine.
>
> Thanks for any enlightenment...
> Regards,
> SR
topas shows % cpu per cpu.
ps shows % cpu per total available.
-
Re: Serious discrepancy between 'topas' CPU% and 'ps -o pcpu'
The first lines of 'prtconf' show:
System Model: IBM,9119-590
Machine Serial Number: 830DECB
Processor Type: PowerPC_POWER5
Number Of Processors: 2
Processor Clock Speed: 1654 MHz
I really doubt the difference we find between 'topas' and 'ps -o pcpu'
comes
from this only dual-core Power5 CPU... Following this arithmetic I
should
get more or less 45/2 = 22% of CPU with 'ps -o pcpu' shouldn't I ?
> topas shows % cpu per cpu.
> ps shows % cpu per total available.
-
Re: Serious discrepancy between 'topas' CPU% and 'ps -o pcpu'
On Jun 29, 3:19 am, Sébastien de Mapias wrote:
> The first lines of 'prtconf' show:
> System Model: IBM,9119-590
> Machine Serial Number: 830DECB
> Processor Type: PowerPC_POWER5
> Number Of Processors: 2
> Processor Clock Speed: 1654 MHz
>
> I really doubt the difference we find between 'topas' and 'ps -o pcpu'
> comes
> from this only dual-core Power5 CPU... Following this arithmetic I
> should
> get more or less 45/2 = 22% of CPU with 'ps -o pcpu' shouldn't I ?
>
> > topas shows % cpu per cpu.
> > ps shows % cpu per total available.
is smt enabled? type 'smtctl' or 'bootinfo -p' to see the number of
logical cpus. that could halve your calculation again.
also this info is calculated by cpu clock tick. even if you press
enter at "the same time", the cpu wouldnt necessarily react at the
same cpu clock times.