JDK 1.5.0 + JVM Stats
Moderators: Developers, Moderators
-
- Cacti User
- Posts: 137
- Joined: Mon Feb 11, 2008 3:46 am
Upload the perl script file
Could you please upload the perl script file...which will be usefull to monitor the JVM.
If you're mostly monitoring tomcat you can use the tomcat manager interfaces JMX proxy http://host:port/manager/jmxproxy/
You can just use wget, fetch or a.n.other command line tool to fetch a url with the appropriate query and parse it into output for cacti.
This also allows you to interrogate custom mbeans from your own applications and create graphs for custom statistics.
You can just use wget, fetch or a.n.other command line tool to fetch a url with the appropriate query and parse it into output for cacti.
This also allows you to interrogate custom mbeans from your own applications and create graphs for custom statistics.
Polling issue thought?
I've got the JVM template imprted from here:
and I'm seeing SNMP polling issues. It seems to get bogus results from the poll:
05/22/2008 11:40:06 PM - CMDPHP: Poller[0] Host[2] DS[46] SNMP: v2: HOSTNAME, dsname: jvmGCtime, oid: .1.3.6.1.4.1.42.2.145.3.163.1.1.2.101.1.3.2, output: U
05/22/2008 11:40:06 PM - CMDPHP: Poller[0] Host[2] DS[46] WARNING: Result from SNMP not valid. Partial Result:
Running SNMPWalk on the oid returns a perfectly value.
bash# snmpwalk -v 2c localhost:1161 -c COMMUNITY .1.3.6.1.4.1.42.2.145.3.163.1.1.2.101.1.3.2
SNMPv2-SMI::enterprises.42.2.145.3.163.1.1.2.101.1.3.2 = Counter64: 401
thoughts?
a
and I'm seeing SNMP polling issues. It seems to get bogus results from the poll:
05/22/2008 11:40:06 PM - CMDPHP: Poller[0] Host[2] DS[46] SNMP: v2: HOSTNAME, dsname: jvmGCtime, oid: .1.3.6.1.4.1.42.2.145.3.163.1.1.2.101.1.3.2, output: U
05/22/2008 11:40:06 PM - CMDPHP: Poller[0] Host[2] DS[46] WARNING: Result from SNMP not valid. Partial Result:
Running SNMPWalk on the oid returns a perfectly value.
bash# snmpwalk -v 2c localhost:1161 -c COMMUNITY .1.3.6.1.4.1.42.2.145.3.163.1.1.2.101.1.3.2
SNMPv2-SMI::enterprises.42.2.145.3.163.1.1.2.101.1.3.2 = Counter64: 401
thoughts?
a
I seem to be seeing the same thing...
I see the same thing as it relates to this. I'm attempting to monitor an instance of BusinessWorks and snmpwalk returns results, the poller however, returns U.
Just to test further, I reconfigured a local JVM on my workstation and starting graphing that. I get the proper results, even though it shows counter64. I left that running over night and indeed this morning, I had graphs showing me what the JVM did overnight.
I'm not sure what the poller is getting back that makes it unhappy but it seems strange that snmpwalk would return results properly.
Just to test further, I reconfigured a local JVM on my workstation and starting graphing that. I get the proper results, even though it shows counter64. I left that running over night and indeed this morning, I had graphs showing me what the JVM did overnight.
I'm not sure what the poller is getting back that makes it unhappy but it seems strange that snmpwalk would return results properly.
my graph is empty , i don't know why , pls help
1、my snmp.acl config is:
acl = {
{
communities = public, private
access = read-only
managers = 192.168.101.28
}
}
#
trap = {
{
trap-community = public
hosts = 192.168.101.28
}
}
2、i can get data also,
snmpwalk -v 2c 192.168.101.28 -c public |grep java
HOST-RESOURCES-MIB::hrSWRunName.7283 = STRING: "java"
HOST-RESOURCES-MIB::hrSWRunPath.7283 = STRING: "/home/scc/iSAP/jdk/jdk1.5.0_14/bin/java"
HOST-RESOURCES-MIB::hrSWRunParameters.7283 = STRING: "-DMODULE_TYPE=server -Dcom.huawei.dopra.config=/home/scc/iSAP/conf/server -server -Dderby.system.home=/home/scc/iSAP/conf/server -Dcatalina.home=/home/scc/iSAP/conf/server -Dcatalina.base=/home/scc/iSAP/conf/server -Dapache.home=/home/scc/iSAP/apache -Duniportal.home=/home/scc/iSAP/uniportal -Dmessage.home=/home/scc/iSAP/uniportal/conf/message -Dstart.jmxagent.lowlevel=true -Dsysclassloader.first=false -Dstart.rmi.registry=true -DDBFlag=false -Xms600M -Xmx600M -Dsun.rmi.dgc.server.gcInterval=0x7FFFFFFFFFFFFFE -Dsun.rmi.dgc.client.gcInterval=0x7FFFFFFFFFFFFFE -classpath /home/scc/iSAP/lib/uoajavalib.jar:/home/scc/iSAP/bin/ISAPStarter.jar: -Dcom.huawei.wbps.basedir=/home/scc/iSAP/Workflow/Engine -Dcom.huawei.java.home=/home/scc/iSAP/jdk/jdk1.5.0_14 -Dplatform.home=/home/scc/iSAP -Dproduct.home=/home/scc/iSAP -Dproduct.name=iSAP -Dcom.huawei.dopra.home=/home/scc/iSAP -Dcom.huawei.dopra.tmpdir=/home/scc/iSAP/conf/server/tmpdir -Djava.net.preferIPv4Stack=true -DDisplayCla"
HOST-RESOURCES-MIB::hrSWInstalledName.639 = STRING: "java-1_4_2-sun-1.4.2.13-0.2"
HOST-RESOURCES-MIB::hrSWInstalledName.764 = STRING: "java-1_4_2-sun-devel-1.4.2.13-0.2"
but my graph is empty ,i don't know why. please help!
acl = {
{
communities = public, private
access = read-only
managers = 192.168.101.28
}
}
#
trap = {
{
trap-community = public
hosts = 192.168.101.28
}
}
2、i can get data also,
snmpwalk -v 2c 192.168.101.28 -c public |grep java
HOST-RESOURCES-MIB::hrSWRunName.7283 = STRING: "java"
HOST-RESOURCES-MIB::hrSWRunPath.7283 = STRING: "/home/scc/iSAP/jdk/jdk1.5.0_14/bin/java"
HOST-RESOURCES-MIB::hrSWRunParameters.7283 = STRING: "-DMODULE_TYPE=server -Dcom.huawei.dopra.config=/home/scc/iSAP/conf/server -server -Dderby.system.home=/home/scc/iSAP/conf/server -Dcatalina.home=/home/scc/iSAP/conf/server -Dcatalina.base=/home/scc/iSAP/conf/server -Dapache.home=/home/scc/iSAP/apache -Duniportal.home=/home/scc/iSAP/uniportal -Dmessage.home=/home/scc/iSAP/uniportal/conf/message -Dstart.jmxagent.lowlevel=true -Dsysclassloader.first=false -Dstart.rmi.registry=true -DDBFlag=false -Xms600M -Xmx600M -Dsun.rmi.dgc.server.gcInterval=0x7FFFFFFFFFFFFFE -Dsun.rmi.dgc.client.gcInterval=0x7FFFFFFFFFFFFFE -classpath /home/scc/iSAP/lib/uoajavalib.jar:/home/scc/iSAP/bin/ISAPStarter.jar: -Dcom.huawei.wbps.basedir=/home/scc/iSAP/Workflow/Engine -Dcom.huawei.java.home=/home/scc/iSAP/jdk/jdk1.5.0_14 -Dplatform.home=/home/scc/iSAP -Dproduct.home=/home/scc/iSAP -Dproduct.name=iSAP -Dcom.huawei.dopra.home=/home/scc/iSAP -Dcom.huawei.dopra.tmpdir=/home/scc/iSAP/conf/server/tmpdir -Djava.net.preferIPv4Stack=true -DDisplayCla"
HOST-RESOURCES-MIB::hrSWInstalledName.639 = STRING: "java-1_4_2-sun-1.4.2.13-0.2"
HOST-RESOURCES-MIB::hrSWInstalledName.764 = STRING: "java-1_4_2-sun-devel-1.4.2.13-0.2"
but my graph is empty ,i don't know why. please help!
- Attachments
-
- b.JPG (129.25 KiB) Viewed 7861 times
-
- Posts: 9
- Joined: Tue Jul 14, 2009 2:47 am
can someone be more specific on setting this up?
I started my JVM with the following flags:
-Dcom.sun.management.snmp.port=6789 -Dcom.sun.management.snmp.acl.file=...
but then I can't connect to ort 6789
if I set up a new device in Hudson with the type JVM, and SNMP level 2, to port 6789, it can't connect to it, because one can't connect to port 6789
I can set up the supplied graph to my 'regular' snmp device, but then how would this know which JVM to get all the information from?
more specific information would be very helpful on how to set this up..
I started my JVM with the following flags:
-Dcom.sun.management.snmp.port=6789 -Dcom.sun.management.snmp.acl.file=...
but then I can't connect to ort 6789
if I set up a new device in Hudson with the type JVM, and SNMP level 2, to port 6789, it can't connect to it, because one can't connect to port 6789
I can set up the supplied graph to my 'regular' snmp device, but then how would this know which JVM to get all the information from?
more specific information would be very helpful on how to set this up..
-
- Posts: 1
- Joined: Wed Oct 07, 2009 1:52 pm
Replying to the original article - JVM maj/minor collections
Hello, these may help:
id="jThreadCnt" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.3.1.0"
id="jThreadTotalStarted" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.3.4.0"
id="jNewGenGCEventsCnt" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.2.101.1.2.2"
id="jOldGenGCEventsCnt" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.2.101.1.2.3"
id="jNewGenGCTimeMs" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.2.101.1.3.2"
id="jOldGenGCTimeMs" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.2.101.1.3.3"
id="jPermGenInit" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.10.5"
id="jPermGenMax" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.13.5"
id="jPermGenUsed" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.12.5"
id="jObjPendingFinalCnt" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.2.1.0"
id="jHeapCommitted" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.2.12.0"
id="jHeapUsed" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.2.11.0"
id="jNonHeapCommitted" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.2.22.0"
id="jNonHeapUsed" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.2.21.0"
id="jUptime" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.4.11.0"
id="jTtlClsLoadedCnt" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.1.2.0"
id="jTtlClsUnloadedCnt" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.1.3.0"
I found these using the JVM-MANAGEMENT.MIB file from Sun (http://java.sun.com/javase/6/docs/jre/a ... NT-MIB.mib) and also using the Mib browser tool from iReasoning (the free version is a little clunky, but works. I've also had luck polling these values with php and perl). I have not yet tested this with cacti, but will be doing so soon. I'd imagine it should work as long as you have the appropriate snmp oid's. When using the Mib browser, the names will look a little funky (something like GCCOUNT.2 or similar), which may throw you off (it did me ).
Jess
id="jThreadCnt" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.3.1.0"
id="jThreadTotalStarted" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.3.4.0"
id="jNewGenGCEventsCnt" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.2.101.1.2.2"
id="jOldGenGCEventsCnt" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.2.101.1.2.3"
id="jNewGenGCTimeMs" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.2.101.1.3.2"
id="jOldGenGCTimeMs" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.2.101.1.3.3"
id="jPermGenInit" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.10.5"
id="jPermGenMax" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.13.5"
id="jPermGenUsed" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.2.110.1.12.5"
id="jObjPendingFinalCnt" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.2.1.0"
id="jHeapCommitted" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.2.12.0"
id="jHeapUsed" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.2.11.0"
id="jNonHeapCommitted" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.2.22.0"
id="jNonHeapUsed" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.2.21.0"
id="jUptime" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.4.11.0"
id="jTtlClsLoadedCnt" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.1.2.0"
id="jTtlClsUnloadedCnt" oid="1.3.6.1.4.1.42.2.145.3.163.1.1.1.3.0"
I found these using the JVM-MANAGEMENT.MIB file from Sun (http://java.sun.com/javase/6/docs/jre/a ... NT-MIB.mib) and also using the Mib browser tool from iReasoning (the free version is a little clunky, but works. I've also had luck polling these values with php and perl). I have not yet tested this with cacti, but will be doing so soon. I'd imagine it should work as long as you have the appropriate snmp oid's. When using the Mib browser, the names will look a little funky (something like GCCOUNT.2 or similar), which may throw you off (it did me ).
Jess
Who is online
Users browsing this forum: No registered users and 0 guests