monky-2.2.0.0: A system state collecting library and application

Maintainerongy
Stabilitytesting
PortabilityLinux
Safe HaskellNone
LanguageHaskell2010

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 

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 Int Source #

get current CPU temperature

getCPUMaxScalingFreq :: FreqHandle -> IO Float Source #

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 TempHandle Source #

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 FreqHandle Source #

Get a frequency handle by type

getFreqNuma :: ScalingType -> NumaHandle -> IO FreqHandle Source #

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