Package com.ferrumx.system.hardware
Class Win32_Processor
java.lang.Object
com.ferrumx.system.hardware.Win32_Processor
This class queries the Win32_Processor class of WMI and represents the CPU
details of your system.
Fetches the following properties: Name, NumberOfCores, ThreadCount, NumberOfLogicalProcessor, Manufacturer, AddressWidth, L2CacheSize, L3CacheSize, MaxClockSpeed, ExtClock, SocketDesignation, Version, Caption, Family, Stepping, VirtualizationFirmwareEnabled, ProcessorID
- Author:
- Egg-03
-
Method Summary
Modifier and TypeMethodDescriptiongetCurrentProcessor
(String deviceID) This method fetches the CPU properties based on the given CPU IDThis method fetches a list of CPUs present in the system based on their IDs
-
Method Details
-
getProcessorList
public static List<String> getProcessorList() throws IOException, IndexOutOfBoundsException, ShellException, InterruptedExceptionThis method fetches a list of CPUs present in the system based on their IDs- Returns:
- a
List
of CPU IDs - Throws:
IOException
- re-throws the exception thrown byCIM_ML.getPropertyValue(String, String)
when there are I/O Errors during streaming of data from and to Powershell and other generated filesIndexOutOfBoundsException
- re-throws the exception thrown byCIM_ML.getPropertyValue(String, String)
when there is a parsing error of data fetched from Windows PowershellShellException
- if any internal command used in the powershell throws errorsInterruptedException
- if the thread waiting for the process to exit, gets interrupted. When catching this exception, you may re-throw it's interrupted status by using Thread.currentThread().interrupt();
-
getCurrentProcessor
public static Map<String,String> getCurrentProcessor(String deviceID) throws IOException, IndexOutOfBoundsException, ShellException, InterruptedException This method fetches the CPU properties based on the given CPU ID- Parameters:
deviceID
- fetched fromgetProcessorList()
- Returns:
- a
Map
of CPU properties and their values mentioned in the class description - Throws:
IOException
- re-throws the exception thrown byCIM_ML.getPropertiesAndTheirValuesWhere(String, String, String, String)
when there are I/O Errors during streaming of data from and to Powershell and other generated filesIndexOutOfBoundsException
- re-throws the exception thrown byCIM_ML.getPropertiesAndTheirValuesWhere(String, String, String, String)
when there is a parsing error of data fetched from Windows PowershellShellException
- if any internal command used in the powershell throws errorsInterruptedException
- if the thread waiting for the process to exit, gets interrupted. When catching this exception, you may re-throw it's interrupted status by using Thread.currentThread().interrupt();
-