1833707 Members
2551 Online
110063 Solutions
New Discussion

ps command

 
SOLVED
Go to solution
Marcelo De Florio_1
Frequent Advisor

ps command

I execute ps command,

UNIX95= ps -p PID -o "pcpu"

so, the output is
%CPU
0
without decimal positions

any ideas ?

MDF
Marcelo De Florio
4 REPLIES 4
Uday_S_Ankolekar
Honored Contributor

Re: ps command

Hi
Try like this

UNIX95= ps -e -o ruser,pid,pcpu | more
This will provide cpu utilization, with pid and owner

-USA..
Good Luck..
Steven Gillard_2
Honored Contributor
Solution

Re: ps command

You need patch PHCO_18446, which has the following defect fix:

2. ps(1) displays incorrect %CPU format when UNIX95
environment variable is set.

I have this patch and the output looks fine on my system:

$ UNIX95= ps -p 6420 -o pcpu
%CPU
0.02

Regards,
Steve
Marcelo De Florio_1
Frequent Advisor

Re: ps command

Steven:
How can i obtain this information ?

regards.

MDF
Marcelo De Florio
Steven Gillard_2
Honored Contributor

Re: ps command

Marcelo,

You can search the patch database through the ITRC. Just click on the "search" link to the right and restrict your search to patches only.

For example, searching for "ps" in HPUX 11.0 patches brings back PHCO_18446 as the second document.

If I suspect a bug in any component of HPUX I always start there.

Cheers,
Steve