@ThreadSafe public class SystemResourcesCounter extends Thread
To accurately and consistently report CPU and network usage we have to periodically probe CPU ticks and network sent/received bytes and then convert those values to CPU usage and send/receive byte rates.
Thread.State, Thread.UncaughtExceptionHandlerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| 构造器和说明 |
|---|
SystemResourcesCounter(org.apache.flink.api.common.time.Time probeInterval) |
| 限定符和类型 | 方法和说明 |
|---|---|
double |
getCpuIdle() |
double |
getCpuIrq() |
double |
getCpuLoad1() |
double |
getCpuLoad15() |
double |
getCpuLoad5() |
double |
getCpuNice() |
double |
getCpuSoftIrq() |
double |
getCpuSteal() |
double |
getCpuSys() |
double |
getCpuUsage() |
double |
getCpuUsagePerProcessor(int processor) |
double |
getCpuUser() |
double |
getIOWait() |
String[] |
getNetworkInterfaceNames() |
int |
getProcessorsCount() |
long |
getReceiveRatePerInterface(int interfaceNo) |
long |
getSendRatePerInterface(int interfaceNo) |
void |
run() |
void |
shutdown() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic SystemResourcesCounter(org.apache.flink.api.common.time.Time probeInterval)
public void shutdown()
throws InterruptedException
public double getCpuUser()
public double getCpuNice()
public double getCpuSys()
public double getCpuIdle()
public double getIOWait()
public double getCpuIrq()
public double getCpuSoftIrq()
public double getCpuSteal()
public double getCpuUsage()
public double getCpuLoad1()
public double getCpuLoad5()
public double getCpuLoad15()
public int getProcessorsCount()
public double getCpuUsagePerProcessor(int processor)
public String[] getNetworkInterfaceNames()
public long getReceiveRatePerInterface(int interfaceNo)
public long getSendRatePerInterface(int interfaceNo)
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.