1834935 Members
2369 Online
110071 Solutions
New Discussion

Re: Process details

 
Khashru
Valued Contributor

Process details

I am using hpux 11i base OS. there is no glance. How can i find details of a process. ie when it started, how much memory and cpu it is taking.

I am getting the following output in top
0 pts/t5b 24808 bill 236 20 11756K 2480K run 1062:35 98.25 98.08 dfrun

What does 1062:35 means. number of second or minute?
4 REPLIES 4
Jeff Schussele
Honored Contributor

Re: Process details

Well....to get *real* detail you need glance.
You can install it for a trial period no charge.
And yes, the PID has used 1000+ minutes CPU time - must be a "pig".

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
A. Clay Stephenson
Acclaimed Contributor

Re: Process details

The best tool would be ps using the XPG4 behavior.

e.g.

UNIX95= ps -e -o comm,stime,vsz,pcpu

Man ps for details.
If it ain't broke, I can fix that.
Arunvijai_4
Honored Contributor

Re: Process details

Hi Khashru

You can use UNIX95 variable as Clay specified,

# UNIX95= ps -ef -o sz,vsz,pid,comm

This thread may help you,

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=763461

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Geoff Wild
Honored Contributor

Re: Process details

# cat processmem

#!/bin/sh
# processmem - display memory claimed by a process
#
if [ $# -lt 1 -o \( $# -gt 1 -a $# -lt 4 \) ]
then
echo "Usage:"
echo "processmem \"process\""
echo "Example:"
echo "processmem rpc"
exit 1
fi
echo " "

PROCESS=$1

mps=0
#for sz in `ps -elf | grep $PROCESS | grep -v grep | awk '{print $10}'`
for sz in `UNIX95= ps -e -o vsz=Kbytes -o ruser -o pid,args=Command-Line | sort -rnk1 | grep -v Kbytes | grep $PROCESS | awk '{print $1}'`
do
mps=`expr $mps + $sz`
done
#echo `expr $mps \* 4096`
echo "\nMemory claimed by $PROCESS: $mps Kbytes.\n"

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.