I need some help on how to monitor perm gen space remotely. We have Tomcat installed on Windows 2008 R2. From time to time perm gen space is full. I want to monitor the perm gen space before it becomes full so that certain actions can be done to prevent service disruptions. How would I do this?
Asked
Active
Viewed 741 times
1 Answers
2
What you're looking for is JMX remoting - it provides a way to get a look at the permgen size as well as a lot of other information about the running Java instance.
You'll probably want to use authentication and encryption, but adding just this to your Java options should get you started:
-Dcom.sun.management.jmxremote.port=9000
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
How you monitor this will depend on your monitoring software, but to monitor manually, use jvisualvm
from the JDK and configure a remote instance.
Shane Madden
- 112,982
- 12
- 174
- 248
-
Thanks, uhm how to set that? Sorry for asking noob questions cause I really am a noob. – Gejutel K. Landegre Dec 17 '13 at 02:07
-
@GejutelK.Landegre See [this question](http://serverfault.com/questions/79641/how-can-i-configure-tomcat-java-options-in-a-config-file) - probably the easiest method is to use the tomcat config management app (`tomcat6w.exe` or 5 or 7 depending on which version you're on) - the Java tab, Java Options box. – Shane Madden Dec 17 '13 at 02:14