public class SystemMonitorUtil extends Object
| 构造器和说明 |
|---|
SystemMonitorUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static SystemCpuInfo |
cpuInfo(oshi.SystemInfo systemInfo,
DecimalFormat decimalFormat)
获取cpu信息
|
static List<SystemDiskInfo> |
diskInfo(DecimalFormat decimalFormat)
获取磁盘信息
|
static void |
main(String[] args)
测试
|
static SystemMemoryInfo |
memoryInfo(oshi.SystemInfo systemInfo,
DecimalFormat decimalFormat)
获取内存信息
|
static SystemOtherInfo |
otherInfo()
获取其他信息信息
|
static SystemInfo |
systemRealTimeInfo()
获取系统实时信息
|
static String |
systemRealTimeInfo(boolean pretty)
获取系统实时信息
|
public static String systemRealTimeInfo(boolean pretty)
pretty - 是否格式化打印public static SystemInfo systemRealTimeInfo()
public static SystemMemoryInfo memoryInfo(oshi.SystemInfo systemInfo, DecimalFormat decimalFormat)
systemInfo - 系统信息根对象(可为null)decimalFormat - 数字格式化样式(可为null)public static SystemCpuInfo cpuInfo(oshi.SystemInfo systemInfo, DecimalFormat decimalFormat)
systemInfo - 系统信息根对象(可为null)decimalFormat - 数字格式化样式(可为null)public static List<SystemDiskInfo> diskInfo(DecimalFormat decimalFormat)
decimalFormat - 数字格式化样式(可为null)public static SystemOtherInfo otherInfo()
public static void main(String[] args)
Copyright © 2023. All rights reserved.