1758043 Members
2097 Online
108867 Solutions
New Discussion юеВ

Re: Memory usage

 
Siddique_1
Occasional Contributor

Memory usage

Hi,
How do I monitor memory usage on HP-UX 11.0 cluster system. I have no X display.
Many thanks in advance,
Nadeem
5 REPLIES 5
Steve Steel
Honored Contributor

Re: Memory usage

Hi


get hold of glance

It has a non graphic option and is a very useful tool

Anyway what do you want to monitor exactly

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Rajeev  Shukla
Honored Contributor

Re: Memory usage

Hi,
Go through the man pages of "vmstat" you can use vmstat to see the memory usage also swapinfo will help you getting memory and swaping info.

Cheers
Rajeev
U.SivaKumar_2
Honored Contributor

Re: Memory usage

Hi,

Run this command

#top

Wonderful utility which gives memory usage stats online.

regards,
U.SivaKumar
Innovations are made when conventions are broken
Zeev Schultz
Honored Contributor

Re: Memory usage

cat /proc/meminfo (joking :) it's in Linux)
use vmstat ,
look for "free" wich is free pages number,
page size is 4k,so calculate 4 x "free".
Also put attention to 'po' in vmstat,means page
outs to disks ie moves of pages from memory to
disk(s).Glance however is much more nice although isn't free.It can work in text-menue
(no X needed).
So computers don't think yet. At least not chess computers. - Seymour Cray
Steve Steel
Honored Contributor

Re: Memory usage

Hi

This script collects a lot of info as an example

#!/usr/bin/ksh
#Do this
#---------
/bin/rm /tmp/sarlis /tmp/toplis 2>/dev/null
top -d5 -n60 -f /tmp/toplis&
sar -A -o /tmp/sarlis 5 10 >/dev/null 2>&1
# parameter = /tmp/sarlis
#Mail me /tmp/toplis
file=/tmp/sarlis
wait
xx="u d q b w c a y v m"
for f in $xx
do
echo "sar -$f -f $file" >> /tmp/toplis
echo "======================================================================
========" >> /tmp/toplis
sar -$f -f $file >> /tmp/toplis
echo "======================================================================
========" >> /tmp/toplis
done

see /tmp/toplis and man sar


To see per process

#!/usr/bin/ksh
#
# 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


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)