getting available physical RAM | Unix Linux Forums | Solaris

  Unix/Linux Go Back    


Solaris 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

Solaris


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 02-26-2006
dangral dangral is offline Forum Advisor  
Registered User
 
Join Date: Oct 2002
Last Activity: 31 July 2013, 6:52 PM EDT
Posts: 723
Thanks: 3
Thanked 4 Times in 4 Posts
getting available physical RAM

What command should I be using on Solaris 9 to get an accurate representation of the available physical RAM?
Sponsored Links
    #2  
Old Unix and Linux 02-26-2006
pressy's Unix or Linux Image
pressy pressy is offline Forum Advisor  
solaris cultist
 
Join Date: Aug 2003
Last Activity: 12 March 2014, 9:56 AM EDT
Location: Vienna / Austria (Europe) [EARTH]
Posts: 732
Thanks: 1
Thanked 2 Times in 2 Posts
you could have a look in your prtdiag(M) output or prtconf(M) or swap(M)

gP
Sponsored Links
    #3  
Old Unix and Linux 02-26-2006
dangral dangral is offline Forum Advisor  
Registered User
 
Join Date: Oct 2002
Last Activity: 31 July 2013, 6:52 PM EDT
Posts: 723
Thanks: 3
Thanked 4 Times in 4 Posts
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 Unix and Linux 02-26-2006
zazzybob's Unix or Linux Image
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
 
Join Date: Dec 2003
Last Activity: 13 May 2013, 9:02 AM EDT
Location: Melbourne, Australia
Posts: 2,185
Thanks: 3
Thanked 24 Times in 23 Posts
Hmm... what about....


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

Cheers
ZB
Sponsored Links
    #5  
Old Unix and Linux 02-28-2006
dangral dangral is offline Forum Advisor  
Registered User
 
Join Date: Oct 2002
Last Activity: 31 July 2013, 6:52 PM EDT
Posts: 723
Thanks: 3
Thanked 4 Times in 4 Posts
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
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
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
Maximum Limit of HMC to handle Physical Power Virtualization Physical Machine jenish_shah AIX 1 01-09-2010 03:55 PM
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 07:22 AM.