CentralProcessor

CentralProcessor interface provides detailed information and metrics about the central processor of a system It includes properties to retrieve processor specifications, performance data, and load statistics

This interface is intended to be implemented by platform-specific classes to provide processor details and performance metrics across different systems

Author

N7ghtm4r3

Inheritors

CentralProcessorImpl

Properties

Link copied to clipboard
abstract val contextSwitches: Long

contextSwitches the number of context switches performed by the processor

Link copied to clipboard
abstract val currentFreq: LongArray

currentFreq an array representing the current frequency of each logical processor in Hz

Link copied to clipboard
abstract val featureFlags: List<String>

featureFlags a list of supported processor features (eg, virtualization, specific instruction sets)

Link copied to clipboard
abstract val interrupts: Long

interrupts the number of interrupts processed by the processor

Link copied to clipboard

logicalProcessorCount the total number of logical processors in the system

Link copied to clipboard

logicalProcessors a list of logical processors available in the system

Link copied to clipboard
abstract val maxFreq: Long

maxFreq the maximum frequency of the processor in Hz

Link copied to clipboard

physicalPackageCount the total number of physical processor packages in the system

Link copied to clipboard

physicalProcessorCount the total number of physical processors (cores) in the system

Link copied to clipboard

physicalProcessors a list of physical processors (cores) available in the system

Link copied to clipboard

processorCaches a list of caches associated with the processor

Link copied to clipboard

processorCpuLoadTicks an array of arrays representing CPU load ticks for each logical processor

Link copied to clipboard

processorIdentifier the identifier of the processor, providing details like name and architecture

Link copied to clipboard

systemCpuLoadTicks an array representing CPU load ticks for the entire system

Functions

Link copied to clipboard

Retrieves the processor CPU load as a percentage between the current ticks and the specified oldTickets

Link copied to clipboard
abstract fun getSystemCpuLoad(delay: Long): Double

Calculates the system CPU load over a specified delay period

Link copied to clipboard
abstract fun getSystemCpuLoadBetweenTicks(oldTickets: LongArray): Double

Retrieves the system CPU load as a percentage between the current ticks and the specified oldTickets

Link copied to clipboard
abstract fun getSystemLoadAverage(nelem: Int): DoubleArray

Retrieves the system load average for the last nelem intervals