memory usage

How do you tell how much system memory is free on a solaris 9 box?

I can run prstat but it is like all the processes and stuff seperate,
is there somewhere i can get a reading on the box as a whole?

man vmstat

By the way, in most cases free memory means absolutely nothing on a Solaris box.

use vmstat and look at the column under sr.
If it is ZERO, you have enough memory on the server

Hi pal.. go out for 'vmstat'

# vmstat 1

this will give u the status of ur memory for 1 sec in that you can see the swap space present. Bye..

may be you can use
sar -r 2 100 ( 2 is inteval time and 100 is polling number)

you must see like this

10:10:40 freemem freeswap
10:10:42 54903 4945408
10:10:44 54903 4945408

the result show you in pages , that mean now this system has freemem 54903 pages

if you want to calculate it to kbyte you use command

pagesize

that will show you like this

root@sol9_e250 # pagesize
8192

that mean 1 pagesize = 8k , if your system has 54903 pages , your system has freemem = (54903 *8)/1024 ~429 MB

+++++++++++++++++++++++
Second solution ( easy)

you use
vmstat 3 you shuold see like this

kthr memory
r b w swap free
0 0 0 2476904 447520
0 0 0 2473032 439552
0 0 0 2473032 439552

The memory tab , it shows

memory/swap: Free, unreserved swap space (Kb).
memory/free: Free memory (Kb). (Note that this will grow until it reaches lotsfree, at which point the page scanner is started. See "Paging" for more details.) ( lotsfree is one parameter in kernel that you can set it by mdb -kw )

:slight_smile:

PS: Sorry about my weak english