LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices

Reply
 
Search this Thread
Old 03-05-2013, 01:24 PM   #1
shravee
Member
 
Registered: Sep 2009
Posts: 57

Rep: Reputation: 15
Post script to monitor memory - RAM


hi team,

I am interested to monitor the ram free space by monitoring it frequently. this should ensure to alert me if I run out of memory.

i am aware that both topas and nmon with m as an option can give me the memory details but I do not know to get them in some file so that i can read from them periodically.

can someone advise me the best possible solution to monitor memory.


regards
Shravee.
 
Old 03-05-2013, 01:38 PM   #2
netnix99
Member
 
Registered: Jun 2011
Distribution: redhat, CentOS, OpenBSD
Posts: 215

Rep: Reputation: 62
There is a couple of different ways, but if you just want something cheap and dirty, you can create a cron job as root to run the following:

cat /proc/meminfo | grep MemFree >> /root/memfree.txt

Set it to run as often as you like.

Code:
*/5 * * * *  cat /proc/meminfo | grep MemFree >> memfree.txt
would run it every 5 minutes and write it to the file memfree.txt.
 
Old 03-05-2013, 01:43 PM   #3
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,186

Rep: Reputation: 2468Reputation: 2468Reputation: 2468Reputation: 2468Reputation: 2468Reputation: 2468Reputation: 2468Reputation: 2468Reputation: 2468Reputation: 2468Reputation: 2468
Quote:
Originally Posted by shravee View Post
hi team,
I am interested to monitor the ram free space by monitoring it frequently. this should ensure to alert me if I run out of memory.

i am aware that both topas and nmon with m as an option can give me the memory details but I do not know to get them in some file so that i can read from them periodically.

can someone advise me the best possible solution to monitor memory.
You want to be 'advised' AGAIN on how to do this, and how to write shell scripts???
http://www.linuxquestions.org/questi...nd-4175439283/
http://www.linuxquestions.org/questi...t-file-802402/

Again, you need to read one of the MANY bash scripting tutorials, and look at the advice you've been given in other threads, then apply that to what you want to do.
 
  


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
monitor CPU and RAM High utilization through script azheruddin Linux - Newbie 1 12-09-2012 10:00 AM
Script to Monitor Memory Leak Sridharriyer Linux - Server 1 05-14-2012 01:06 AM
Script/Tool to monitor the Memory Utilization by Process rajaniyer123 Solaris / OpenSolaris 2 06-23-2011 12:51 AM
script to monitor memory and cpu usage s_linux Suse/Novell 3 07-23-2009 02:03 PM
RAM utility to monitor and free memory jrbuergel Linux - Newbie 5 03-27-2007 11:19 PM


All times are GMT -5. The time now is 02:48 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