The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" Lokesha UNIX for Dummies Questions & Answers 4 12-19-2007 10:52 PM
Debian: doubt in "top" %CPU and "sar" output jaduks Linux 0 09-12-2007 05:05 AM
"highlighting the text in ur output" sakthi.abdullah Shell Programming and Scripting 6 12-11-2006 02:51 PM
Use "read" with a text file with comments mbarberis Shell Programming and Scripting 3 03-29-2005 11:24 PM
Convert "text" to "packed-decimal"? HuskyJim UNIX for Dummies Questions & Answers 2 06-08-2001 11:59 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #8  
Old 09-20-2006
Registered User
 

Join Date: Aug 2005
Posts: 10
>prtconf -v | grep -i mem
Memory size: 2048 Megabytes
memory (driver not attached)
virtual-memory (driver not attached)
memory-controller, instance #0
memory-controller, instance #1

This seems to return the amount of physical memory I have, but not what is being used.

We are getting closer!
Reply With Quote
Forum Sponsor
  #9  
Old 09-20-2006
vgersh99's Avatar
Moderator
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 3,029
doing 'man vmstat' yields:
Code:
     memory
           Report on usage of virtual and real memory.

           swap  amount  of  swap   space   currently   available
                 (Kbytes)

           free  size of the free list (Kbytes)
used = 'Memory size: 2048 Megabytes' - 'free size of the free list (Kbytes)'

I'm not sure though - others might correct the 'math'
Reply With Quote
  #10  
Old 09-20-2006
Registered User
 

Join Date: Feb 2005
Location: Broomfield, CO
Posts: 401
Since your question is performance related, you really don't need to know how much physical memory is in use. vmstat will give you the performance information you're looking for (I cleaned up the output a little, format wise).

Code:
$ vmstat 5
 procs     memory            page            disk               faults      cpu
 r b w   swap     free   re  mf pi po fr de sr s6 s8 s8 s8   in   sy   cs us sy id
 0 0 0 14334608 10300056 25 146 13  1  1  0  0  0  0  0  0  708  172 4666  2  2 96
 0 0 0 14221840  9149336  0   2  0  0  0  0  0  0  0  0  0  622 6071 3948  0  1 99
 0 0 0 14221864  9149360  0   1  0  0  0  0  0  0  1  0  0  808 6476 4026  0  1 98
 0 0 0 14221880  9149376  0   0  0  0  0  0  0  0  0  0  0  647 6157 3998  0  1 98
Distilled from Sun Performance and Tuning by Adrian Cockcroft:

The sr column (Scan Rate) is probably the most important when determining whether you're short on memory or not. When this number gets to a high rate (200 pages per second averaged over 30 seconds), then you're short on memory and need to add more.

Swap space and available swap isn't a real help since the system will balance things out and the free column will stablize out.

For CPU's, four times the number of CPUs in the run queue (the procs/r column) means you should add another cpu.

For disk slowness, the blocked queue gives you the info (procs/b column). If b => r then you should look at balancing your data or perhaps getting a RAID in place.

Carl
Reply With Quote
  #11  
Old 09-20-2006
Registered User
 

Join Date: Aug 2001
Posts: 179
Did you lookat pmap
pmap -x <PID>
Reply With Quote
  #12  
Old 09-20-2006
Registered User
 

Join Date: Feb 2005
Location: Broomfield, CO
Posts: 401
Quote:
Originally Posted by sssow
Did you lookat pmap
pmap -x <PID>
I think that's fine if you're troubleshooting a memory issue, but it sounds like from his initial request, that he wanted something to keep an eye on. "Healthchecking" he said. I think the vmstat info would give good health checking information.

Carl
Reply With Quote
  #13  
Old 09-21-2006
Registered User
 

Join Date: Aug 2005
Posts: 10
I am very appreciative that you are all helping me with this. Let me first explain what I am trying to accomplish, and then let me ask for clarification about vmstat and top.

I am a middleware sys admin (not a Unix admin). I do a daily healthcheck of the Solaris servers where my software (MQSeries) runs. In addition to looking at specific MQ logs and queues, I also look at some system-level stats, including CPU and memory usage. This is not a "scientific" look; rather, it's a point-in-time peek that has allowed me to develop a "baseline" of normal operations. I look at the system-level stuff because 1) these are dedicated middleware servers & nothing else runs on them and 2) MQ & related software spawns many processes (that's why I don't just look at one process).

This approach has helped me catch problems several times.

My specific question about vmstat and top is about interpreting the data. (Remember, I'm not a unix admin!)

Here is vmstat output:
r b w swap free re mf pi po fr de sr m1 m1 m1 m2 in sy cs us sy id
0 0 0 5622568 1636016 38 137 5 0 0 0 0 0 0 0 0 258 1235 307 1 1 99

I *think* this means that I have 5.6 Gb of total memory available, of which 1.6 Gb is free.

Here is the top output:
Memory: 2048M real, 1555M free, 4099M swap free

I *think* this means that I have 2.0 GB of physical memory, of which 1.5 Gb is free AND I have 4.1 GB of swap that is also free.

I must not understand how to read these outputs, eh?

Gratefully yours,
Shirley
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 03:59 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0