Package org.drasyl.util
Class OSInfo
java.lang.Object
org.drasyl.util.OSInfo
Utility class that can be used to detect properties specific to the current runtime
environment/operating system, such as os name.
-
Method Details
-
getInstance
-
osName
- Returns:
- the OS name
-
osVersion
- Returns:
- the OS version
-
osArch
- Returns:
- the OS arch
-
currentUser
- Returns:
- the current user, that is executing this JVM
-
hostname
- Returns:
- the hostname of the executing JVM
-
availableProcessors
public int availableProcessors()- Returns:
- the number of available cores (can be virtual)
-
totalMemory
public long totalMemory()This method does NOT return the JVM memory. Instead, it returns the total available system memory.- Returns:
- the amount of total system memory
-
cpuName
- Returns:
- return the CPU name
-