Memory usage, free and used, using sar, top and vmstat in Solaris zone/container


 
Thread Tools Search this Thread
Operating Systems Solaris Memory usage, free and used, using sar, top and vmstat in Solaris zone/container
# 1  
Old 08-12-2010
Memory usage, free and used, using sar, top and vmstat in Solaris zone/container

Hi all,

I have a server running an Oracle database that is part of a Solaris M5000 container. Presumably this is referred to as a zone within a cluster, not sure if I get the terminology right.

Anyway, a third-party manages the zone and unfortunately is not "helpful/friendly" to assist me on how to check memory usage. Only info I got is that the server has been capped with a 8192M of memory.

Output from top shows as below:

Code:
Memory: 8192M phys mem, 72G free mem, 179G swap, 179G free swap

I assume this means the server has been allocated 8192M out of the container total of 72G.

Now I need to increase some Oracle parameter which presumably may or may not require more than the 8192M that the server has been allocated at the moment. Before doing that though, I want to know what is the current usage and free memory out of the 8129M that is currently allocated.

I thought if I run vmstat, it will show me how much of the 8192M is free but that does not seem to be the case.

The output of vmstat command is as below. The value under the free column seems to be for the whole Solaris container or am I wrong? How do I calculate how much of the allocated 8129M is used and how much is free?

Or should I be calculating the free memory of the zone as the (value of free from vmstat) - (value of free from top) in which case the memory used should then be 8192-((value of free from vmstat) - (value of free from top))

Code:
vmstat 5 10
 kthr      memory            page            disk          faults      cpu
 r b w   swap  free  re  mf pi po fr de sr lf s0 s1 s2   in   sy   cs us sy id
 0 4 0 253043824 92076232 14 42 15 0 0 0 0  0  0 10  0  384  634  212  2  3 94
 0 0 0 241363080 75768528 97 437 0 0 0 0 0  0  0  0  0   27 4770   63  3  7 89
 0 0 0 241337320 75743496 1 1 0 0  0  0  0  0  0  0  0   21 3925  103  1  4 95
 0 0 0 241329560 75735840 1 1 0 0  0  0  0  0  0  0  0   21 3531   26  2  4 95
 0 0 0 241357368 75764896 1 13 0 0 0  0  0  0  0 22  0   22 3560   56  1  4 95
 0 0 0 241341368 75772552 1 1 0 0  0  0  0  0  0  0  0   21 3501   20  2  3 95
 0 0 0 241357296 75774792 1 1 0 0  0  0  0  0  0 16  0   20 3652   27  1  4 95
 0 0 0 241364880 75779976 97 432 0 0 0 0 0  0  0  0  0   29 4584   66  3  8 89
 2 0 0 241364352 75779920 11 48 0 0 0 0  0  0  0  0  0   24 4018  128  2  4 94
 0 0 0 241358424 75774752 1 1 0 0  0  0  0  0  0  0  0   44 3482   21  1 29 70

I also tried using sar -r 5 10 and the output is as below and I should be able to get freemem =freemem*8 (pagesize=8k), is this correct? How to check what is the pagesize or is it always 8k for Solaris?

So for the sar output below, freemem = (10035380*8)/1024 = 78401.40625M, is this correct?


Code:
$ sar -r 5 10

SunOS camserver02 5.10 Generic_142900-14 sun4u    08/12/2010

22:02:02 freemem freeswap
22:02:07 10033571 483451427
22:02:12 10031976 483436909
22:02:17 10032355 483446381
22:02:22 10032384 483426890
22:02:27 10031904 483451523
22:02:32 10031876 483360378
22:02:37 10031266 483448275
22:02:42 10037833 483451718
22:02:47 10045598 483441792
22:02:52 10045397 483446253

Average  10035380 483436454

Alternatively, is there any other command that I can use to show memory used and free memory for the zone but not for the full container.

Any advise will be very much appreciated. Thanks in advance.
# 2  
Old 08-12-2010
"rcapstat" and "prstat -Z" might help understanding your memory usage.

To know what is your page size, you simply run the "pagesize" command.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

One script for Linux Monitoring-free, sar, vmstat, mpstat

HI , I am wrirting a script for checking the performance monitoring on Linux System when my application is running. I have to run a test for 30 minutes on some server and while the test is running i have to capture the perfromance metrics of Linux through vmstat , sar, mpstat, free. here is the... (3 Replies)
Discussion started by: Anamica
3 Replies

2. Shell Programming and Scripting

Swap usage by top and free command doesn't match

Its rather confusing, the output of top command is below: The "swap" field of top is described by the manpage as: "The swapped out portion of a task's total virtual memory image." But the output of free command suggests something else and it does tally with the output of swapon... (3 Replies)
Discussion started by: proactiveaditya
3 Replies

3. AIX

memory usage with vmstat

Hi Admins, Management asked me to submit last 3 months memory usage as part of quaterly capacity report.Last month only we have configured monitoring tool.So i cant use the tool to obtain the data.What i have is vmstat output for the last 3 months. How can i calculate memory usage using... (1 Reply)
Discussion started by: newaix
1 Replies

4. Solaris

Differences of Solaris zone and Solaris Container

Hi everyone! I am in dire need to know what are the differences between a solaris zone and a solaris container.. Explanations over the net are very confusing. Please help. Thanks! (8 Replies)
Discussion started by: arah
8 Replies

5. Solaris

Memory usage in a Solaris Container

Hi All, We have a server with Solaris 10 installed. The total memory of the server is 64GB. In order to check the memory info of the server I use "top" utility that gives me total and free memory in real-time. I have also installed a Sun container (non-global zone) on top of parent operating... (4 Replies)
Discussion started by: Slayer
4 Replies

6. Solaris

HELP - memory usage on Solaris : ps -efl and top

Hi all, OS Version: SunOS <hostname> 5.10 Generic_142900-13 sun4v sparc SUNW,Sun-Blade-T6340 I need some expert guidance on investigating memory usage on Solaris. I want to know whether am interpreting the output from ps -efl correctly and whether the command top is showing the right... (3 Replies)
Discussion started by: newbie_01
3 Replies

7. Solaris

Free memory in top and prstat command

Hi Export, i execute 'top' command to show the free memory in Solaris host, but the read is much lower than the RSS value shown in prstat command. Which one can reflect the real status and it is possible the difference caused by any patch of OS? Top command (only 883 memory is free)... (3 Replies)
Discussion started by: eiga
3 Replies

8. HP-UX

How can I get memory usage or anything that show memory used from sar file?

Refer from title: How can i get memory used or anything that can show memory from sar file example on solaris:- we can use sar with option to show memory used at time that sar crontab run. on HP-UX, it not has option to see memory used. But i think it may be have some parameter or some... (1 Reply)
Discussion started by: panithat
1 Replies

9. UNIX for Dummies Questions & Answers

How to get system memory usage like top

Hello all im working on sunos machine that dont have the top installed and can't be install , now i need to get information similar to what top gives me about the cpu usage and so can it be done somehow else where ? (3 Replies)
Discussion started by: umen
3 Replies

10. UNIX for Dummies Questions & Answers

BOX Status with vmstat & top Solaris 2.8

Hi there, I´m trying to get the information of vmstat & top in two different logfiles. That not that difficult. vmstat 30 >> myfile.log top >> myfile2.log But I also like to include a timestamp every 30 sec to be sure from what date the logs are. For the Top command I were able to... (2 Replies)
Discussion started by: isacs
2 Replies
Login or Register to Ask a Question