monky-2.1.0.0: A system state collecting library and application

PortabilityLinux
Stabilitytesting
Maintainerongy
Safe HaskellNone

Monky.CPU

Description

 

Synopsis

Documentation

data CPUHandle Source

The handle exported by this module

data TempHandle Source

The handle for themperature

data FreqHandle Source

The handle for cpu frequency

data NumaHandle Source

Numa aware version of CPUHandle

Constructors

NumaHandle 

Fields

numaCpus :: [String]
 
numaHandle :: CPUHandle
 

getCPUPercent :: CPUHandle -> IO [Int]Source

Get the cpu usage in percent for each (virtual) cpu

getNumaPercent :: NumaHandle -> IO [Int]Source

Read node information

getCPUTemp :: TempHandle -> IO IntSource

get current CPU temperature

getCPUMaxScalingFreq :: FreqHandle -> IO FloatSource

This function returns a frequency according the ScalingType of the handle.

The returned valued will be the max of all (virtual) proceessors on the system.

data ScalingType Source

Which values should be returned by getCPUFreq

Constructors

ScalingMax

Use the maximum frequencie allowed

ScalingCur

Use the current frequencie used

ScalingNone

Don't open any files for scaling type

getNumaHandles :: IO [NumaHandle]Source

Get the Numa aware handle

guessThermalZone :: IO (Maybe String)Source

Tries to guess the thermal zone based on type

getThermalZone :: String -> IO TempHandleSource

Get the CPUs thermal zone

getThermalZones :: IO [TempHandle]Source

Get the CPUs thermal zones, will be same order as numa nodes (hopefully)

getFreqHandle :: ScalingType -> IO FreqHandleSource

Get a frequency handle by type

getFreqNuma :: ScalingType -> NumaHandle -> IO FreqHandleSource

Get a frequency handle limited to the cpus the numa handle uses