public class LoadAverage
extends java.lang.Object
implements java.lang.Runnable
/proc/loadavg as gauges.
Load averages are, "the number of jobs in the run queue (state R) or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes." - http://man7.org/linux/man-pages/man5/proc.5.html
Schedule an instance to run periodically to gather statistics.
| Modifier and Type | Class and Description |
|---|---|
static class |
LoadAverage.CurrentLoadValues |
| Constructor and Description |
|---|
LoadAverage()
Creates load average metrics.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,Metric> |
getMetrics() |
void |
run() |
LoadAverage.CurrentLoadValues |
values()
Gets the current load values.
|
public LoadAverage()
throws java.io.IOException
java.io.IOException - If load average metrics are unavailable.public void run()
run in interface java.lang.Runnablepublic LoadAverage.CurrentLoadValues values()
public java.util.Map<java.lang.String,Metric> getMetrics()