Portability | Linux |
---|---|
Stability | testing |
Maintainer | ongy |
Safe Haskell | None |
- data CPUHandle
- data TempHandle
- data FreqHandle
- data NumaHandle = NumaHandle {
- numaCpus :: [String]
- numaHandle :: CPUHandle
- getCPUHandle :: IO CPUHandle
- getCPUPercent :: CPUHandle -> IO [Int]
- getNumaPercent :: NumaHandle -> IO [Int]
- getCPUTemp :: TempHandle -> IO Int
- getCPUMaxScalingFreq :: FreqHandle -> IO Float
- data ScalingType
- = ScalingMax
- | ScalingCur
- | ScalingNone
- getNumaHandles :: IO [NumaHandle]
- guessThermalZone :: IO (Maybe String)
- getThermalZone :: String -> IO TempHandle
- getThermalZones :: IO [TempHandle]
- getFreqHandle :: ScalingType -> IO FreqHandle
- getFreqNuma :: ScalingType -> NumaHandle -> IO FreqHandle
Documentation
data TempHandle Source
The handle for themperature
data FreqHandle Source
The handle for cpu frequency
data NumaHandle Source
Numa aware version of CPUHandle
NumaHandle | |
|
getCPUHandle :: IO CPUHandleSource
Create an 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
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