JDK 1.5.0 + JVM Stats
Moderators: Developers, Moderators
JDK 1.5.0 + JVM Stats
Attached is a template I worked on late last week.
It is not 100% yet but may be useful to some - and maybe I can get some help from more experienced users as well
The template does the following graphs:
1. JVM heap usage
2. JVM non-heap usage
3. Thread count
4. GC stats **
** The only GC stats available via SNMP are i) number of GC runs and ii) total time (both of these are cumulative since JVM start). I find this useless - I need to find a way to get major vs minor GC runs and per run time.
On to the template requirements:
Check out this doc first: http://java.sun.com/j2se/1.5.0/docs/gui ... /SNMP.html
Here are the basic requirements to monitor your JVM remotely:
1. Use SNMP v. 2
2. Must use jdk 1.5.0_x or higher
3. Must use the xxxx.properties file (if you specify the SNMP options at startup (ie. in catalina.sh or related script) you can only monitor locally).
Those were the main point of clarification I ran into.
Good luck,
jk
It is not 100% yet but may be useful to some - and maybe I can get some help from more experienced users as well
The template does the following graphs:
1. JVM heap usage
2. JVM non-heap usage
3. Thread count
4. GC stats **
** The only GC stats available via SNMP are i) number of GC runs and ii) total time (both of these are cumulative since JVM start). I find this useless - I need to find a way to get major vs minor GC runs and per run time.
On to the template requirements:
Check out this doc first: http://java.sun.com/j2se/1.5.0/docs/gui ... /SNMP.html
Here are the basic requirements to monitor your JVM remotely:
1. Use SNMP v. 2
2. Must use jdk 1.5.0_x or higher
3. Must use the xxxx.properties file (if you specify the SNMP options at startup (ie. in catalina.sh or related script) you can only monitor locally).
Those were the main point of clarification I ran into.
Good luck,
jk
- Attachments
-
- cacti_host_template_jvm_host.xml
- (52.81 KiB) Downloaded 4611 times
Hello,
Thank you for taking the time to create this template. I greatly appreciate it, however I'm not sure what i'm doing wrong...
I have the JVM listening on UDP 162 and when i tcpdump the port i can see requests coming in from cacti as I probe the host. But it doesnt look like any subsequent polling requests ever hit the port.
By default my regular net-snmpd daemon listens on UDP 161 like it should, I have a seperate profile for the same host to allow SNMP testing on UDP 162 just for the JVM. The port in this secondary profile is hard set to 162, is it possible that the cacti poller is ignoring this non-standard port?
Is there a step i'm missing on the Cacti side to allow regular scheduled polling to retreive data from the JVM
I've pasted the tcpdump of the complete UDP packet requests coming from Cacti to UDP 162 which confirms that the JVM does see the request from Cacti's initial grab, but nothing after during it's regular poller interval.
Any help would be greatly appreciated.
Thanks
-Alex
20:41:39.919997 IP 172.17.15.222.snmptrap > 172.17.19.250.32774: GetResponse(28) system.sysName.0=[noSuchObject]
0x0000: 4500 0047 0000 4000 4011 beab ac11 0fde E..G..@.@.......
0x0010: ac11 13fa 00a2 8006 0033 7c3f 3029 0201 .........3|?0)..
0x0020: 0104 0670 7562 6c69 63a2 1c02 0419 f726 ...public......&
0x0030: 6002 0100 0201 0030 0e30 0c06 082b 0601 `......0.0...+..
0x0040: 0201 0105 0080 00 .......
20:41:39.920658 IP 172.17.19.250.32774 > 172.17.15.222.snmptrap: GetRequest(28) system.sysLocation.0
0x0000: 4500 0047 0000 4000 3f11 bfab ac11 13fa E..G..@.?.......
0x0010: ac11 0fde 8006 00a2 0033 dcf6 3029 0201 .........3..0)..
0x0020: 0104 0670 7562 6c69 63a0 1c02 0419 f726 ...public......&
0x0030: 6102 0100 0201 0030 0e30 0c06 082b 0601 a......0.0...+..
0x0040: 0201 0106 0005 00 .......
Thank you for taking the time to create this template. I greatly appreciate it, however I'm not sure what i'm doing wrong...
I have the JVM listening on UDP 162 and when i tcpdump the port i can see requests coming in from cacti as I probe the host. But it doesnt look like any subsequent polling requests ever hit the port.
By default my regular net-snmpd daemon listens on UDP 161 like it should, I have a seperate profile for the same host to allow SNMP testing on UDP 162 just for the JVM. The port in this secondary profile is hard set to 162, is it possible that the cacti poller is ignoring this non-standard port?
Is there a step i'm missing on the Cacti side to allow regular scheduled polling to retreive data from the JVM
I've pasted the tcpdump of the complete UDP packet requests coming from Cacti to UDP 162 which confirms that the JVM does see the request from Cacti's initial grab, but nothing after during it's regular poller interval.
Any help would be greatly appreciated.
Thanks
-Alex
20:41:39.919997 IP 172.17.15.222.snmptrap > 172.17.19.250.32774: GetResponse(28) system.sysName.0=[noSuchObject]
0x0000: 4500 0047 0000 4000 4011 beab ac11 0fde E..G..@.@.......
0x0010: ac11 13fa 00a2 8006 0033 7c3f 3029 0201 .........3|?0)..
0x0020: 0104 0670 7562 6c69 63a2 1c02 0419 f726 ...public......&
0x0030: 6002 0100 0201 0030 0e30 0c06 082b 0601 `......0.0...+..
0x0040: 0201 0105 0080 00 .......
20:41:39.920658 IP 172.17.19.250.32774 > 172.17.15.222.snmptrap: GetRequest(28) system.sysLocation.0
0x0000: 4500 0047 0000 4000 3f11 bfab ac11 13fa E..G..@.?.......
0x0010: ac11 0fde 8006 00a2 0033 dcf6 3029 0201 .........3..0)..
0x0020: 0104 0670 7562 6c69 63a0 1c02 0419 f726 ...public......&
0x0030: 6102 0100 0201 0030 0e30 0c06 082b 0601 a......0.0...+..
0x0040: 0201 0106 0005 00 .......
trying to import
Trying to import the template into cacti.
getting Error: XML: Hash version does not exist.
getting Error: XML: Hash version does not exist.
If all else fails, rm -rf /
-
- Cacti User
- Posts: 137
- Joined: Mon Feb 11, 2008 3:46 am
Imported the xml file, but output is blank graph..
I am using cacti_8.7b
Without changing the xml file , i have imported successfully. But the graph is blank. What might be the route cause ? Find the screen shots from the attachment.
Without changing the xml file , i have imported successfully. But the graph is blank. What might be the route cause ? Find the screen shots from the attachment.
- Attachments
-
- Screen_Shot.doc
- (124.5 KiB) Downloaded 1882 times
-
- Cacti User
- Posts: 137
- Joined: Mon Feb 11, 2008 3:46 am
JVM Monitor
I have already succede with the given link (Debug NaN's in your graphs ). No porblem.
Question:
Only for the imported template alone i am not getting the graph.
Question:
Only for the imported template alone i am not getting the graph.
-
- Cacti User
- Posts: 137
- Joined: Mon Feb 11, 2008 3:46 am
Associated Data Queries
Is Associated Data Queries is requried for JVM mnoitor. ? If it is which one need to select ?
Last edited by elayaraja.s on Fri Mar 07, 2008 4:40 am, edited 1 time in total.
-
- Cacti User
- Posts: 137
- Joined: Mon Feb 11, 2008 3:46 am
Any script requied for this XML
Is there any perl script is required to configure in Cacti for monitoring the 'JVM heap usage' or
by simply importing 'cacti_host_template_jvm_host.xml' file will able to create the graph. Could you pleae guide.
by simply importing 'cacti_host_template_jvm_host.xml' file will able to create the graph. Could you pleae guide.
- Attachments
-
- JVM_noDataInGraph.JPG (200.04 KiB) Viewed 39681 times
Who is online
Users browsing this forum: No registered users and 3 guests