[systeminfo] Add 2 new channels for Java heap (#11322)

* Add heap measuring.
* refactor to remove apache.commons

Signed-off-by: Matthew Skinner <matt@pcmus.com>
This commit is contained in:
Matthew Skinner
2021-09-30 17:14:31 +10:00
committed by GitHub
parent b28413c6f1
commit 48b63759d9
5 changed files with 51 additions and 30 deletions

View File

@@ -16,6 +16,8 @@
<channel id="used" typeId="used"/>
<channel id="availablePercent" typeId="availablePercent"/>
<channel id="usedPercent" typeId="usedPercent"/>
<channel id="availableHeap" typeId="availableHeap"/>
<channel id="usedHeapPercent" typeId="usedHeapPercent"/>
</channels>
</channel-group-type>
@@ -125,6 +127,22 @@
</channels>
</channel-group-type>
<channel-type id="availableHeap" advanced="true">
<item-type>Number:DataAmount</item-type>
<label>Available Heap</label>
<description>How much data is available in the Java heap.</description>
<state pattern="%.1f %unit%" readOnly="true"/>
<config-description-ref uri="channel-type:systeminfo:mediumpriority"/>
</channel-type>
<channel-type id="usedHeapPercent">
<item-type>Number:Dimensionless</item-type>
<label>Used Heap Percent</label>
<description>How much data in percent has been used from the max size the Java heap can grow to.</description>
<state pattern="%.1f %%" readOnly="true"/>
<config-description-ref uri="channel-type:systeminfo:mediumpriority"/>
</channel-type>
<channel-type id="path_process">
<item-type>String</item-type>
<label>Path</label>