Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-25-2005, 04:29 AM
|
#1
|
Member
Registered: Nov 2001
Location: NRW, Germany
Distribution: SLES / FC/ OES / CentOS
Posts: 614
Rep:
|
free physical memory
Hello!
I simply would like to find out how much physical memory is free on my server ?
Something like 'free -m'
Thanks !
|
|
|
08-25-2005, 06:11 AM
|
#2
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795
|
vmstat's column "free" reports free physical memory available.
ignore the first sample, as it's the average since last reboot.
|
|
|
08-25-2005, 12:21 PM
|
#3
|
Member
Registered: Nov 2004
Location: BIOS
Distribution: RHEL3.0, FreeBSD 5.x, Debian 3.x, Soaris x86 v10
Posts: 379
Rep:
|
|
|
|
08-25-2005, 01:00 PM
|
#4
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795
|
prtconf doesn't report free memory but installed memory.
|
|
|
08-26-2005, 06:40 AM
|
#5
|
Member
Registered: Nov 2001
Location: NRW, Germany
Distribution: SLES / FC/ OES / CentOS
Posts: 614
Original Poster
Rep:
|
thanks
what vmstat says:
procs memory page disk faults cpu
r b w swap free re mf pi po fr de sr s6 sd sd sd in sy cs us sy id
0 0 0 12860632 5120448 114 590 631 1 1 0 0 0 4 4 8 77 148 324 79 16 5
0 0 0 12676104 4893432 1 368 0 0 0 0 0 0 7 5 6 5017 14614 9011 31 7 62
0 0 0 12676072 4893400 0 197 0 0 0 0 0 0 1 1 7 3619 13456 8272 21 6 73
so the last line would sys I have 4893400 kb of free memory.
so 4893400 / 1024 = 4778 MB free ????
How do I get to MB ?
|
|
|
08-26-2005, 10:30 AM
|
#6
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795
|
Quote:
so 4893400 / 1024 = 4778 MB free ????
|
Precisely, you have 4.66 GB free.
Here's the bigger  machine I'm currently running:
I has 48 Gigabytes of RAM
Code:
$ prtconf | head -2
System Configuration: Sun Microsystems sun4u
Memory size: 49152 Megabytes
It has plenty of that memory currently unused:
Code:
$ vmstat 1 2
procs memory page disk faults cpu
r b w swap free re mf pi po fr de sr s0 s1 s3 s3 in sy cs us sy id
0 0 0 46338392 43237520 10 44 7 4 4 0 0 1 1 2 1 327 1638 518 1 0 99
0 0 0 49814392 47284968 0 8 0 0 0 0 0 0 0 0 0 302 328 458 0 0 100
which I can convert to 46176 MB or 45.09 GB.
Code:
$ bc
scale=2
47284968/1024
46176.72
47284968/1024/1024
45.09
My laptop is less lucky:
Code:
$ prtconf -v | head -2
System Configuration: Sun Microsystems i86pc
Memory size: 511 Megabytes
$ vmstat 1 2
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr cd s0 -- -- in sy cs us sy id
0 0 0 865600 254276 15 97 9 0 0 0 11 2 0 0 0 269 1088 381 9 2 89
0 0 0 837036 221256 0 7 0 0 0 0 0 0 0 0 0 311 2334 534 6 0 94
216 MB free ...
|
|
|
08-26-2005, 11:49 AM
|
#7
|
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 11,311
|
Incidentally, it is a Good Thing for physical memory to be as full as possible. If there's anything out there that it could contain, then it is advantageous for something to be there.
Linux will naturally use "free" memory for buffers of various sorts .. so-called shared memory. As the system begins to experience memory pressure, that allocation may start to go down, because buffers are a lower-priority use of memory.
The key performance-figure is to observe, not so much "what is the system is doing," but "who is experiencing pain because of it?" How many processes are experiencing substantial involuntary waits due to paging? How many of them are unable to achieve keeping their working-sets (the amount of memory they would like to have right now) in-memory? You need to somewhat-disregard the behavior that an application may experience while it is starting-up, but when it is stable and has been running for a minute or so, you can tell if it's "crying" or not.
|
|
|
08-26-2005, 12:22 PM
|
#8
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,795
|
No doubt maximizing memory use is a "Good Thing" (tm), and Solaris is pretty efficient at it.
That said, when you have 48 Gigabytes, on a quiet day that's hard to fill ...
|
|
|
All times are GMT -5. The time now is 01:36 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|