Package org.apache.hadoop.util
Class SysInfoWindows
java.lang.Object
org.apache.hadoop.util.SysInfo
org.apache.hadoop.util.SysInfoWindows
Plugin to calculate resource information on Windows systems.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongObtain the total size of the available physical memory present in the system.longObtain the total size of the available virtual memory present in the system.longObtain the CPU frequency of on the system.floatObtain the CPU usage % of the machine.longObtain the cumulative CPU time since the system is on.longObtain the aggregated number of bytes read over the network.longObtain the aggregated number of bytes written to the network.intObtain total number of physical cores present on the system.intObtain the total number of logical processors present on the system.floatObtain the number of VCores used.longObtain the total size of the physical memory present in the system.longObtain the aggregated number of bytes read from disks.longObtain the aggregated number of bytes written to disks.longObtain the total size of the virtual memory present in the system.Methods inherited from class org.apache.hadoop.util.SysInfo
newInstance
-
Constructor Details
-
SysInfoWindows
public SysInfoWindows()
-
-
Method Details
-
getVirtualMemorySize
public long getVirtualMemorySize()Obtain the total size of the virtual memory present in the system.- Specified by:
getVirtualMemorySizein classSysInfo- Returns:
- virtual memory size in bytes.
-
getPhysicalMemorySize
public long getPhysicalMemorySize()Obtain the total size of the physical memory present in the system.- Specified by:
getPhysicalMemorySizein classSysInfo- Returns:
- physical memory size bytes.
-
getAvailableVirtualMemorySize
public long getAvailableVirtualMemorySize()Obtain the total size of the available virtual memory present in the system.- Specified by:
getAvailableVirtualMemorySizein classSysInfo- Returns:
- available virtual memory size in bytes.
-
getAvailablePhysicalMemorySize
public long getAvailablePhysicalMemorySize()Obtain the total size of the available physical memory present in the system.- Specified by:
getAvailablePhysicalMemorySizein classSysInfo- Returns:
- available physical memory size bytes.
-
getNumProcessors
public int getNumProcessors()Obtain the total number of logical processors present on the system.- Specified by:
getNumProcessorsin classSysInfo- Returns:
- number of logical processors
-
getNumCores
public int getNumCores()Obtain total number of physical cores present on the system.- Specified by:
getNumCoresin classSysInfo- Returns:
- number of physical cores
-
getCpuFrequency
public long getCpuFrequency()Obtain the CPU frequency of on the system.- Specified by:
getCpuFrequencyin classSysInfo- Returns:
- CPU frequency in kHz
-
getCumulativeCpuTime
public long getCumulativeCpuTime()Obtain the cumulative CPU time since the system is on.- Specified by:
getCumulativeCpuTimein classSysInfo- Returns:
- cumulative CPU time in milliseconds
-
getCpuUsagePercentage
public float getCpuUsagePercentage()Obtain the CPU usage % of the machine. Return -1 if it is unavailable- Specified by:
getCpuUsagePercentagein classSysInfo- Returns:
- CPU usage as a percentage (from 0 to 100) of available cycles.
-
getNumVCoresUsed
public float getNumVCoresUsed()Obtain the number of VCores used. Return -1 if it is unavailable- Specified by:
getNumVCoresUsedin classSysInfo- Returns:
- Number of VCores used a percentage (from 0 to #VCores).
-
getNetworkBytesRead
public long getNetworkBytesRead()Obtain the aggregated number of bytes read over the network.- Specified by:
getNetworkBytesReadin classSysInfo- Returns:
- total number of bytes read.
-
getNetworkBytesWritten
public long getNetworkBytesWritten()Obtain the aggregated number of bytes written to the network.- Specified by:
getNetworkBytesWrittenin classSysInfo- Returns:
- total number of bytes written.
-
getStorageBytesRead
public long getStorageBytesRead()Description copied from class:SysInfoObtain the aggregated number of bytes read from disks.- Specified by:
getStorageBytesReadin classSysInfo- Returns:
- total number of bytes read.
-
getStorageBytesWritten
public long getStorageBytesWritten()Description copied from class:SysInfoObtain the aggregated number of bytes written to disks.- Specified by:
getStorageBytesWrittenin classSysInfo- Returns:
- total number of bytes written.
-