check tomcat memory
-
Frédéric GRANAT
- Posts: 445
- Joined: Mon Nov 19, 2012 11:36 am
check tomcat memory
Hi,
I want to check tomcat process memory usage.
I'm using $USER1$/check_tomcat.pl -H $HOSTADDRESS$ -p $ARG1$ -l $ARG2$ -a $ARG3$ -w $ARG4$ -c $ARG5$
When I log on to the server and run taskmgr it reports the tomcat6.exe process consume 2,2 Mb of memory
When I take a look to nagios check it shows :
OK: memory in use 891 Mo (2043 Mo): threads[http-8180]=2(400):
How do you explain that ?
I want to check tomcat process memory usage.
I'm using $USER1$/check_tomcat.pl -H $HOSTADDRESS$ -p $ARG1$ -l $ARG2$ -a $ARG3$ -w $ARG4$ -c $ARG5$
When I log on to the server and run taskmgr it reports the tomcat6.exe process consume 2,2 Mb of memory
When I take a look to nagios check it shows :
OK: memory in use 891 Mo (2043 Mo): threads[http-8180]=2(400):
How do you explain that ?
Last edited by Frédéric GRANAT on Thu Feb 08, 2018 3:03 am, edited 1 time in total.
Re: check tomcat memory
One is reporting on the Windows environment (task manager), the other is reporting on the JVM (check_tomcat.pl).
The JVM can hold as much memory for its heap as the OS allows, or up to the -Xmx setting for its runtime. That doesn't necessarily mean the JVM's processes are using all of that heap in any given instant, though.
check_tomcat.pl reports both what is currently being used and what is currently available within the context of the JVM:
And if you're curious about the discrepancy in what is reported as the JVM's available heap VS what windows is reporting the process is consuming, 2043MiB = 2142MB.
The JVM can hold as much memory for its heap as the OS allows, or up to the -Xmx setting for its runtime. That doesn't necessarily mean the JVM's processes are using all of that heap in any given instant, though.
check_tomcat.pl reports both what is currently being used and what is currently available within the context of the JVM:
Code: Select all
push @message, sprintf("memory in use %d MiB (%d MiB);",
( $xpath_check_results{memMax} - $jvm_mem_available ) / ( 1024 * 1024),
$xpath_check_results{memMax} / ( 1024 * 1024)
);Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
-
Frédéric GRANAT
- Posts: 445
- Joined: Mon Nov 19, 2012 11:36 am
Re: check tomcat memory
Hi,
Sorry,That doesn't help me.
The software provider says that the Tomcat process consume constantly 2 Gb of memory
The following error message extracted from log (what log I don't know) :
java.lang.OutOfMemoryError: Java heap space
Nagios check check_tomcat.pl shows an average consumption of 600 Mb and some pikes at 1,9 Gb.
So I want to have an history of java heap space usage.
What kind of check should I use ?
Rgds,
Frederic
Sorry,That doesn't help me.
The software provider says that the Tomcat process consume constantly 2 Gb of memory
The following error message extracted from log (what log I don't know) :
java.lang.OutOfMemoryError: Java heap space
Nagios check check_tomcat.pl shows an average consumption of 600 Mb and some pikes at 1,9 Gb.
So I want to have an history of java heap space usage.
What kind of check should I use ?
Rgds,
Frederic
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: check tomcat memory
[user]Frédéric GRANAT[/user], I believe our developers are working on another JVM plugin at the moment, and it should be released in a near future. In meantime, you can post your suggestions in this topic:
https://github.com/nagios-plugins/nagio ... issues/279
Also, if you would like to become a beta tester for this new JVM plugin let me know, and I'll try to connect you with the developer.
https://github.com/nagios-plugins/nagio ... issues/279
Also, if you would like to become a beta tester for this new JVM plugin let me know, and I'll try to connect you with the developer.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: check tomcat memory
Is check_tomcat.pl not currently reporting performance data to Nagios XI? I'm a bit confused; You should be getting historical memory usage from this plugin and there should be graphs of that usage on the service's status page. Is this not so?Frédéric GRANAT wrote: Nagios check check_tomcat.pl shows an average consumption of 600 Mb and some pikes at 1,9 Gb.
So I want to have an history of java heap space usage.
What kind of check should I use ?
I would assume those spikes upwards of 1,9GB are probably occurring around the same time the Tomcat process is running out of memory and producing that exception.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
kyang
Re: check tomcat memory
Could you also post or PM us your profile?
Nagios XI Profile --> On the XI Home Page click "Admin" > "System Profile" --> "Download Profile" button
Save the profile.zip file and upload it here or PM me.
If you receive a PROFILE BUILD FAILED
Please follow this article,
https://support.nagios.com/kb/article.p ... ategory=44
After you PM the profile please update this thread, unless you post the profile on here. Thanks
Nagios XI Profile --> On the XI Home Page click "Admin" > "System Profile" --> "Download Profile" button
Save the profile.zip file and upload it here or PM me.
If you receive a PROFILE BUILD FAILED
Please follow this article,
https://support.nagios.com/kb/article.p ... ategory=44
After you PM the profile please update this thread, unless you post the profile on here. Thanks
-
Frédéric GRANAT
- Posts: 445
- Joined: Mon Nov 19, 2012 11:36 am
Re: check tomcat memory
Hi,
To MCapra :
When Check_tomcat.pl reports by example 1 Gb of memory used, the taskmanager reports, by the same time, 2,2 Gb for Tomcat process memory usage.
Effectively, the history of memory consumption is logged by NagiosXI, but the memory consumption doesn't match the values showed by the taskmanager for Tomcat process
Rgds,
Frederic
To MCapra :
When Check_tomcat.pl reports by example 1 Gb of memory used, the taskmanager reports, by the same time, 2,2 Gb for Tomcat process memory usage.
Effectively, the history of memory consumption is logged by NagiosXI, but the memory consumption doesn't match the values showed by the taskmanager for Tomcat process
Rgds,
Frederic
-
Frédéric GRANAT
- Posts: 445
- Joined: Mon Nov 19, 2012 11:36 am
Re: check tomcat memory
Hi,
Here is my system profile
Thanks
Here is my system profile
Thanks
You do not have the required permissions to view the files attached to this post.
-
Frédéric GRANAT
- Posts: 445
- Joined: Mon Nov 19, 2012 11:36 am
Re: check tomcat memory
Hi,
To npovolenko : OK to beta test the new pluggin.
Frederic
To npovolenko : OK to beta test the new pluggin.
Frederic