LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-18-2007, 06:00 AM   #1
Frank Soranno
Member
 
Registered: Jun 2005
Location: Scranton, Pa. USA
Distribution: Debian
Posts: 230

Rep: Reputation: 30
Memory Question?


What is more accurate in finding out the ammout of memory the system is using while active, Using terminal command of "free" or using System monitor ? Thanks.
 
Old 06-18-2007, 06:32 AM   #2
Crito
Senior Member
 
Registered: Nov 2003
Location: Knoxville, TN
Distribution: Kubuntu 9.04
Posts: 1,168

Rep: Reputation: 53
Since this is a multiple choice Q can I answer with "none of the above"?

vmstat shows me everything I need in one shot.

Code:
[surfer@lode ~]$ vmstat
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  0      0 108336  69152 541672    0    0    13     5  109  314  7  4 89  0  0
Quote:
Procs
r: The number of processes waiting for run time.
b: The number of processes in uninterruptible sleep.


Memory
swpd: the amount of virtual memory used.
free: the amount of idle memory.
buff: the amount of memory used as buffers.
cache: the amount of memory used as cache.
inact: the amount of inactive memory. (-a option)
active: the amount of active memory. (-a option)


Swap
si: Amount of memory swapped in from disk (/s).
so: Amount of memory swapped to disk (/s).


IO
bi: Blocks received from a block device (blocks/s).
bo: Blocks sent to a block device (blocks/s).


System
in: The number of interrupts per second, including the clock.
cs: The number of context switches per second.

CPU
These are percentages of total CPU time.
us: Time spent running non-kernel code. (user time, including nice time)
sy: Time spent running kernel code. (system time)
id: Time spent idle. Prior to Linux 2.5.41, this includes IO-wait time.
wa: Time spent waiting for IO. Prior to Linux 2.5.41, shown as zero.
 
Old 06-18-2007, 06:52 AM   #3
Frank Soranno
Member
 
Registered: Jun 2005
Location: Scranton, Pa. USA
Distribution: Debian
Posts: 230

Original Poster
Rep: Reputation: 30
Would you say that I'm using too much memory? I'm not running a lot of things at once except browser and desktop, where is all my memory going?

frank@frank-desktop:~$ vmstat
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
0 0 17628 16660 6352 704544 0 1 76 165 540 701 24 3 71 2

vmstat -a
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r b swpd free inact active si so bi bo in cs us sy id wa
0 0 17628 15984 290296 623468 0 2 72 148 522 684 22 2 74 2




AMD Sempron 3000
GA-K8N51GMF-RH
Ram Crucial 2-512
Maxtor 20 Gig
Sony DVD
Epson C68 printer
OS-Linux/Mint

Last edited by Frank Soranno; 06-18-2007 at 06:54 AM.
 
Old 06-18-2007, 11:25 AM   #4
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

There's no one statistic that's going to tell you everything. Two "yellow flags" in your vmstat output are:

a) Nonzero swap statistics (ri/ro and swapd)
... and ...
b) Nonzero cpu/wait

But these aren't alarming in and of themselves - you simply need to look deeper before you can draw any conclusions whatsoever. Specifically:

a) Always take *multiple* snapshots with vmwstat (not just a single line), e.g.:
Code:
vmstat 3 3
   procs                      memory    swap          io     system         cpu
 r  b  w   swpd   free   buff  cache  si  so    bi    bo   in    cs  us  sy  id
 0  0  0   4444   1700  32496  10792   0   0     1     1   19     8   0   0  14
 0  0  0   4444   1700  32496  10792   0   0     0     0  102     9   0   0 100
 0  0  0   4444   1700  32496  10792   0   0     0     2  107     9   0   0 100
  <= Throw out the first number...
b) "top" (used interactively) and "uptime" (look at the "load average" statistics) are two other useful tools to see if your system is having problems.

Here's a link that might be useful:
http://rimuhosting.com/howto/memory.jsp
 
Old 06-18-2007, 12:45 PM   #5
Frank Soranno
Member
 
Registered: Jun 2005
Location: Scranton, Pa. USA
Distribution: Debian
Posts: 230

Original Poster
Rep: Reputation: 30
Thanks Guy's, I'm a little more educated, I'm not having any problems, Just curious. Thanks once more.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory Question Mistro116@yahoo.com Linux - Hardware 1 12-14-2005 02:45 PM
Question about memory alltime General 1 04-19-2005 10:54 PM
question about memory ? maxboost Linux - General 3 02-25-2005 03:58 PM
memory question true_atlantis Linux - Newbie 2 10-30-2004 11:09 PM
Memory question mmars Linux - General 3 09-04-2003 10:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration