[collectd] memory.c and /proc/meminfo

Hanik, Filip Filip.Hanik at laquinta.com
Thu Nov 17 21:17:37 CET 2005


 
I was getting really funky results, I found that this code worked better on Fedora Core 4.

---line 106 memory.c
	if (mem_used >= (mem_free + mem_buffered + mem_cached))
	{
		//mem_used is the total, if mem_used is the biggest number
		mem_free = mem_free + mem_buffered + mem_cached;
		//mem_used -= mem_free + mem_buffered + mem_cached;
		mem_used -= mem_free;
		memory_submit (mem_used, mem_buffered, mem_cached, mem_free);
	}

Memory total, is the total of mem_free and mem_used

Any thoughts?

I'm a super beginner C programmer, so little hard for me to know if this would work on other platforms.

Filip


Filip Hanik
Sr Software Engineer
La Quinta Corporation 
http://www.lq.com/

 

-----Original Message-----
From: collectd-bounces at verplant.org [mailto:collectd-bounces at verplant.org] On Behalf Of collectd-request at verplant.org
Sent: Thursday, November 17, 2005 1:52 PM
To: Hanik, Filip
Subject: Welcome to the "Collectd" mailing list

Welcome to the Collectd at verplant.org mailing list!

To post to this list, send your email to:

  collectd at verplant.org

General information about the mailing list is at:

  http://mailman.verplant.org/listinfo/collectd

If you ever want to unsubscribe or change your options (eg, switch to or from digest mode, change your password, etc.), visit your subscription page at:

  http://mailman.verplant.org/options/collectd/filip.hanik%40laquinta.com


You can also make such adjustments via email by sending a message to:

  Collectd-request at verplant.org

with the word `help' in the subject or body (don't include the quotes), and you will get back a message with instructions.

You must know your password to change your options (including changing the password, itself) or to unsubscribe.  It is:

  paweenet

Normally, Mailman will remind you of your verplant.org mailing list passwords once every month, although you can disable this if you prefer.  This reminder will also include instructions on how to unsubscribe or change your account options.  There is also a button on your options page that will email your current password to you.


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.3/173 - Release Date: 11/16/2005
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.3/173 - Release Date: 11/16/2005
 



More information about the Collectd mailing list