Lars,

That’s interesting. The code that computes that is simple:

final MemoryUsage usage = mxBean.getNonHeapMemoryUsage();
return Ratio.of(usage.getUsed(), usage.getMax());

So it’s getting a MemoryUsage object from the JVM and returning usage.getUsed() 
/ usage.getMax().
But the documentation for MemoryUsage.getMax() state that if no maximum value 
has been set, it will return -1.

So it looks like it means the non-heap usage is really 2.81816384E8 for you. So 
281 MB. And there is no max value set.

Thanks
-Mark


On Aug 4, 2021, at 1:19 PM, Lars Winderling 
<lars.winderl...@posteo.de<mailto:lars.winderl...@posteo.de>> wrote:

Dear community,

using the QueryNiFiReportingTask on NiFi:1.13.2 on java:8, debian:10, with G1 
enabled as GC, I see something like this:

  "jvm_heap_used" : 4.26262096E8,
  "jvm_heap_usage" : 0.2646583418051402,
  "jvm_non_heap_usage" : -2.81816384E8,

The non heap usage is negative by large. What does that mean? I can't seem to 
find any resources on the web, nor in the sources.
Thanks in advance for your support!

Best,
Lars

Reply via email to