Package oshi.hardware
Class CentralProcessor.LogicalProcessor
java.lang.Object
oshi.hardware.CentralProcessor.LogicalProcessor
- Enclosing interface:
- CentralProcessor
A class representing a Logical Processor and its replationship to physical processors, physical packages, and
 logical groupings such as NUMA Nodes and Processor groups, useful for identifying processor topology.
- 
Constructor SummaryConstructorsConstructorDescriptionLogicalProcessor(int processorNumber, int physicalProcessorNumber, int physicalPackageNumber) LogicalProcessor(int processorNumber, int physicalProcessorNumber, int physicalPackageNumber, int numaNode) LogicalProcessor(int processorNumber, int physicalProcessorNumber, int physicalPackageNumber, int numaNode, int processorGroup) 
- 
Method SummaryModifier and TypeMethodDescriptionintThe NUMA node.intThe physical package (socket) id number assigned to this logical processor.intThe physical processor (core) id number assigned to this logical processor.intThe Processor Group.intThe Logical Processor number as seen by the Operating System.toString()
- 
Constructor Details- 
LogicalProcessorpublic LogicalProcessor(int processorNumber, int physicalProcessorNumber, int physicalPackageNumber) - Parameters:
- processorNumber- the Processor number
- physicalProcessorNumber- the core number
- physicalPackageNumber- the package/socket number
 
- 
LogicalProcessorpublic LogicalProcessor(int processorNumber, int physicalProcessorNumber, int physicalPackageNumber, int numaNode) - Parameters:
- processorNumber- the Processor number
- physicalProcessorNumber- the core number
- physicalPackageNumber- the package/socket number
- numaNode- the NUMA node number
 
- 
LogicalProcessorpublic LogicalProcessor(int processorNumber, int physicalProcessorNumber, int physicalPackageNumber, int numaNode, int processorGroup) - Parameters:
- processorNumber- the Processor number
- physicalProcessorNumber- the core number
- physicalPackageNumber- the package/socket number
- numaNode- the NUMA node number
- processorGroup- the Processor Group number
 
 
- 
- 
Method Details- 
getProcessorNumberpublic int getProcessorNumber()The Logical Processor number as seen by the Operating System. Used for assigning process affinity and reporting CPU usage and other statistics.- Returns:
- the processorNumber
 
- 
getPhysicalProcessorNumberpublic int getPhysicalProcessorNumber()The physical processor (core) id number assigned to this logical processor. Hyperthreaded logical processors which share the same physical processor will have the same number.- Returns:
- the physicalProcessorNumber
 
- 
getPhysicalPackageNumberpublic int getPhysicalPackageNumber()The physical package (socket) id number assigned to this logical processor. Multicore CPU packages may have multiple physical processors which share the same number.- Returns:
- the physicalPackageNumber
 
- 
getNumaNodepublic int getNumaNode()The NUMA node. If the operating system supports Non-Uniform Memory Access this identifies the node number. Set to 0 if the operating system does not support NUMA. Not supported on macOS or FreeBSD.- Returns:
- the NUMA Node number
 
- 
getProcessorGrouppublic int getProcessorGroup()The Processor Group. Only applies to Windows systems with more than 64 logical processors. Set to 0 for other operating systems or Windows systems with 64 or fewer logical processors.- Returns:
- the processorGroup
 
- 
toString
 
-