LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 08-29-2014, 03:32 AM   #1
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,272

Rep: Reputation: 148Reputation: 148
Monitoring free memory via SNMP


Hi Guys,
What is the industry practice/standard to monitor the free memory in linux?
I know mostly people are using "memTotalFree" snmp oid and set threshold to generate traps.
But in some situation this memTotalFree is very low and it doesn't mean that the system is running out of memory. so what we need to confirm is free real memory/physical free memory via "free" command. if we see we have enough physical free memory and swap usage zero then we can confirm that the system is healthy.

However, some poor customers are worrying about the memory alerts. in this situation how you explain/educate the customers?

Thanks.
 
Old 08-29-2014, 08:30 AM   #2
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,159
Blog Entries: 10

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
http://www.debianadmin.com/linux-snm...tatistics.html
may help.
 
Old 08-30-2014, 02:41 AM   #3
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,272

Original Poster
Rep: Reputation: 148Reputation: 148
Thanks for your link,
Quote:
(Used – buffers – cached) / Total * 100 = % memory used

So you could get the following (expressed as Perl code):

my $memRealTotalOID = '.1.3.6.1.4.1.2021.4.5.0';
my $memRealAvailOID = '.1.3.6.1.4.1.2021.4.6.0';
my $memRealBuffersOID = '.1.3.6.1.4.1.2021.4.14.0';
my $memRealCachedOID = '.1.3.6.1.4.1.2021.4.15.0';
# Memory Calculations
my $memRealUsed = $memRealTotal - $memRealAvail;

Then you can alert on % RAM used:

my $realPercent = (($memRealUsed - $memRealBuffers - $memRealCached )/ $memRealTotal) * 100;
This is fine to alert real/physical used memory percentage but if i am not mistaken mostly systems are designed to send traps for memTotalFree. why? any special reason/industry practice?
There are some debates, which is best practice to alert for memory? memTotalFree or RealFree
OR
Send traps for both, case closed!!
 
  


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
SNMP monitoring hermy7 Linux - Networking 5 12-28-2011 05:40 AM
SNMP monitoring n0000b Linux - Server 1 03-08-2010 08:41 PM
Monitoring free memory with enterprise monitoring application Steelb Linux - Enterprise 2 02-13-2008 11:10 AM
SNMP master & SNMP client Script for system monitoring ratul_11 Programming 1 12-24-2007 06:32 AM
snmp monitoring scot.russell Linux - Networking 1 03-17-2006 08:20 AM


All times are GMT -5. The time now is 11:53 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration