[ZBX-6577] Item 'Name of the current compiler' in 'Template JMX Generic' needs to be updated Created: 2013 May 07 Updated: 2017 May 30 Resolved: 2013 Oct 23 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Templates (T) |
Affects Version/s: | 2.0.6 |
Fix Version/s: | 2.1.9 |
Type: | Incident report | Priority: | Trivial |
Reporter: | Marc | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | jmx, templates, trivial | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
Just noticed that the key behind 'Name of the current compiler' (at least in connection with the related trigger) is not working as expected. To be on the safe side I decided to add a new item instead of updating the original one. Key of new item: Updated trigger: {Template JMX Generic:jmx["java.lang:type=Compilation",Name].str(Server)}#1& {Template JMX Generic:jmx["java.lang:type=Runtime",VmName].str(Server)}#1 |
Comments |
Comment by Aleksandrs Saveljevs [ 2013 Oct 17 ] |
"Template JMX Generic" tweaked a bit in development branch svn://svn.zabbix.com/branches/dev/ZBX-6577. The list of all changes is as follows:
Something I have not done in this issue, but was considering, is to adjust the set of items for monitoring different memory pools. For instance, the template includes items for monitoring the following pools:
A simple Java application that runs on OpenJDK 1.7.0_25 features the following memory pools:
So most of the memory pool items are unsupported. Similar situation is with garbage collectors. The current template monitors the following GCs:
The Java instance I was monitoring locally only has the last two:
I would be happy to investigate further if considered necessary. As for the original request in this issue, I have added jmx["java.lang:type=Runtime",VmName] to the template because it seems interesting. However, jmx["java.lang:type=Compilation",Name] still seems to be the correct item for getting the current JIT compiler and I would like to ask the reporter to share his doubts regarding this method. An interesting bit of trivia is that, according to OpenJDK 1.7.0_40 source code, the value of jmx["java.lang:type=Compilation",Name] is the same as "sun.management.compiler" property. |
Comment by Marc [ 2013 Oct 20 ] |
jmx["java.lang:type=Compilation",Name] seems not to provide the client/server information in general: # /usr/java/latest/bin/java -client -version java version "1.7.0_21" Java(TM) SE Runtime Environment (build 1.7.0_21-b11) Java HotSpot(TM) Client VM (build 23.21-b01, mixed mode, sharing) # /usr/java/latest/bin/java -server -version java version "1.7.0_21" Java(TM) SE Runtime Environment (build 1.7.0_21-b11) Java HotSpot(TM) Server VM (build 23.21-b01, mixed mode) Values colleted by Zabbix from server JVM:
|
Comment by Andris Zeila [ 2013 Oct 22 ] |
According to the discussion linked above the 'HotSpot (64-Bit) Tiered Compilers' is preferred compiler. So you are fine unless the compiler name contains 'client' (hence the updated trigger). |
Comment by Andris Zeila [ 2013 Oct 22 ] |
(1) the jmx["java.lang:type=OperatingSystem",ProcessCpuLoad] would better be represented as percentage (adding multiplier and unit). Also when idle the returned value can be too small, resulting in nonsupported value. Converting to percentage would at least lessen if not eliminate this problem (it fixed for me, but I'm not sure how small the returned value could theoretically be). asaveljevs Regarding returned value being too small, this is probably already fixed by wiper Yes, I might not have merged upstream before testing. asaveljevs Regarding process CPU load, RESOLVED that in r39508. wiper CLOSED |
Comment by Aleksandrs Saveljevs [ 2013 Oct 23 ] |
(2) I have also addressed Marc's suggestion in r39510 by adding trigger {Template JMX Generic:jmx["java.lang:type=Runtime",VmName].str(Server)}#1 . Before, we checked for JIT compiler, but that is not the only thing that distinguishes a client VM from a server VM. Also, I did "str(Server)#1" instead of "str(Client)=1", because it is possible to start Java not only with "-client" and "-server", but also other kinds of VMs: $ java -help |& grep VM -server to select the "server" VM -zero to select the "zero" VM -jamvm to select the "jamvm" VM -avian to select the "avian" VM The default VM is server, wiper reviewed, tested and CLOSED |
Comment by Andris Zeila [ 2013 Oct 24 ] |
Successfully tested |
Comment by Aleksandrs Saveljevs [ 2013 Oct 24 ] |
Improvements available in pre-2.1.9 (trunk) r39550. |