public class RuntimeUtil extends Object
| Constructor and Description |
|---|
RuntimeUtil() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getCpuNum()
获取CPU核数
|
static String |
getJvmArguments()
返回输入的JVM参数列表
|
static int |
getPId()
获得当前进程的PID
当失败时返回-1
|
static Instant |
getStartTime()
返回应用启动的时间
|
static Duration |
getUpTime()
返回应用启动到现在的时间
|
public static int getPId()
当失败时返回-1
public static Instant getStartTime()
public static Duration getUpTime()
public static String getJvmArguments()
public static int getCpuNum()
Copyright © 2024. All rights reserved.