Operating System - HP-UX
1832191 Members
3027 Online
110038 Solutions
New Discussion

Re: How do I find out system memory

 

How do I find out system memory

I have N4000 and RP8400, I cannot use cstm or dmesg. Ant quick tips
Which does not kill you only makes you stronger
8 REPLIES 8
Stefan Farrelly
Honored Contributor

Re: How do I find out system memory

check syslog.log and OLDsyslog.log, there should be a phyiscal memory line in one of them from the last boot.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Robert-Jan Goossens
Honored Contributor

Re: How do I find out system memory

Hi,

# grep Physical /var/adm/syslog/syslog.log

Robert-Jan
MarkSyder
Honored Contributor

Re: How do I find out system memory

Or, if you're a sam freak (like me):

SAM, performance monitors, system properties, memory.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Mark Grant
Honored Contributor

Re: How do I find out system memory

You could write a quick C program as attached.

compile with "cc -s -o memprog filename.c" where filename.c is whatever you saved this as.

with no argument print memory. With "-a" argumanet print a load of other stuff too.
Never preceed any demonstration with anything more predictive than "watch this"
Jean-Luc Oudart
Honored Contributor

Re: How do I find out system memory

From Merijn's web site (FAQ)
http://hpux.ws/merijn/


a5:/ 112 # echo "selclass qualifier memory;info;wait;infolog" | cstm | grep 'Total Configured'
Total Configured Memory : 2048 MB
a5:/ 113 # echo 'memory_installed_in_machine/D' | adb -k /stand/vmunix /dev/mem | perl -nle'/(\d+)/&&print$1*4,"k"'
2097152k
a5:/ 114 # grep Physical /var/adm/syslog/syslog.log
Aug 25 08:01:07 a5 vmunix: Physical: 2097152 Kbytes, lockable: 1562360 Kbytes, available: 1801856 Kbytes
a5:/ 115 #

Regards,
Jean-Luc
fiat lux
Pete Randall
Outstanding Contributor

Re: How do I find out system memory

Robert,


I use this little script:


HPUX=/stand/vmunix
MAJORREV=$(uname -r | cut -f2 -d .)
if [ $MAJORREV -ge "11.0" ]
then
MYSYMBOL="phys_mem_pages"
else
MYSYMBOL="physmem"
fi

MYMEM=$(echo "${MYSYMBOL}/D" \
| adb $HPUX /dev/kmem \
| grep "${MYSYMBOL}: *." \
| awk '{printf "%.0f MB\n",$2/256}')
echo $MYMEM


Pete

Pete
Steve Steel
Honored Contributor

Re: How do I find out system memory

Hi

Script it indeed

I use the one below


It gives machine . Memory the kernel knows of swap and process usage

Line numbers are for convenience
1 #RSZ = Resident set size
2 #VSZ = Virtual set size
3 #
4 #RSZ is a subset of VSZ
5 #-the portion of the processes memory which is 'resident'
6 #in physical memory (ie not paged out).
7 #
8 #VSZ is the total size, including resident and non-resident pages.
9 #
10 #These values are totals, obtained by adding up the memory utilisation of the
11 #processes various memory segments (of which there can be lots).
12 #################################################################################
13 uname -a
14 echo -------------------------------------
15 /bin/rm /tmp/$PPID 2>/dev/null
16 if [ "$LOGNAME" = "root" ]
17 then
18 echo memory from kernel
19 name=$(file /stand/vmunix|grep 64)
20 if [ "$name" = "" ]
21 then
22 echo phys_mem_pages/D | adb /stand/vmunix /dev/kmem 2>/dev/null
23 else
24 echo phys_mem_pages/D | adb64 /stand/vmunix /dev/kmem 2>&1|grep -i page
25 fi
26 fi
27
28 echo " "
29 echo swap
30 echo -----------------
31 swapinfo -tm
32 echo " "
33 echo memory usage per process
34 echo "----------------------------------------------"
35 UNIX95= ps -e -o ruser,vsz,sz,pid,args > /tmp/$PPID
36 head -n 1 /tmp/$PPID
37 tail -n +2 /tmp/$PPID|
38 sort -rnk2
39 /bin/rm /tmp/$PPID 2>/dev/null


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

Re: How do I find out system memory

Here's a script I use - need to be root:

# hpmem
HP-UX pc0004 B.11.11 U 9000/800 2504392628 unlimited-user license
CPU Count: 6
CPU Speed: 750 MHz
CPU HW Support: 64-bit
Kernel Support: 64-bit
RAM Size: 10080 MB
bufpages: 806 MB
maxuprc: 800
maxvgs: 128
maxfiles: 2048
max_thread_proc: 256
nfile: 189100
nflock: 1200
nproc: 2560
ninode: 16384
shmmax: 1073741824
shmmni: 256
dbc_max_pct: 8


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.