How to find out the memory usage in Solaris?


 
Thread Tools Search this Thread
Operating Systems Solaris How to find out the memory usage in Solaris?
# 1  
Old 08-17-2014
How to find out the memory usage in Solaris?

Hi All,
In one of the solaris box aslert got triggered as ...
Code:
(Used_Real_Mem_Pct=93.0 Used_Swap_Space_Pct=75.0 )]

when i see the usage by vmstat and sar i am not able to relate the alert with the free memory and swap memory

please help to understand the vmstat output as below..
Code:
kthr      memory            page            disk          faults      cpu
 r b w   swap  free  re  mf pi po fr de sr s0 s1 s2 s3   in   sy   cs us sy id
 0 0 0 45522156 17792856 2837 11941 1954 203 198 0 9 5 -0 16 162 9313 77359 9757 2 2 96

currently 32 GB RAM is there..
Code:
ncmsas:/data2/users/mhdb $ swap -l
swapfile             dev  swaplo blocks   free
/dev/dsk/c1t0d0s1   30,1       8 67119560 30841936


please help to understand what is real used memory =93.0 and swap_sace_pct=75.0
Moderator's Comments:
Mod Comment Your repeated refusal to use CODE tags may make it impossible for you to post new messages for a few days.
Please use CODE tags when displaying sample input, sample output, and code segments.
Do not force the site administrators and moderators to clean up all of your posts.

Last edited by Don Cragun; 08-17-2014 at 02:43 AM.. Reason: Add CODE tags.
# 2  
Old 08-17-2014
The statistics reported by your monitoring tool do not match the vmstat and swap output, not to mention there are multiple definition of what free RAM and free swap mean and it is unclear which one it picks.

In any case, there might have been a transcient event where most RAM and a lot of swap were used but had resumed to normal when you ran the vmstat/swap commands.

I would recommend running also "swap -s" and "echo ::memstat | mdb -k" to get a better idea of the memory usage.
# 3  
Old 08-17-2014
I suggest to find out which process(es) is/are causing the most memory. Use

Code:
ps -Ao vsize[,<other-args>] | sort

to get the amount of memory (in KB) allocated by each process. For the other args to identify the processes consult the man page of ps.

I hope this helps.

bakunin
# 4  
Old 08-17-2014
Another point, your vmstat output only displays the first line of statistics.
This represent the average value since last boot (or counter rollout). You should post at least two lines of values to get the current metrics.
The 'sr' column is showing a non null value (9) that clearly means the system suffered some RAM shortage.
# 5  
Old 09-03-2014
Java sar -r

You can try sar command to get free memory.

$sar -r 2 2

SunOS 5.10 Generic_141414-09 sun4u 09/03/2014

07:46:33 freemem freeswap
07:46:35 350888 24634608
07:46:37 350887 24634576

Average 350888 24634592
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Find memory usage for a process

I have multiple oracle databases on one server. All the database are running from the same user i.e. oraent. The process for each database can be distinguished by the ps -ef command Eg : ps -ef | grep oraentThe Output : oraent 5361 1 0 20:58:05 ? 0:00 oracledb1... (11 Replies)
Discussion started by: yashreads
11 Replies

2. Solaris

Solaris memory usage

One of my Solaris Unix server has total RAM 128G . top & vmstat command shows free memory is 86G and usage is 42G. ps -eo pid,rss,commshows memory usage by process. when i sum all the memory usage by the process, it shows 1.9TB as shown below. $ ps -eo pid,pmem,vsz,rss,comm | sort -rnk2 |... (5 Replies)
Discussion started by: baladelaware73
5 Replies

3. UNIX for Advanced & Expert Users

Find memory usage along with time

Hi Guys, I have a script. It calls an executable inside (programmed in C). I will have to find the execution time of that script and amount of memory consumed by that process as well. #!/bin/sh echo "Script starting" echo "executable staring" executable parm1 parm2 parm3 echo... (4 Replies)
Discussion started by: PikK45
4 Replies

4. Shell Programming and Scripting

To find JVM memory usage in shell console

i need to find memory usage by JVM in shell prompt, i tried with pidVal=$( ps -ef | grep "/opt/bea2/jrockit/bin/java -jrockit" | grep -v grep | awk -F' ' '{print $2}' | tr "\n" "," | cut -d ',' -f1 ) top -b -n 1 | grep $pidVal this will just give cpu usage and ram... How do i find... (4 Replies)
Discussion started by: vivek d r
4 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

Oracle memory usage on Solaris box

I am working on Oracle 2 node RAC 10.2.0.4 on Solaris 10 T2000 kit. The box has around 32G of memory of which 24G is used by oracle user. There is 3G of free memory on the box. Sga max is set to 5G and while checking v$pgastat i see that maximum pga memory memory allocated was 6.5G. So oracle... (29 Replies)
Discussion started by: prabumohan
29 Replies

7. UNIX for Advanced & Expert Users

How to find out memory & cpu usage of a process

Hi, By using time command we can determine the execution time of a process or command. bash-2.04$ time ls -l total 0 -rw-r--r-- 1 admin tac 0 Oct 6 04:46 file1 -rw-r--r-- 1 admin tac 0 Oct 6 04:46 file2 real 0m0.002s user 0m0.000s sys 0m0.001s... (5 Replies)
Discussion started by: learn more
5 Replies

8. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

9. Solaris

Memory usage in Solaris - memory not freed?

Hi, I'm running a multi-process software system on a Solaris 8 machine. When I monitor the memory usage, I see that the free memory is dropping rapidly, but I can't detect a process that uses this memory. I'm using "top" to get the free memory and the memory usage of processes. Thanks. (3 Replies)
Discussion started by: gewurtz
3 Replies

10. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies
Login or Register to Ask a Question