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 voidanalyzeSystem()static StringgetHostName()static longgetMemoryMB()The option -Xmx5g will not result in a result of 5 GB.static intgetNumberOfCPUs()static intgetNumberOfCPUs(int minimumCPUcountBeforeMultipleCPUsAreUsed)static intgetNumberOfCPUsMax(int maximum)static StringgetOperatingSystem()static intgetRealNumberOfCPUs()Use getNumberOfCPUs to determine the number of CPUs to be used for parallel computing.static longgetRealSystemMemoryInByte()static longgetUsedMemoryInMB()static StringgetUserName()static booleanisWindowsRunning()static voidsetUseFullCpuPower(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
-