LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 01-25-2013, 10:03 PM   #1
slowerogue
Member
 
Registered: Oct 2012
Posts: 89

Rep: Reputation: Disabled
how to get average memory usage, like sar


hi , i can get average of cpu idle ,using sar
anywhere can i get average memory usage

i need to run vmstat 600 144, then get the usage and divde them inside a script file?
or is there anything like sar i can directly get the average mem usage of the day
 
Old 01-25-2013, 10:44 PM   #2
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,797
Blog Entries: 4

Rep: Reputation: 285Reputation: 285Reputation: 285
Which distro?
 
Old 01-25-2013, 10:49 PM   #3
slowerogue
Member
 
Registered: Oct 2012
Posts: 89

Original Poster
Rep: Reputation: Disabled
rhel 6
 
Old 01-25-2013, 11:23 PM   #4
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,797
Blog Entries: 4

Rep: Reputation: 285Reputation: 285Reputation: 285
Sar shoud be there. Else you can go with sysstat.
Check:
Download
Sysstat
 
Old 01-25-2013, 11:39 PM   #5
slowerogue
Member
 
Registered: Oct 2012
Posts: 89

Original Poster
Rep: Reputation: Disabled
hi
i have sar, i can run it
but sar result is about processor

i want the result is the memory usage
 
Old 01-25-2013, 11:49 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,198

Rep: Reputation: 1014Reputation: 1014Reputation: 1014Reputation: 1014Reputation: 1014Reputation: 1014Reputation: 1014Reputation: 1014
In which case you should read the documentation - [hint] all the way to the end.
 
Old 01-26-2013, 12:07 AM   #7
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,797
Blog Entries: 4

Rep: Reputation: 285Reputation: 285Reputation: 285
@slowerogue:
Are you sure? Did you really go through sar manual??

As per manual:-
Quote:
ldavg-5
System load average for the past 5 minutes.

ldavg-15
System load average for the past 15 minutes.

-r Report memory utilization statistics. The following values are displayed:

kbmemfree
Amount of free memory available in kilobytes.

kbmemused
Amount of used memory in kilobytes. This does not take into account memory used by the kernel itself.

%memused
Percentage of used memory.

kbbuffers
Amount of memory used as buffers by the kernel in kilobytes.

kbcached
Amount of memory used to cache data by the kernel in kilobytes.

kbcommit
Amount of memory in kilobytes needed for current workload. This is an estimate of how much RAM/swap is needed to guarantee that there never is out of memory.

%commit
Percentage of memory needed for current workload in relation to the total amount of memory (RAM+swap). This number may be greater than 100% because the kernel usually overcommits memory.

-R
Report memory statistics. The following values are displayed:

frmpg/s
Number of memory pages freed by the system per second. A negative value represents a number of pages allocated by the system. Note that a page has a size of 4 kB or 8 kB according to the machine architecture.

bufpg/s
Number of additional memory pages used as buffers by the system per second. A negative value means fewer pages used as buffers by the system.

campg/s
Number of additional memory pages cached by the system per second. A negative value means fewer pages in the cache.
And memory usage in what sense - can you explain your requirement little more? Memory usage (which memory, physical, swap, virtual?) by any process at some point of time or avg. for whole day or load average for whole day or what...? Explain.

Last edited by shivaa; 01-26-2013 at 12:09 AM.
 
Old 01-26-2013, 12:45 AM   #8
slowerogue
Member
 
Registered: Oct 2012
Posts: 89

Original Poster
Rep: Reputation: Disabled
thanks alot , i found it
 
Old 01-26-2013, 01:24 AM   #9
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,797
Blog Entries: 4

Rep: Reputation: 285Reputation: 285Reputation: 285
Sar is all what you need.

BTW, if nothing more to ask in this, then mark the thread as Solved (on top menu, under Thread Tools option, Mark this thread as Solved).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
load average and cpu usage too high, why could i do? v_fone Linux - Newbie 5 07-02-2009 03:17 AM
vmstat and sar -r free memory discrepancy AlucardZero Solaris / OpenSolaris 31 03-26-2009 10:42 AM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 04:45 AM
Load average stuck at 7.00, CPU usage ~ 0.1%, what gives? BrianK Linux - General 4 02-16-2004 08:45 PM
Average RAM usage... KevStA Linux - Newbie 7 05-31-2002 04:58 PM


All times are GMT -5. The time now is 04:03 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration