Need help using thold to monitor used ram
Moderators: Developers, Moderators
Need help using thold to monitor used ram
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.
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.
Re: Need help using thold to monitor used ram
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?
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?
Re: Need help using thold to monitor used ram
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.
Re: Need help using thold to monitor used ram
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?
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?
Re: Need help using thold to monitor used ram
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.
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.
Re: Need help using thold to monitor used ram
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.
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.
Re: Need help using thold to monitor used ram
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.
Re: Need help using thold to monitor used ram
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.
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.
Re: Need help using thold to monitor used ram
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.
Re: Need help using thold to monitor used ram
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.
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.
Re: Need help using thold to monitor used ram
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.
Re: Need help using thold to monitor used ram
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.
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.
Re: Need help using thold to monitor used ram
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.
Re: Need help using thold to monitor used ram
So .. in other words .. you found out that what I was saying is correct and do not want to say it.
Re: Need help using thold to monitor used ram
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.
Who is online
Users browsing this forum: No registered users and 1 guest