LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Reply
 
Search this Thread
Old 09-02-2008, 12:33 PM   #1
czezz
Member
 
Registered: Nov 2004
Location: Poland/Warsaw
Distribution: Slackware/Solaris
Posts: 563

Rep: Reputation: 30
Memory and swap usage ?


Is there any other way to display memory usage and swap than prstat -a (Solaris 10 SPARC)?
What I need to display is somethink like under Linux procinfo provide:
Code:
Memory:      Total        Used        Free      Shared     Buffers
Mem:        255460      243688       11772           0      111784
Swap:      1967920        2528     1965392
anything simillar ?
 
Old 09-02-2008, 01:53 PM   #2
popowich
Member
 
Registered: Nov 2004
Location: Rochester, New York
Distribution: RHEL5
Posts: 53

Rep: Reputation: 15
Hello,

You can use the vmstat command in Solaris to display memory and other usage statistics.

You can follow it with a number to have it continue running the command, for example vmstat 1 to update every second.

-Raymond

Last edited by popowich; 09-02-2008 at 01:55 PM.
 
Old 09-02-2008, 03:22 PM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,490

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
For RAM and swap statistics, here are some Solaris commands you might find useful:
Code:
echo '::memstat' | pfexec mdb -k
swap -l
kstat -n system_pages
 
Old 09-03-2008, 02:31 AM   #4
czezz
Member
 
Registered: Nov 2004
Location: Poland/Warsaw
Distribution: Slackware/Solaris
Posts: 563

Original Poster
Rep: Reputation: 30
Hey guys,
thanks for ur answares. My trys below:

vmstat does not provide sensible details (or im not sure how to read it)
The only thing im interested in vmstat is SWAP memory. No phisical memory usage in it
My swap is 24 Gb.
Here is what vmstat shows me:
Code:
 kthr      memory            page            disk          faults      cpu
 r b w   swap  free  re  mf pi po fr de sr m0 m1 m3 m4   in   sy   cs us sy id
 0 5 0 45746416 33384272 88 153 151 4 4 0 0 0  8 24  0 1439 17328 3918 23 2 75
 0 0 0 52386120 36746400 2 5 0  0  0  0  0  0  0  1  0  641 1010 1407 32  1 67
 0 0 0 52386224 36746448 0 0 0  2  2  0  0  0  0  1  0  664 1050 1405 35  1 65
 0 0 0 52386224 36746456 17 26 0 18 18 0 0  0  0  4  0  754 9092 1533 36  2 62
 0 0 0 52386224 36746472 33 78 0 0 0  0  0  6  0  1  0  765 14380 1443 34 1 65
52386120 - is not 24 Gigs

Another command that shows swap details:
Code:
# swap -l
swapfile             dev  swaplo blocks   free
/dev/dsk/c1t0d0s5   118,21     16 49170416 49170416
It provides datas in blocks... Im not sure how to count blocks to Megabytes but it indicate that all swap memory is free.


Another command
Code:
# echo '::memstat' | pfexec mdb -k
Page Summary                Pages                MB  %Tot
------------     ----------------  ----------------  ----
Kernel                     314332              2455    4%
Anon                      3164912             24725   38%
Exec and libs               23067               180    0%
Page cache                 135642              1059    2%
Free (cachelist)           138169              1079    2%
Free (freelist)           4607671             35997   55%

Total                     8383793             65498
Physical                  8229279             64291
Does MB column shows phisical RAM status ?
Page column is totally unreadable for me

Last edited by czezz; 09-03-2008 at 02:42 AM.
 
Old 09-03-2008, 03:01 AM   #5
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,490

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
Quote:
Originally Posted by czezz View Post
vmstat does not provide sensible details (or im not sure how to read it)
The latter statement is correct.
Quote:
The only thing im interested in vmstat is SWAP memory. No phisical memory usage in it
The free columns shows how much of your RAM is free (here 35 GB, not bad).
The swap column shows how much virtual memory is free, 52 GB. That includes free swap space + free ram.
Run "swap -s" to get details about it.

Quote:
Another command that shows swap details:
Code:
# swap -l
swapfile             dev  swaplo blocks   free
/dev/dsk/c1t0d0s5   118,21     16 49170416 49170416
It provides datas in blocks... Im not sure how to count blocks to Megabytes but it indicate that all swap memory is free.
Blocks are 512 bytes lenght:
49170416*512 = 25175252992 bytes = 23 GB.
Quote:
Code:
echo '::memstat' | pfexec mdb -k
hang up terminal - need to cancel it with CTRL+C.
Be patient and wait for the command to complete. Run it as root and remove the pfexec command.

What about kstat output ?
 
Old 09-03-2008, 04:01 AM   #6
czezz
Member
 
Registered: Nov 2004
Location: Poland/Warsaw
Distribution: Slackware/Solaris
Posts: 563

Original Poster
Rep: Reputation: 30
Hey Jlliagre,
many thanks for ur description
Now, life goes easier ;]


Here is an output of kstat:
Code:
kstat -n system_pages
module: unix                            instance: 0
name:   system_pages                    class:    pages
        availrmem                       7377904
        crtime                          49.7678981
        desfree                         64291
        desscan                         25
        econtig                         59244544
        fastscan                        186468
        freemem                         4541192
        kernelbase                      16777216
        lotsfree                        128582
        minfree                         32145
        nalloc                          25598342
        nalloc_calls                    12161
        nfree                           24877420
        nfree_calls                     7348
        nscan                           0
        pagesfree                       4541192
        pageslocked                     851375
        pagestotal                      8229279
        physmem                         8383793
        pp_kernel                       472670
        slowscan                        100
        snaptime                        766666.1963154
Output of echo '::memstat' | pfexec mdb -k alrdy corrected in the 1st post

Last edited by czezz; 09-03-2008 at 04:03 AM.
 
Old 09-03-2008, 04:51 AM   #7
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,490

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
Quote:
Originally Posted by czezz View Post
Code:
# echo '::memstat' | pfexec mdb -k
Page Summary                Pages                MB  %Tot
------------     ----------------  ----------------  ----
Kernel                     314332              2455    4%
Anon                      3164912             24725   38%
Exec and libs               23067               180    0%
Page cache                 135642              1059    2%
Free (cachelist)           138169              1079    2%
Free (freelist)           4607671             35997   55%

Total                     8383793             65498
Physical                  8229279             64291
Does MB column shows phisical RAM status ?
Yes.
Quote:
Page column is totally unreadable for me
The page size is 8kB on your system.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
High Swap Memory Usage rickylim Solaris / OpenSolaris 3 07-02-2006 05:27 PM
High Swap and Memory Usage rickylim Solaris / OpenSolaris 4 05-04-2006 08:56 PM
Memory / Swap Usage RoaCh Of DisCor Linux - Newbie 16 05-19-2005 02:45 PM
memory/swap usage koy Linux - Newbie 2 05-18-2004 11:12 AM


All times are GMT -5. The time now is 01:02 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration