public class SystemUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CLUSTER_CONF_FILE_PATH
The file path of cluster conf.
|
static String |
LOCAL_IP |
static String |
NACOS_HOME
The home of nacos.
|
static String |
NACOS_HOME_KEY
The key of nacos home.
|
static boolean |
PREFER_HOSTNAME_OVER_IP
Flag to say that, when guessing a hostname, the hostname of the server should be used in preference to the IP
address reported by the OS.
|
static String |
PREFER_HOSTNAME_OVER_IP_PROPERTY_NAME
The System property name of prefer hostname over ip
|
static boolean |
STANDALONE_MODE
Standalone mode or not
|
static String |
STANDALONE_MODE_PROPERTY_NAME
The System property name of Standalone mode
|
| Constructor and Description |
|---|
SystemUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getConfFilePath() |
static float |
getCPU() |
static List<String> |
getIPsBySystemEnv(String key) |
static float |
getLoad() |
static float |
getMem() |
static String |
getSystemEnv(String key) |
static List<String> |
readClusterConf() |
static void |
writeClusterConf(String content) |
public static final String STANDALONE_MODE_PROPERTY_NAME
public static final String PREFER_HOSTNAME_OVER_IP_PROPERTY_NAME
public static final boolean PREFER_HOSTNAME_OVER_IP
public static final boolean STANDALONE_MODE
public static final String LOCAL_IP
public static final String NACOS_HOME_KEY
public static final String NACOS_HOME
public static final String CLUSTER_CONF_FILE_PATH
public static float getLoad()
public static float getCPU()
public static float getMem()
public static String getConfFilePath()
public static List<String> readClusterConf() throws IOException
IOExceptionpublic static void writeClusterConf(String content) throws IOException
IOExceptionCopyright © 2018 Alibaba Group. All rights reserved.