- Nagios Network Monitoring
- General Information and TidBits
- Installation Tips & Tricks
- Addons, Plugins, Tweaks & Customizations
- Checking Drupal Status with Nagios and WebInject
- AddOn - NRPE / NSClient
- AddOn - Nagios Event Log aka NagEventLog
- Addon - Nagios Passive Checks with NSCA
- Nagios Custom Object Variables
- Nagios Event Handler - Restart Remote Service
- Nagios Event Handler - Restarting a Local Service
- Plugin: check_dns_secondary - Checking NS Servers
- Plugin: check_http_requisites - Page Size, Files, and Loadtime
- Plugin: check_mem - Linux Memory Usage
- Plugin: check_sql - Check MSSQL and MYSQL servers
- Plugin: check_svn - Check Subversion
- Tweak - Nagios Jabber / XMPP Notifications
- Tweak - Nagios SMS Messaging
- Tweak - check_file_age to check_file_modified
- Tweak: Using NagiosGraph's SHOW.CGI
- Tweak: check_sql - Allow decimal values
- Common Errors & Fixes
Dumping Linux Buffer Cache
A useful command to check linux system resources is "top". However with the buffer cache you may see almost no available memory (see attached screenshot). But how can that be? All you have running may be a java app, apache, and a few other services. There is no way that should be using ALL of that RAM. In my case, I have the Nagios "check_mem" plugin querying for available memory and throwing alerts quite regularly.
The "free -mt" command can show you how much memory is cached. That eases my mind a bit. While googling about buffer cache, I stumbled upon this article:
http://devcs.blogspot.com/2007/12/linux-buffer-cache-how-to-disable-it.html
This article gives a good rundown of what the buffer cache is all about. Also it mentions a nice little trick to dump the entire cache.
echo 1 > /proc/sys/vm/drop_caches
VOILA! Cache dumped and Nagios is happy. Just dumping the cache shouldn't be taken lightly as it MAY have some adverse effects depending on your server. However the cache should slowly start to build back up.
Looking into the actual check_mem script, you can have it exclude the buffers in the calculation of free memory. Check this line and make sure the value is "1":
my $DONT_INCLUDE_BUFFERS = 1;
- MWalker's blog
- Printer-friendly version
- Login to post comments
-


Recent comments
23 weeks 5 days ago
27 weeks 6 days ago
45 weeks 2 days ago
48 weeks 3 days ago
1 year 6 weeks ago
1 year 13 weeks ago
1 year 13 weeks ago
1 year 18 weeks ago
1 year 22 weeks ago