Finding used memory %


 
Thread Tools Search this Thread
Operating Systems Solaris Finding used memory %
# 8  
Old 08-09-2010
Try this:
Code:
prtconf | grep "Memory size" | awk '{print $3}' | awk 'NR==1{m=$0*1024;next}NR>2{print $1,$2/m,"%"}' - - <(ps -e -o comm,vsz)

# 9  
Old 08-09-2010
i have another problem... all commands dont show real used memory...


for example;

prstat -s size -n 10 command

13097 oraclert 16G 16G sleep 59 0 18:31:58 0.0% oracle/258
13099 oraclert 16G 16G sleep 59 0 5:34:00 0.0% oracle/12
13095 oraclert 16G 16G sleep 59 0 18:32:43 0.0% oracle/258
13107 oraclert 16G 16G sleep 59 0 4:57:49 0.0% oracle/1
13101 oraclert 16G 16G sleep 59 0 2:41:38 0.0% oracle/17
13109 oraclert 16G 16G sleep 59 0 0:43:23 0.0% oracle/1
13103 oraclert 16G 16G sleep 59 0 0:22:59 0.0% oracle/1
13086 oraclert 16G 16G sleep 59 0 4:24:54 0.0% oracle/1
3690 oraclert 16G 16G sleep 59 0 0:00:00 0.0% oracle/1
13113 oraclert 16G 16G sleep 59 0 0:00:27 0.0% oracle/1
etc.........................................................................
i sum total used memory,its greather then system memory...
my system memory is 128GB ... .

---------- Post updated at 08:39 AM ---------- Previous update was at 08:31 AM ----------

ps -e -o comm,vsz

this code not show real used memory...

if i sum total used memory,its approximately %500

how can list REAL used memory?
# 10  
Old 08-09-2010
This is expected. Shared RSS is accounted for every process using it. Have a look at the second paragraph in the NOTES section of the "prstat" manual page.
# 11  
Old 08-10-2010
sorry , i don't understand .. what is the second paragraph in the NOTES section of the "prstat" manual page?
# 12  
Old 08-10-2010
prstat(1M) - report active process statistics (man pages section 1M: System Administration Commands) - Sun Microsystems

Code:
Notes

      The snapshot of system usage displayed by prstat is true
only for a split-second, and it may not be accurate by the
time it is displayed. When the -m option is specified, prstat
tries to turn on microstate accounting for each process; the
original state is restored when prstat exits. See proc(4) for
additional information about the microstate accounting facility.

      The total memory size reported in the SWAP and RSS columns
for groups of processes can sometimes overestimate the actual
amount of memory used by processes with shared memory segments.

SunOS 5.10  Last Revised 7 Sep 2007

© 2010, Oracle Corporation and/or its affiliates

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Finding capped memory of a non global zone

Is there a way to find the capped memory of a solaris non global zone from the non global zone itself (given rcapd is disabled) (6 Replies)
Discussion started by: CuriousDev
6 Replies

2. UNIX for Dummies Questions & Answers

Finding the most memory consuming processes in Linux

Platform: Oracle Linux 6.4 To find the most memory consuming processes, I tried the following 2 methods 1. Method1 # ps aux | head -1 ; ps aux | sort -nk +4 | tail -7 USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 95 0.0 0.0 0 0 ? ... (2 Replies)
Discussion started by: kraljic
2 Replies

3. Web Development

Finding Cause of Memory Leak

Hi We have just got a dedicated server with Fasthosts, O/S is Linux CentOS 6 64 bit. It was a fresh install and I have just moved one WordPress site onto there. The problem is we seem to be getting a memory leak (that's what Fasthosts said) and the database (I think) keeps crashing, so we... (3 Replies)
Discussion started by: Pokeyzx
3 Replies

4. UNIX for Advanced & Expert Users

Finding out total memory usage

Hi, I have a server box with 16GB ram in it, within the server box there are 3 VMs running with a total allocation of 9GB. if I add up all the numbers under memory info using vmstat I get 15.8GB so I can say it adds up to 16Gb... Is there a way to see from the command line how much memory... (2 Replies)
Discussion started by: speedhunt3r
2 Replies

5. AIX

Finding Total Memory Of VIO Server.

Hi, I would like to know how to find Total Memory of Vio Server? I have used command prtconf | grep Memory , though this command is showing allocated memory of vio server. But I would like to find out Total Memory of VIO Server, Though this can be find out using browser http://<ip address... (9 Replies)
Discussion started by: manoj.solaris
9 Replies

6. AIX

Finding Memory Frequency

Hi, I would like to know how to find out frequency of memory, I have used the command prtconf but it is showing amt of ram available on server, it is not showing frequency. Regards, Manoj (1 Reply)
Discussion started by: manoj.solaris
1 Replies

7. HP-UX

finding free memory as a non-root user

All, I have a software application that requires to find the free memory on the machine. It should work in a hpux Out of the box - in other words, it should use the basic OS commands which are available on every HP-UX machine like top, vmstat and doesn't require the user to purchase 3rd... (2 Replies)
Discussion started by: sunny8107
2 Replies

8. UNIX for Advanced & Expert Users

finding shared memory

Using pmap, I was able to get a memory map of an Oracle process. It had the following id: 0000000380000000 4194320K rwxsR Converting that Hex ID to decimal gave: 352321658 So, then I did ipcs -am: IPC status from <running system> as of Thu Jun 18 15:43:17 MDT 2009 T ID ... (1 Reply)
Discussion started by: anilj
1 Replies

9. Solaris

Finding out the memory size via the iLOM

I would like to know if it is possible to find out how much memory is in a machine from the iLOM prompt on an x86 box? I have retrieved the MAC address details from the iLOM promt before using show /SYS/MB/NETx and wondering if I can do the same for the Memory although I can't seem to find anything... (4 Replies)
Discussion started by: Chains
4 Replies

10. Programming

Tool for finding memory leaks

hi, i am a c++ programmer working on linux(redhat linux8.0) environment, i need to find out the memory leaks, so far i didn't used any tools, so what are the tools are available, and whic one is good to use. plz provide with a small example. (1 Reply)
Discussion started by: sarwan
1 Replies
Login or Register to Ask a Question