Sunday, February 17, 2008

solaris: how to check real memory usage

#ps -e -o pid -o pmem -o pcpu -o args
10557 29.7 0.0 oracleRP1 (DESCRIPTION=(LOCAL=NO)(SDU=32768))
13631 0.0 0.0 /usr/openv/volmgr/bin/oprd -sockfd 6
25983 29.6 0.0 oracleRP1 (DESCRIPTION=(LOCAL=NO)(SDU=32768))
11374 29.6 0.0 oracleRP1 (DESCRIPTION=(LOCAL=NO)(SDU=32768))
19227 0.0 0.0 /usr/openv/volmgr/bin/oprd -sockfd 6
11244 29.6 0.0 oracleRP1 (DESCRIPTION=(LOCAL=NO)(SDU=32768))

pmem The ratio of the process's resident set size to the physical memory on the machine, expressed as a percentage.


another way to check:
memory
Report on usage of virtual and real memory.

swap amount of swap space currently available
(Kbytes)

free size of the free list (Kbytes)

page Report information about page faults and paging
activity. The information on each of the following
activities is given in units per second.
# vmstat 2 10
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr s0 s1 s2 s3 in sy cs us sy id
0 5 0 70804464 8978120 588 1970 915 8 8 0 0 0 0 0 0 8548 39921 18926 5 4 91
0 0 0 70409832 11055384 299 1898 0 0 0 0 0 0 0 0 0 8008 30560 6888 3 1 96
0 0 0 70414672 11059536 155 951 0 0 0 0 0 0 0 0 0 5277 18103 5589 2 0 98
0 0 0 70416672 11061992 1 0 0 0 0 0 0 0 0 0 0 7124 6024 5999 2 0 98
0 0 0 70416672 11061984 0 0 0 0 0 0 0 0 0 0 0 4314 4849 4604 1 0 99
0 0 0 70416672 11061976 0 0 0 0 0 0 0 0 0 0 0 5616 4750 5152 1 1 97
0 1 0 70416184 11060760 282 1230 0 0 0 0 0 0 0 0 0 4507 19205 4318 2 0 98
0 0 0 70416592 11061712 155 742 0 0 0 0 0 0 0 0 0 4737 15962 5091 1 1 98
0 1 0 70416560 11061688 0 0 0 0 0 0 0 0 0 0 0 6394 6252 5918 2 1 97
0 1 0 70416624 11061688 560 2165 0 8 4 0 0 0 0 0 0 4814 25827 5041 2 1 97
# /usr/platform/sun4u/sbin/prtdiag | more
System Configuration: Sun Microsystems sun4u Sun Fire V890
System clock frequency: 150 MHz
Memory size: 65536 Megabytes

========================= CPUs ===============================================

Run E$ CPU CPU
Brd CPU MHz MB Impl. Mask
--- ----- ---- ---- ------- ----
A 0, 16 1500 32.0 US-IV+ 2.2
B 1, 17 1500 32.0 US-IV+ 2.2
A 2, 18 1500 32.0 US-IV+ 2.2
B 3, 19 1500 32.0 US-IV+ 2.2
C 4, 20 1500 32.0 US-IV+ 2.2
D 5, 21 1500 32.0 US-IV+ 2.2
C 6, 22 1500 32.0 US-IV+ 2.2
D 7, 23 1500 32.0 US-IV+ 2.2

========================= Memory Configuration ===============================

Logical Logical Logical
MC Bank Bank Bank DIMM Interleave Interleaved
------------ analysis-----------
free memory is about 11061688Kbytes =10Gbytes
total memory is 64Gbytes

No comments:

UNIX: How to print column nicely using printf

[user@hostfwnms1-oam tmp]# cat b.sh printf "%-26s %-19s %-8s %-8s %-s %-s\n" HOSTNAME IP PING SNMPWALK 0-ok 1-fail for i in `cat n...