Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Tue Mar 28, 2017 5:12 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Need help using thold to monitor used ram
PostPosted: Sun Mar 19, 2017 2:20 am 
Offline

Joined: Fri Mar 17, 2017 11:22 pm
Posts: 8
I am trying to set thold up to monitor used ram, I cannot seem to find an option when selecting the graph to monitor.

I am using this graph: http://freeccnp-cacti.blogspot.com/

I cannot monitor free ram because the system caches most the remaining free ram, unless there is a way to add the cache plus free ram and monitor that number with thold.


Top
 Profile  
 
 Post subject: Re: Need help using thold to monitor used ram
PostPosted: Sun Mar 19, 2017 11:51 pm 
Offline

Joined: Fri Mar 17, 2017 11:22 pm
Posts: 8
It looks like thold cannot see memory used on the graph because it is a CDEF and not a data source.

I tired to setup a threshold using RPN Expressions, however it looks like thold cannot see all of the memory data sources at the same time because they are not in a single data source.

Is there a way to get thold to grab information from 2 different data sources and add them together on its own without putting it in a graph?


Top
 Profile  
 
 Post subject: Re: Need help using thold to monitor used ram
PostPosted: Sun Mar 19, 2017 11:56 pm 
Offline
Developer

Joined: Thu Apr 07, 2005 3:29 pm
Posts: 2495
Location: B/CS Texas
Nope, Thold can currently only be aware of items in the same data source. I eventually plan a complete rewrite of the plugin though, and that is one of the items on the hot list to add in.

_________________
CactiEZ CD


Top
 Profile  
 
 Post subject: Re: Need help using thold to monitor used ram
PostPosted: Mon Mar 20, 2017 12:12 am 
Offline

Joined: Fri Mar 17, 2017 11:22 pm
Posts: 8
Thank you very much for the reply. I will stop trying to get it to work then.

For now I can just monitor it manually, however it would be nice to have an alert. Do you have any idea on when it might be added?


Top
 Profile  
 
 Post subject: Re: Need help using thold to monitor used ram
PostPosted: Mon Mar 20, 2017 2:07 pm 
Offline

Joined: Fri Mar 17, 2017 11:22 pm
Posts: 8
Would it be possible to create a new data source for used ram by using a script?

I am still fairly new to cacti, so I do not understand how all of it works.

If I understand scrips correctly, they can grab just the information that you want and output it any way you would like. So I was thinking that if someone could write a script that grabs the free ram and the cache from the server, adds them together in the script and then outputs that total as the data, thold should be able to use it for the threshold.

I do not know enough about these scripts to write it myself, or if it is even possible.


Top
 Profile  
 
 Post subject: Re: Need help using thold to monitor used ram
PostPosted: Thu Mar 23, 2017 8:29 pm 
Offline

Joined: Fri Mar 17, 2017 11:22 pm
Posts: 8
I find it very hard to believe that nobody has figured out how to use thold to properly monitor ram usage on a linux machine.

Linux machines use a lot of cache if there is a lot of disk writes, this speeds up the machine, the cache is not considered "used", meaning that if the system or a program needs the memory then linux will give it to whatever needs it. Because of what I host on my machines, if the ram hits about half then the cache is using the other half until something else needs it, leaving the reported "free memory" at nearly 0.

I know that there has to be a way to use scripts to gather the information that is needed for thold to monitor, I just do not know how. What is needed is to create a data source that either adds mem_free + mem_cache to get mem_available or subtracts mem_total - mem_cache - mem_free - mem_buffers to get mem_used.

If anybody has made this work, please let me know.


Top
 Profile  
 
 Post subject: Re: Need help using thold to monitor used ram
PostPosted: Sun Mar 26, 2017 10:45 pm 
Offline
Developer

Joined: Thu Apr 07, 2005 3:29 pm
Posts: 2495
Location: B/CS Texas
It could easily be done, but I don't do it since it is way more useful just to monitor swap space instead. I set just an alert for when I start swapping, then I know I am having RAM issues and need to either increase it or figure out what is using all of it.

_________________
CactiEZ CD


Top
 Profile  
 
 Post subject: Re: Need help using thold to monitor used ram
PostPosted: Sun Mar 26, 2017 11:45 pm 
Offline

Joined: Fri Mar 17, 2017 11:22 pm
Posts: 8
I would rather know before the swap space is is being used, so that I can fix it before it becomes a problem. I run a hosting company and do my best to offer quality service to my clients. If it gets to the point that all the ram is used and the swap is being used, the clients are already noticing the quality drop.

If it can easily be done, can you explain to me how to do it? Keep in mind that I am still new to cacti.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group