Unable to run some commands in HP-UX

Hi All,

I want to get %cpu and %memory utilization for a given process id in HP-UX so am using the following commands

1)TOP -p <PID> am getting error message like Quitting top: pset 26323 doesn't exist,but when am using only TOP command without any options its working fine.
2)ps -e -o pcpu -o pid -o user -o args this command is giving error message like invalid option -o
3)As ps aux is expected to give output which has columns "USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND"
for me it is giving only "PID TTY TIME COMMAND" these columns.

can anyone clarify if these commands will work if we change any settings

have you tried to read the man pages of the commands?

And also giving Architecture and OS version does help you know...

Remarkably similar to this thread, where I have suggestions for the "ps" syntax issue.

http://www.unix.com/hp-ux/151895-get-cpu-memory-utilization-process-id.html

Are you posting under two handles?

Hi ,
On HPUX machine you can use glance if you have glance tool installed on ur system.

You need to set UNIX95 standard first - see 'man 5 standards'

Try:
# export UNIX95=1
# ps -e -o pcpu -o pid -o user -o args

---------- Post updated at 01:49 PM ---------- Previous update was at 01:45 PM ----------

Oh... And your top -p <PID> is incorrect.... Its not <PID>, but PSET (processor set) which is different.