[HPADM] SUMMARY Monitoring performance/Memory usuage of process es

From: chris_fleming@agilent.com
Date: Thu Mar 27 2003 - 13:51:07 EST


Thanks to everyone that replied.

the summary is:
sar and vmstat can be used to monitor system wide resouce usuage

Lots of people pointed out that I could use a glance trial, however this is not ideal for this situation where I am investigating a problem on a machine in New Zealand and didn't have any application CD's available anywhere.

top -f does provide the functionality that I require as it will dump the top information to a file which I can then find the process I require. (I really did miss this in the top man page!)

However top marks go to Robert Binkley who gave me a script, the core of which provides the command:

UNIX95= ps -e -o ruser,vsz,cpu,pid,args

providing exactly what I require. Further investigation of the ps man page says that these options are XPG4 only and I guess this is what the UNIX95= activates. Can anyone explain what/why/how etc? (UNIX95= ps -e -H #is very nice!)

Anyway thanks to all (Alex Vinson, Mike Keighley, Lal Neeraj, Denise Newell, Jesus Talavera, Neeraj Lal, Brian Taylor and Robert Binkley) for all the quick responses... I can go home now and check the log files tommorow. :)

Cheers
Chris

ps. That script in full

#!/usr/bin/sh
#
# Show processes sorted by size of core image
#
# Usage:
# psram [ quantity ]
#
# where quantity is the top RAM processes to show (default is 20)
#
set -u
if [ $# -gt 0 ]
then
   TOPPROCS=$1
else
   TOPPROCS=20
fi

MYNAME=$(basename $0)
TEMPFILE=/var/tmp/$MYNAME.$$
trap `rm -f $TEMPFILE > /dev/null 2>&1` 0 1 2 3 15

UNIX95= ps -e -o ruser,vsz,pid,args > $TEMPFILE
head -1 $TEMPFILE
DASH5="-----"
DASH25="$DASH5$DASH5$DASH5$DASH5$DASH5"
echo "$DASH5---- $DASH5- $DASH5 $DASH25$DASH25"
grep -v "VSZ COMMAND" $TEMPFILE \
     | cut -c -78 \
     | sort -rn -k2 \
     | head -${TOPPROCS}
rm $TEMPFILE > /dev/null 2>&1
#### END OF SCRIPT

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:28 EDT