Class SystemAnalysis
java.lang.Object
de.ipk_gatersleben.ag_nw.graffiti.plugins.misc.threading.SystemAnalysis
- All Implemented Interfaces:
HelperClass
public class SystemAnalysis extends Object implements HelperClass
-
Constructor Summary
Constructors Constructor Description SystemAnalysis()
-
Method Summary
Modifier and Type Method Description static void
analyzeSystem()
static String
getHostName()
static long
getMemoryMB()
The option -Xmx5g will not result in a result of 5 GB.static int
getNumberOfCPUs()
static int
getNumberOfCPUs(int minimumCPUcountBeforeMultipleCPUsAreUsed)
static int
getNumberOfCPUsMax(int maximum)
static String
getOperatingSystem()
static int
getRealNumberOfCPUs()
Use getNumberOfCPUs to determine the number of CPUs to be used for parallel computing.static long
getRealSystemMemoryInByte()
static long
getUsedMemoryInMB()
static String
getUserName()
static boolean
isWindowsRunning()
static void
setUseFullCpuPower(boolean b)
-
Constructor Details
-
SystemAnalysis
public SystemAnalysis()
-
-
Method Details
-
getRealNumberOfCPUs
public static int getRealNumberOfCPUs()Use getNumberOfCPUs to determine the number of CPUs to be used for parallel computing. This method may be used for analysis of host system.- Returns:
-
setUseFullCpuPower
public static void setUseFullCpuPower(boolean b) -
getNumberOfCPUs
public static int getNumberOfCPUs() -
getNumberOfCPUs
public static int getNumberOfCPUs(int minimumCPUcountBeforeMultipleCPUsAreUsed) -
getUserName
-
getNumberOfCPUsMax
public static int getNumberOfCPUsMax(int maximum) -
getHostName
- Throws:
UnknownHostException
-
isWindowsRunning
public static boolean isWindowsRunning() -
analyzeSystem
public static void analyzeSystem() -
getRealSystemMemoryInByte
public static long getRealSystemMemoryInByte() -
getMemoryMB
public static long getMemoryMB()The option -Xmx5g will not result in a result of 5 GB. it seems the java parameter does not use base of 1024 values but base of 1000 values.- Returns:
-
getUsedMemoryInMB
public static long getUsedMemoryInMB() -
getOperatingSystem
- Returns:
- windows/linux/mac/other
-