Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon Jul 24, 2017 5:34 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next
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: 18
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: 18
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: 2587
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: 18
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: 18
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: 18
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: 2587
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: 18
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  
 
 Post subject: Re: Need help using thold to monitor used ram
PostPosted: Wed Mar 29, 2017 10:24 pm 
Offline
Cacti User
User avatar

Joined: Mon Jan 05, 2015 10:10 am
Posts: 413
Monitoring ram with thold is trivial. First create a graph template that includes both total and used memory. Then create a percentage the thold off that data. Pedestrian.

_________________
Before history, there was a paradise, now dust.


Top
 Profile  
 
 Post subject: Re: Need help using thold to monitor used ram
PostPosted: Wed Mar 29, 2017 10:54 pm 
Offline

Joined: Fri Mar 17, 2017 11:22 pm
Posts: 18
Think you for the reply Osiris,

I wish it was that simple, because of the way memory is gathered thold cannot see more then one of the data sources that I need at the same time. This means that I cannot create a percentage on that, I have tried. What I need is a data source that has all the memory information in one source, like an indexed source.


Top
 Profile  
 
 Post subject: Re: Need help using thold to monitor used ram
PostPosted: Sat Apr 01, 2017 1:39 pm 
Offline
Cacti User
User avatar

Joined: Mon Jan 05, 2015 10:10 am
Posts: 413
Totally wrong. Thold includes both RPN Expression and Percentage Data Manipulation's which give you access to quite a few more options. So, you are dead wrong.

_________________
Before history, there was a paradise, now dust.


Top
 Profile  
 
 Post subject: Re: Need help using thold to monitor used ram
PostPosted: Sat Apr 01, 2017 1:59 pm 
Offline

Joined: Fri Mar 17, 2017 11:22 pm
Posts: 18
If I am wrong, then please tell me how.

I tried using RPN expressions for memory, however it would only pull data from the currently selected data source, even though all the data sources I needed are in the graph.


Top
 Profile  
 
 Post subject: Re: Need help using thold to monitor used ram
PostPosted: Mon Apr 03, 2017 5:24 pm 
Offline
Cacti User
User avatar

Joined: Mon Jan 05, 2015 10:10 am
Posts: 413
Sorry, that is part of your struggle. When you do it yourself, it's much more satisfying anyway.

_________________
Before history, there was a paradise, now dust.


Top
 Profile  
 
 Post subject: Re: Need help using thold to monitor used ram
PostPosted: Mon Apr 03, 2017 5:27 pm 
Offline

Joined: Fri Mar 17, 2017 11:22 pm
Posts: 18
So .. in other words .. you found out that what I was saying is correct and do not want to say it.


Top
 Profile  
 
 Post subject: Re: Need help using thold to monitor used ram
PostPosted: Mon Apr 03, 2017 5:35 pm 
Offline
Cacti User
User avatar

Joined: Mon Jan 05, 2015 10:10 am
Posts: 413
No, that some things you have to find out for yourself. I'm just encouraging you not to give up. But I can assure you its possile. Just a clue, a single rrd can have multiple data sources. Even then, that does not stop you. You simply need to become more proficient with thold. I know this since otherwise you would have never asked.

_________________
Before history, there was a paradise, now dust.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 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