JDK 1.5.0 + JVM Stats

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

elayaraja.s
Cacti User
Posts: 137
Joined: Mon Feb 11, 2008 3:46 am

Upload the perl script file

Post by elayaraja.s »

Could you please upload the perl script file...which will be usefull to monitor the JVM.
User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

Post by cyrill »

I've the SNMP error !!!
Cacti 0.8.7b

-> Architecture plugin
-> Thold plugin
-> Monitor plugin
-> Weathermap plugin
Wreckless
Posts: 1
Joined: Sat Mar 15, 2008 7:15 am
Location: London

Post by Wreckless »

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.
amacks
Posts: 12
Joined: Thu May 22, 2008 10:23 pm

Polling issue thought?

Post by amacks »

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
synacktic
Posts: 1
Joined: Thu Aug 28, 2008 8:56 am

I seem to be seeing the same thing...

Post by synacktic »

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.
jiguopeng
Posts: 2
Joined: Sun May 10, 2009 11:06 am

my graph is empty , i don't know why , pls help

Post by jiguopeng »

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!
Attachments
b.JPG
b.JPG (129.25 KiB) Viewed 7855 times
akos.maroy
Posts: 9
Joined: Tue Jul 14, 2009 2:47 am

Post by akos.maroy »

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..
jcharbneau
Posts: 1
Joined: Wed Oct 07, 2009 1:52 pm

Replying to the original article - JVM maj/minor collections

Post by jcharbneau »

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
mgupta
Posts: 16
Joined: Thu Aug 13, 2009 4:29 pm
Location: Canada

JVM 1.6 Stats with Cacti.

Post by mgupta »

Manas
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests