Package org.serviceconnector.util
Class SystemInfo
java.lang.Object
org.serviceconnector.util.SystemInfo
SystemInfo holds and detects current system information.
- Author:
- JTraber
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longReturns total free bytes on file system available in bytes.static intReturns the number of processors.static StringGets the config file name.static StringReturns the current country setting.static StringReturns CPU type.static intGets the daemon thread count.static longGets the free memory.static StringReturns current used java version.static StringReturns local host identification (hostname / IP).static longGets the max memory.static StringgetOs()Returns current operating system.static StringReturns operation system patch level.static intGets the peak thread count.static StringGets the SCMP version.static DateReturns startup date and time.static intGets the thread count.static longGets the total memory.static StringReturns current user directory.static StringReturns the current user time zone.static intReturns the offset to universal time coordinated (UTC).static StringReturns version of current used java virtual machine.static booleanisUseDST()Returns true if daylight saving (DST) time is used.static voidsetConfigFileName(String configFileName) Sets the config file name.
-
Constructor Details
-
SystemInfo
public SystemInfo()Instantiates a new system info.
-
-
Method Details
-
getConfigFileName
Gets the config file name.- Returns:
- the config file name
-
getscmpVersion
Gets the SCMP version.- Returns:
- the SCMP version
-
setConfigFileName
Sets the config file name.- Parameters:
configFileName- the new config file name
-
getJavaVersion
Returns current used java version.- Returns:
- javaVersion
-
getVmVersion
Returns version of current used java virtual machine.- Returns:
- vmVersion
-
getLocalHostId
Returns local host identification (hostname / IP).- Returns:
- localHostId.
-
getOs
Returns current operating system.- Returns:
- os
-
getOsPatchLevel
Returns operation system patch level.- Returns:
- osPatchLevel
-
getCpuType
Returns CPU type.- Returns:
- cpuType
-
getUserDir
Returns current user directory.- Returns:
- userDir
-
getCountrySetting
Returns the current country setting.- Returns:
- countrySetting
-
getUserTimezone
Returns the current user time zone.- Returns:
- userTimezone
-
getUtcOffset
public static int getUtcOffset()Returns the offset to universal time coordinated (UTC).- Returns:
- utcOffset
-
isUseDST
public static boolean isUseDST()Returns true if daylight saving (DST) time is used.- Returns:
- useDST
-
getStartupDateTime
Returns startup date and time.- Returns:
- startupDateTime
-
getAvailableProcessors
public static int getAvailableProcessors()Returns the number of processors.- Returns:
- numberOfProcessors
-
getMaxMemory
public static long getMaxMemory()Gets the max memory.- Returns:
- the max memory
-
getFreeMemory
public static long getFreeMemory()Gets the free memory.- Returns:
- the free memory
-
getTotalMemory
public static long getTotalMemory()Gets the total memory.- Returns:
- the total memory
-
getAvailableDiskSpace
public static long getAvailableDiskSpace()Returns total free bytes on file system available in bytes.- Returns:
- availDiskMemory
-
getThreadCount
public static int getThreadCount()Gets the thread count.- Returns:
- the thread count
-
getDaemonThreadCount
public static int getDaemonThreadCount()Gets the daemon thread count.- Returns:
- the daemon thread count
-
getPeakThreadCount
public static int getPeakThreadCount()Gets the peak thread count.- Returns:
- the peak thread count
-