1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00
Commit graph

12 commits

Author SHA1 Message Date
Stefan Huehner
583560e57f Fix reporting of 'Permanent Generation' / Metaspace.
Fix regression in last commit. While it added auto-detection of changing
column position it did not take into account the known change from
Java 7 > 8.

Java <8 had the Permanent Generation region which jstat columns PU, PC
While Java >=8 now has a Metaspace region (for similar purpose) with
jstat columns MU,MC.

Add re-add detection for that change to fix reporting of the values.

To simplify code uses the MU,MC labels internally and when MU,MC are
not found in jstat output it fills those with PU,PC values.
2018-12-14 14:43:31 +01:00
Stefan Huehner
f0548a37de Fix jstat* plugins to work again with java 6+7, fix PU reporting for
Java8.

jstat column output is not stable across JVM versions (technically
version of jstat binary used).
New columns are added not add the end of column list but in the middle
breaking access via constant index.

Following table shows the known columns per version:
Oracle JDK / OpenJDK 1.5 .. 1.7
   S0C    S1C    S0U    S1U      EC       EU        OC         OU       PC     PU    YGC    YGCT   FGC     FGCT    GCT
Openjdk 1.8 .. 10
   S0C    S1C    S0U    S1U      EC       EU        OC         OU       MC     MU    CCSC   CCSU   YGC     YGCT    FGC    FGCT     GCT
Openjdk 11  .. 12
   S0C    S1C    S0U    S1U      EC       EU        OC         OU       MC     MU    CCSC   CCSU   YGC     YGCT    FGC    FGCT     CGC    CGCT     GCT

Earlier commit here added support for java8+ but using version checking
if version == 1.5 > Use pre-java8 column format, else new format.

As fixing java6+7 would mean more version comparison which is ugly this
cmomit changes retrival logic to the following;
a.) Parse first line jstat output to find position for each label
b.) Then use that position to fetch value from 2nd line

That way code auto-adjusts to any ordering change without needing any
java version specific code or checks.

On the way fix 'Permanent Used' value reporting for java8 which was
broken (missing variable rename from PU -> MU when java8 support was
added).
2018-12-13 15:20:34 +01:00
Lars Kruse
9cef55a3ed Restructure incomplete or broken "autoconf" implementations
Some plugins with non-zero autoconf exitcodes (it must be zero instead)
deserved a bit of code cleanup for improved readability.
2018-09-16 15:17:14 +02:00
Lars Kruse
0ddc7e2fec Plugins jstat__*: add format examples 2018-08-26 01:31:20 +02:00
Lars Kruse
67f9783780 Plugins jstat__*: fix shellcheck issues; switch from bash to sh 2018-08-26 01:31:20 +02:00
Lars Kruse
f5e6d7ea17 Plugins jstat__*: add support for Java 1.8 2018-08-26 01:31:20 +02:00
Lars Kruse
3398ff3c0c Plugins jstat__*: simplify handling of different JVM types 2018-08-26 01:31:20 +02:00
Lars Kruse
4c755fd4a7 Plugins jstat__*: mention 'graphtitle' setting in documentation 2018-08-26 01:26:43 +02:00
Lars Kruse
7a52b37509 Plugins jstat__*: improve detection of default JAVA_HOME 2018-08-26 01:26:43 +02:00
Lars Kruse
6af31ea318 Plugins jstat__*: simplify handling of environment settings 2018-08-26 01:26:43 +02:00
Lars Kruse
17f784270a Whitespace cleanup
* remove trailing whitespace
* remove empty lines at the end of files
2018-08-02 02:33:25 +02:00
dipohl
8d9fe5bdde Category Tree: Reduce number of categories
java -> virtualization (jvm)
wuala -> backup (wuala)
games (game) -> games (quake)
2017-02-26 15:49:01 +01:00
Renamed from plugins/java/jstat__heap (Browse further)