👤
Home Man
Search
Today's Posts
Register

The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

getting available physical RAM

👤 Login to reply

 
Thread Tools Search this Thread
# 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 01:13 PM.. Reason: better explanation
👤 Login to reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
ZFS : Can arc size value exceed Physical RAM ? sapre_amit Solaris 2 10-11-2012 01:48 AM
Confusion Regarding Physical Volume,Volume Group,Logical Volume,Physical partition kashifsd17 UNIX for Dummies Questions & Answers 6 07-06-2012 04:19 PM
Physical RAM Duffs22 Red Hat 2 04-11-2012 09:22 AM
svc:/network/physical:default: Method "/lib/svc/method/net-physical" failed with exit status 96. [ n andersonedouard Solaris 2 06-14-2011 03:43 AM
Solaris sun4v - how do you determine physical RAM? thomn8r Solaris 12 06-21-2010 03:11 AM
Maximum Limit of HMC to handle Physical Power Virtualization Physical Machine jenish_shah AIX 1 01-09-2010 03:55 PM
red hat Linux 5.0 is detecting 3gb ram but physical ram is 16gb manoj.solaris Red Hat 4 01-08-2009 01:01 PM
RAM Physical Memory usage by each Process. bsrajirs Solaris 12 11-19-2007 08:18 AM
Physical volume- no free physical partitions markper UNIX for Dummies Questions & Answers 9 01-09-2007 01:00 PM
physical volume and physical disk. VeroL UNIX for Dummies Questions & Answers 2 01-22-2004 09:32 AM


All times are GMT -4. The time now is 08:12 PM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
×
UNIX.COM Login
Username:
Password:  
Show Password