- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to check processes eating memory and swap reso...
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
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
тАО09-20-2004 06:43 PM
тАО09-20-2004 06:43 PM
I need to know how to track down the processes loading up my RAM and swap space.
Thank you very much.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2004 06:54 PM
тАО09-20-2004 06:54 PM
Re: How to check processes eating memory and swap resources
In short top & vmstat command will do the trick.
man top & man vmstat will give more details
than .....
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2004 07:18 PM
тАО09-20-2004 07:18 PM
Re: How to check processes eating memory and swap resources
Some other Tips here:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?admit=716493758+1095749490153+28353475&threadId=70516
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2004 07:51 PM
тАО09-20-2004 07:51 PM
Re: How to check processes eating memory and swap resources
By simply use, top to know with process informations.
glance tool will give memory, swap, etc.. informations about individual process.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-20-2004 07:54 PM
тАО09-20-2004 07:54 PM
Re: How to check processes eating memory and swap resources
simply use the "top" command (or glance if installed)
Regards
Franky
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-22-2004 06:17 AM
тАО09-22-2004 06:17 AM
Solution#!/usr/bin/sh
# /usr/local/scripts/sa.perf.sh
#
# Gathers performance info, pages on cpu low - run in crontab every 15 min.
#
# EXPLANATION:
#
# HP-UX Perf. Troubleshooting Flowchart:
#
# Step 1.
#
# sar -u (or sar -Mu for multiple processors)
#
# Is the %idle low?
#
# No -> The system is not CPU bound. Goto Step 3;
# Yes -> The system is possibly either CPU, memory, or I/O bound.
# Goto Step 2;
#
# Step 2.
#
# Is %usr high? (What is normal on this system?)
#
# No -> The system may be experiencing either a CPU, memory, or
# I/O bottleneck. Goto Step 3;
# Yes -> CPU bottleneck due to user processes
# Goto Section 3, Part A, Tuning a system with CPU bottleneck
#
# Step 3.
#
# Does %wio have a value > 15?
#
# Yes -> Possible disk or tape involvement in a bottleneck. Goto Step 4;
# No -> Goto Step 4;
#
# Step 4.
#
# sar -d
#
# Is %busy for any disks >50? (or Is %busy higher than normal?)
# For same disa(s), is avwait > avserv?
#
# No -> Most likely no disk bottlenecks, go to Step 6;
# Yes -> There seems to be an I/O bottleneck on this device. Goto Step 5;
#
# Step 5.
# There is a disk bottleneck. What is on that bottlenecked disk?
#
# Raw Partitions,
# File Systems -> Use glance for more info and tune the disk problem
# Swap -> Possibly caused by a memory bottleneck. Goto Step 6;
#
# Step 6.
#
# vmstat (vmstat -n 3 -> readable 80 column output, 3 samples)
#
# Over sustained periods of time, is po > 0?
# Is (free * 4k) < 2 MB,
# for a s800 system (The values 2 MB is a rough guide
#
# No -> If, in step 1, %idle was low, the system is most likely CPU
# If %idle not low, something other than cpu, memory, disk is problem.
# Yes -> There is a memory bottleneck on the system.
#
#
# BEGIN CODE:
#
umask 177
HOST=`hostname`
PERFLOG="/var/tmp/sa.hp.perf.log"
ALARM="/var/tmp/sa.hp.perm.alarm"
SALOG="/var/tmp/sa.hp.log"
PERCENT_IDLE_MIN=10
#
## This script should be run by root:
if [ x`id | grep root | awk '{print $1}'` = "x" ]; then
echo "Root privileges are required to run sa.hp.perm" >> $ALARM
exit
fi
echo "" >> $PERFLOG
echo "**************** `date` ******************" >> $PERFLOG
echo "**************** users on ****************" >> $PERFLOG
who -q >> $PERFLOG
echo "" >> $PERFLOG
# Check cpu with sar
echo "" >> $PERFLOG
echo "sar -Mu output:" >> $PERFLOG
echo "" >> $PERFLOG
sar -Mu 1 3 >> $PERFLOG
# Page someone if cpu idle is too low
PERCENT_IDLE=`sar 1 3 | tail -1 | awk '{print $5}'`
if [ $PERCENT_IDLE -lt $PERCENT_IDLE_MIN ]; then
echo "CPU on $HOST is only $PERCENT_IDLE idle" >> $ALARM
fi
# Check buffers with sar
echo "" >> $PERFLOG
echo "sar -b output:" >> $PERFLOG
echo "" >> $PERFLOG
sar -b 1 3 >> $PERFLOG
# %rcache should be >= 90
# %wcache should be >= 70
# Check io with iostat
echo "" >> $PERFLOG
echo "iostat output:" >> $PERFLOG
echo "" >> $PERFLOG
iostat >> $PERFLOG
# Check disk io with sar
echo "" >> $PERFLOG
echo "sar -d output:" >> $PERFLOG
echo "" >> $PERFLOG
sar -d 1 3 >> $PERFLOG
# Check virtual memory with vmstat
echo "" >> $PERFLOG
echo "vmstat -n 1 3 output:" >> $PERFLOG
echo "" >> $PERFLOG
vmstat -n 1 3 > /tmp/vmstat.txt
echo "" >> $PERFLOG
cat /tmp/vmstat.txt >> $PERFLOG
rm /tmp/vmstat.txt
# Check top process with top
echo "" >> $PERFLOG
echo "top -d1 output:" >> $PERFLOG
echo "" >> $PERFLOG
top -d1 > /tmp/top.txt
echo "" >> $PERFLOG
cat /tmp/top.txt >> $PERFLOG
sleep 2
rm /tmp/top.txt
# Notify someone!
if [ -f $ALARM ]; then
MAILLIST=[your mail list]
mailx -s "$HOST SYSALARM" "$MAILLIST" < $ALARM
#echo `cat $ALARM`
echo "`date +'%b %d %y %H:%M'` `cat $ALARM`" >> $SALOG
rm $ALARM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-22-2004 06:22 AM
тАО09-22-2004 06:22 AM
Re: How to check processes eating memory and swap resources
ps -ef | cut -c42-80 | sort -nr | head
This lists the top 10 processes in terms of CPU usage and usually the bad apple stands out.
Best regards,
Kent M. Ostby
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-22-2004 07:23 AM
тАО09-22-2004 07:23 AM
Re: How to check processes eating memory and swap resources
# 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
I have a cool utility from HP called kmeminfo
partial output:
Summary of processes memory usage:
List sorted by physical size, in pages/bytes:
virtual physical swap
pid ppid pages / bytes pages / bytes pages / bytes command
5037 5033 11556 45.1m 8048 31.4m 9560 37.3m Xhp
28468 1 8808 34.4m 4293 16.8m 4707 18.4m nautilus
4362 1 8294 32.4m 3269 12.8m 3680 14.4m scopeux
Let me know what OS you have (11.0 or 11.11) parisc - and I can post it.
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-22-2004 04:09 PM
тАО09-22-2004 04:09 PM
Re: How to check processes eating memory and swap resources
Im using HPUX 11.0
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-23-2004 12:38 AM
тАО09-23-2004 12:38 AM
Re: How to check processes eating memory and swap resources
It's a shar archive, zipped up first with winzip, so download, unzip it, ftp to your HP server, and execute:
sh kmeminfo_11_0.sh
Run it like:
/usr/local/bin/kmeminfo
or
/usr/local/bin/kmeminfo -user
I created myself a script to run from cron:
0 1,5,9,13,17,21 * * * /usr/local/bin/kmeminfo.get.sh > /dev/null 2>&1
cat /usr/local/bin/kmeminfo.get.sh
#!/bin/sh
#
# script to run kmeminfo and store data
# gwild
LOG=/tmp/`/usr/bin/uname -n`kmeminfo.out
LOGU=/tmp/`/usr/bin/uname -n`kmeminfouser.out
/usr/bin/echo " " >> $LOG
/usr/bin/date >> $LOG
/usr/bin/echo " " >> $LOG
/usr/local/bin/kmeminfo >> $LOG
sleep 120
/usr/bin/echo " " >> $LOGU
/usr/bin/date >> $LOGU
/usr/bin/echo " " >> $LOGU
/usr/local/bin/kmeminfo -user >> $LOGU
WARNING - I have found that the 11.0 version caused zombies with the -user option - so watch that - if it does, then don't run it with the -user optin - only the first way.
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2004 05:19 PM
тАО10-05-2004 05:19 PM