Re: %CPU column in ps output (HPUX 10.20) is always 0 (860 Views)
Reply
Respected Contributor
Herve BRANGIER
Posts: 215
Registered: ‎07-06-2000
Message 1 of 11 (860 Views)

%CPU column in ps output (HPUX 10.20) is always 0

Hi

I need to use ps with XPG4 options in order to
obtain %CPU column's information. These values
are always 0. I find this bug in HP knowledge
base but it seems that there is only a patch
for HPUX 11.00 and none for HPUX 10.20.

Do you know if I can use ps binary (HPUX 11.00)
on an HPUX10.20 ? Or do you know a patch for
this problem ?

TIA

Herv??

Honored Contributor
Uday_S_Ankolekar
Posts: 2,021
Registered: ‎06-05-2001
Message 2 of 11 (860 Views)

Re: %CPU column in ps output (HPUX 10.20) is always 0


UNIX95= ps -e o "pcpu vsz ruser pid args" sort -rn | head -10

would give you the list of top ten cpu intensive processes

-USA..
Good Luck..
Honored Contributor
harry d brown jr
Posts: 8,418
Registered: ‎12-12-2000
Message 3 of 11 (860 Views)

Re: %CPU column in ps output (HPUX 10.20) is always 0

You can't (shouldn't) use the binary from 11 on a 10.20 server. Do you have the sept 2001 patch bundle installed?

live free or die
harry
Live Free or Die
Respected Contributor
Herve BRANGIER
Posts: 215
Registered: ‎07-06-2000
Message 4 of 11 (860 Views)

Re: %CPU column in ps output (HPUX 10.20) is always 0

Hi Uday

My problem seems to come from a ps bug :
%CPU is divide by 100 but is seems to be an
integer so it is always 0 ! It's a known bug
but the only patch I found is for HPUX 11.X.
And on HPUX 11 ps needs libc.2 which doesn't
exist on HPUX 10.20....

I think I need to find a corrected release of
ps for HPUX 10.20 ?

Thanks

Herv??
Honored Contributor
Roger Baptiste
Posts: 1,151
Registered: ‎04-17-2000
Message 5 of 11 (860 Views)

Re: %CPU column in ps output (HPUX 10.20) is always 0

hi,

i don't think you can use the 10.20 binary since the pstat structure maybe different. I am not sure, but you can give it a shot (but making sure you have the oringial binary copy ) from a 11.00 32-bit system.

On checkin up, i find the same problem on few of my 11.00 boxes, but it works on another 11.00 box.
The working ps size and info on 11.00 is:
/usr/bin/ps:
ps.c $Revision: 82.1.1.2 $ $Date: 99/04/29 00:13:07 $
PATCH_11_00: ps.o 99/04/29
-r-xr-xr-x 1 bin sys 40960 Apr 29 1999 /usr/bin/ps

HTH
raj
Take it easy.
Honored Contributor
S.K. Chan
Posts: 4,063
Registered: ‎08-29-2000
Message 6 of 11 (860 Views)

Re: %CPU column in ps output (HPUX 10.20) is always 0

I think the patch you need is
PHKL_11245 LVM,VM,PM,pstat cumulative
it might be superseeded already.
Respected Contributor
Herve BRANGIER
Posts: 215
Registered: ‎07-06-2000
Message 7 of 11 (860 Views)

Re: %CPU column in ps output (HPUX 10.20) is always 0

Hi

Thanks for all your reply.... but no solutions
now. I find a patch for this problem for HPUX 11.00
and it was corrected on HPUX11.00 9911 release.
(PHCO_18445). But I can't find the same patch
for HPUX 10.20. I use an old release of HPUX 10.20 and can't update.
I try to use an HPUX 11 ps but it doesn't work :
libary problem...

Harry did you try to use cpcu column with this
release of HPUX10.20 ?

Thanks

Herv??
Respected Contributor
Herve BRANGIER
Posts: 215
Registered: ‎07-06-2000
Message 8 of 11 (860 Views)

Re: %CPU column in ps output (HPUX 10.20) is always 0

Thanks for your reply,

This is really an HPUX10.20 bug and there is
no official patches at this time.
I made a small piece of code to obtain these
informations and HP send me an unofficial
ps binary....

Herve
Occasional Visitor
Tony Salerno
Posts: 1
Registered: ‎01-23-2002
Message 9 of 11 (860 Views)

Re: %CPU column in ps output (HPUX 10.20) is always 0

I saw you got an unofficial ps binary for HPUX 10.20. I wasn't able to open your attachment though. I am having same problem with ps on 10.20. Would you mind sending me the unofficial binary?

Thanks,

Tony Salerno
tsalerno@wansystems.com
Valued Contributor
Anu Mathew
Posts: 100
Registered: ‎02-07-2001
Message 10 of 11 (860 Views)

Re: %CPU column in ps output (HPUX 10.20) is always 0

Hi Herv,

No Official patch or solution for this problem (10.20) as on Tue Jul 16 16:02:13 CDT 2002.

I do hope that help is in its way.

Thanks,

Anu Mathew
Honored Contributor
MANOJ SRIVASTAVA
Posts: 1,885
Registered: ‎07-10-2000
Message 11 of 11 (860 Views)

Re: %CPU column in ps output (HPUX 10.20) is always 0

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.