monky-2.0.0.0: A system state collecting library and application

Maintainerongy
Stabilitytesting
PortabilityLinux
Safe HaskellNone
LanguageHaskell2010

Monky.CPU

Description

 

Synopsis

Documentation

data CPUHandle #

The handle exported by this module

data TempHandle #

The handle for themperature

data FreqHandle #

The handle for cpu frequency

data NumaHandle #

Numa aware version of CPUHandle

Constructors

NumaHandle 

getCPUPercent :: CPUHandle -> IO [Int] #

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

getNumaPercent :: NumaHandle -> IO [Int] #

Read node information

getCPUTemp :: TempHandle -> IO Int #

get current CPU temperature

getCPUMaxScalingFreq :: FreqHandle -> IO Float #

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 #

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] #

Get the Numa aware handle

guessThermalZone :: IO (Maybe String) #

Tries to guess the thermal zone based on type

getThermalZone :: String -> IO TempHandle #

Get the CPUs thermal zone

getThermalZones :: IO [TempHandle] #

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

getFreqHandle :: ScalingType -> IO FreqHandle #

Get a frequency handle by type

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

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