- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: top 10 process with ps on hpux 11.11
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2006 09:05 PM
тАО01-16-2006 09:05 PM
1. showing top 10 cpu consumers
2. top 10 memory consumers.
3. top 5 iowait (processes or diskusers)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2006 09:08 PM
- Tags:
- UNIX95
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2006 10:01 PM
тАО01-16-2006 10:01 PM
Re: top 10 process with ps on hpux 11.11
does UNIX95= ps -ef -o pid,ruser,vsz,args|sort -nrk3 show the meory in blocks or kb ? i would like to calculate it to mb.
What does the UNIX95 mean... is it an older shell interpreter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2006 10:07 PM
тАО01-16-2006 10:07 PM
Re: top 10 process with ps on hpux 11.11
Regarding UNIX95, this has been discussed already in the forums many times, you can see these threads for more information,
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=4177
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=943707
-Arun
P.S Dont forget to assign points.
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2006 10:13 PM
тАО01-16-2006 10:13 PM
Re: top 10 process with ps on hpux 11.11
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2006 10:16 PM
тАО01-16-2006 10:16 PM
Re: top 10 process with ps on hpux 11.11
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-17-2006 01:34 AM
тАО01-17-2006 01:34 AM
Re: top 10 process with ps on hpux 11.11
#!/bin/sh
# memtop - show top memory users and pid
# VSZ is in KB
echo "VSZ(KB) PID RUSER COMMAND"
UNIX95= ps -e -o 'vsz pid ruser args' |sort -nr|head -30
Next one tells you memory claimed by an ndividual process:
# cat processmem
#!/bin/sh
# processmem - display memory claimed by a process
# gwild 03192004
#
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-17-2006 08:32 PM
тАО01-17-2006 08:32 PM
Re: top 10 process with ps on hpux 11.11
1. echo " %CPU PID RUSER COMMAND" ;UNIX95= ps -ef -o 'pcpu pid ruser args'|sort -nr|head -10
2. echo " VSZ PID RUSER COMMAND";UNIX95= ps -ef -o 'vsz pid ruser args' |sort -nr|head -10
3. This gives you the lists of the process in wait state
UNIX95= ps -ef -o 'wchan state pid ruser args'|awk '$2=="W"||$1=="WCHAN"'
HTH,
Art