Operating System - HP-UX
1753500 Members
4568 Online
108794 Solutions
New Discussion юеВ

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

 
Herve BRANGIER
Respected Contributor

%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??

10 REPLIES 10
Uday_S_Ankolekar
Honored Contributor

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..
harry d brown jr
Honored Contributor

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
Herve BRANGIER
Respected Contributor

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??
Roger Baptiste
Honored Contributor

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.
S.K. Chan
Honored Contributor

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.
Herve BRANGIER
Respected Contributor

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??
Herve BRANGIER
Respected Contributor

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
Tony Salerno
New Member

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
Anu Mathew
Valued Contributor

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