How to examine the memory usage??


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users How to examine the memory usage??
# 8  
Old 01-11-2003
Hello All,

A few questions on same topic.

The memory resident info obtained either from ps (rss) or 'top' (RES) adds upto what is more than actual RAM.
I believe this is due to shared memory mapping of the processes.

So what is the best method to identify the actual ( can I call it as effective ) memory usage/consumption by the processes ?

The 'pmap -x pid' gives information under tabs of Kbytes / Resident / Shared and Private.

Is an arithmetic exercise on these fields give the correct information ?


( Pls look at this info

#ps -e -o pid,vsz,rss grep 21941 gives an output like,

PID VSZ RSS
21941 136168 116408

and the #pmap -x 21941 give the summary as ,

(Kb) (Resident) (Shared) (Private )
total Kb 135424 122320 16736 105584

Any clue why the memory info is different... Which one is *more* correct . ? )

Appreciate your reply. This will clear a lot of confusion on memory usage...


Thanks in advance...
# 9  
Old 01-11-2003
I am sorry, I missed out these information.

Operating system : Solaris 2.6
Pagesize : 8192
RAM : 512 MB
# 10  
Old 01-11-2003
Thanks for the info.
I'm going to run a few test...
# 11  
Old 01-22-2003
Quote:
Originally posted by shibz
#ps -e -o pid,vsz,rss grep 21941 gives an output like,

PID VSZ RSS
21941 136168 116408

and the #pmap -x 21941 give the summary as ,

(Kb) (Resident) (Shared) (Private )
total Kb 135424 122320 16736 105584

Any clue why the memory info is different...

Thanks in advance...
When you posted this question, I tried the commands on a sample process on a 2.6 machine and both commands agreed. So I just moved on since I didn't have anything useful to say.

But I just downloaded memtool and the docs say:
Quote:
Solaris 2.6, 7 and 8 has a bug in pmap -x which will over-estimate the amount of private memory for a process. The MemTool pmem command should be used in place of pmap -x for accurate memory analysis.
I found the instructions to obtain memtool here. Click on "cool tools"; then "memtool". Also on that page, click on "pmap -x", where you will find:
Quote:
The following pmap bugids are resolved in Solaris 9:
4182712 pmap -x values for MAP_SHARED (text) segments is incorrect
4311136 pmap -x always displays ISM segments as 'private'
4449780 pmap -x doesn't provide reasonable output sometimes
4462729 pmap should also show swap reservation information
4419353 /proc//xmap extension
So you may be right about pmap.
# 12  
Old 01-23-2003
Hi,

Thanks a lot.. That was a great help...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Memory usage per user,percent usage,sytem time in ksh

Let's say i have 20 users logged on Server. How can I know how much memory percent used each of them is using with system time in each user? (2 Replies)
Discussion started by: roy1912
2 Replies

2. UNIX for Dummies Questions & Answers

Command to display the space usage (memory usage) of a specific directory.

Hi all, Can you please tell me the command, with which one can know the amount of space a specific directory has used. df -k . ---> Displays, the amount of space allocated, and used for a directory. du -k <dir name> - gives me the memory used of all the files inside <dir> But i... (2 Replies)
Discussion started by: abhisheksunkari
2 Replies

3. 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

4. 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

5. Solaris

current CPU usage, memory usage, disk I/O oid(snmp)

Hi, I want to monitor the current cpu usage, monitor usage , disk I/o and network utlization for solaris using SNMP. I want the oids for above tasks. can you please tell me that Thank you (2 Replies)
Discussion started by: S_venkatesh
2 Replies

6. 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

7. UNIX for Dummies Questions & Answers

cpu, memory and virtual memory usage

Hi All, Does anyone know what the best commands in the UNIX command line are for obtaining this info: current CPU usage memory usage virtual memory usage preferably with date and time parameters too? thanks ocelot (4 Replies)
Discussion started by: ocelot
4 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. Programming

CPU usage and memory usage

Please tell me solaris functions/api for getting following information 1- Function that tells how much memory used by current process 2- Function that tells how much memory used by all running processes 3- Function that tells how much CPU is used by current process 4- Function that tells how... (1 Reply)
Discussion started by: mansoorulhaq
1 Replies

10. Programming

Monitor CPU usage and Memory Usage

how can i monitor usages of CPU, Memory, Hard disk etc. under SUN Solaries through a c program or java program i want to store that data into database so i can show it graphically thanks in advance (2 Replies)
Discussion started by: Gajanad Bihani
2 Replies
Login or Register to Ask a Question