LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 02:32 AM   #1
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

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, 07:30 AM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

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

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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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