getting available physical RAM


 
Thread Tools Search this Thread
Operating Systems Solaris getting available physical RAM
# 1  
Old 02-26-2006
getting available physical RAM

What command should I be using on Solaris 9 to get an accurate representation of the available physical RAM?
# 2  
Old 02-26-2006
you could have a look in your prtdiag(M) output or prtconf(M) or swap(M)

gP
# 3  
Old 02-26-2006
What I meant to say is if i have for example 6GB of physical RAM and 3 GB's are being used, how can I find that?
top shows:
Quote:
Memory: 6144M real, 3123M free, 2000M swap in use, 14G swap free
swap -s shows:

Quote:
total: 138016k bytes allocated + 11472k reserved = 149488k used, 10974472k available
So top seems to be showing that 3 GB's are being used. Where can I see that in the swap output?
# 4  
Old 02-26-2006
Hmm... what about....

Code:
$ vmstat 1 2 | sed -n '$ p' | awk '{print $5}'

Cheers
ZB
# 5  
Old 02-28-2006
Thanks zazzybob. That's what I was looking for. This is the code I was using it for, since I wanted the percentage of physical RAM used.

Code:
TOTAL_RAM=`prtdiag | grep '^Memory size' | awk -F: '{ print $2 }' | awk '{ print $1 }'`
(( TOTAL_RAM = TOTAL_RAM * 1000 ))

AVAIL_RAM=`vmstat 1 2 | sed -n '$ p' | awk '{print $5}'`

RAM_PERC=`echo "scale = 2; $AVAIL_RAM/$TOTAL_RAM" | bc | sed 's/\.//'`
(( RAM_PERC = 100 - RAM_PERC ))


Last edited by dangral; 02-28-2006 at 02:13 PM.. Reason: better explanation
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

ZFS : Can arc size value exceed Physical RAM ?

Hi, kstat -p -m zfs -n arcstats -s size returns zfs:0:arcstats:size 8177310584 this values is approx (7.61 GB) but my Physical Memory size is only 6144 Megabytes. Can this happen ? if yes, then how can I find free memory on the system. BTW, I ran the kstat commands from a Non... (2 Replies)
Discussion started by: sapre_amit
2 Replies

2. UNIX for Dummies Questions & Answers

Confusion Regarding Physical Volume,Volume Group,Logical Volume,Physical partition

Hi, I am new to unix. I am working on Red Hat Linux and side by side on AIX also. After reading the concepts of Storage, I am now really confused regarding the terminologies 1)Physical Volume 2)Volume Group 3)Logical Volume 4)Physical Partition Please help me to understand these concepts. (6 Replies)
Discussion started by: kashifsd17
6 Replies

3. Red Hat

Physical RAM

Hi, I have a server (BL460c) with 32G of physical RAM. It currently only uses approx 5% its capacity but will use more (not sure how much more) pending the launch of further applications. If I need to build another node of similar functionality should I consider downgrading the physical... (2 Replies)
Discussion started by: Duffs22
2 Replies

4. Solaris

svc:/network/physical:default: Method "/lib/svc/method/net-physical" failed with exit status 96. [ n

After a memory upgrade all network interfaces are misconfigued. How do i resolve this issue. Below are some out puts.thanks. ifconfig: plumb: SIOCLIFADDIF: eg000g0:2: no such interface # ifconfig eg1000g0:2 plumb ifconfig: plumb: SIOCLIFADDIF: eg1000g0:2: no such interface # ifconfig... (2 Replies)
Discussion started by: andersonedouard
2 Replies

5. Solaris

Solaris sun4v - how do you determine physical RAM?

I have a Sun T5120, and I want to programmatically determine how much RAM it has. # uname -a SunOS myhost 5.10 Generic_141444-09 sun4v sparc SUNW,SPARC-Enterprise-T5120 The box has 64Gb; I tried prtdiag and prtconf, but they give me bogus info prtconf gives me: # prtconf |grep -i... (12 Replies)
Discussion started by: thomn8r
12 Replies

6. AIX

Maximum Limit of HMC to handle Physical Power Virtualization Physical Machine

Hello All, Can anybody please tell me what is the maximum limit of Physical IBM Power Machine which can be handled by single HMC at a single point of time? Thanks, Jenish (1 Reply)
Discussion started by: jenish_shah
1 Replies

7. Red Hat

red hat Linux 5.0 is detecting 3gb ram but physical ram is 16gb

Hi, On server 64bit Hw Arch , Linux 5.0(32bit) is installed it is showing only 3gb of ram though physical is 16gb can u give me idea why? (4 Replies)
Discussion started by: manoj.solaris
4 Replies

8. Solaris

RAM Physical Memory usage by each Process.

Hi All, I am trying to find the physical memory usage by each process/users. Can you please let me know how to get the memory usage?. Thanks, bsraj. (12 Replies)
Discussion started by: bsrajirs
12 Replies

9. UNIX for Dummies Questions & Answers

Physical volume- no free physical partitions

I was in smit, checking on disc space, etc. and it appears that one of our physical volumes that is part of a large volume group, has no free physical partitions. The server is running AIX 5.1. What would be the advisable step to take in this instance? (9 Replies)
Discussion started by: markper
9 Replies

10. UNIX for Dummies Questions & Answers

physical volume and physical disk.

Hello, I need explanations about physical disks and physical volumes. What is the difference between these 2 things? In fact, i am trying to understand what the AIX lspv2command does. Thank you in advance. (2 Replies)
Discussion started by: VeroL
2 Replies
Login or Register to Ask a Question