haskus-system-0.6.0.0: Haskus system programming framework

Safe HaskellNone
LanguageHaskell2010

Haskus.Arch.Linux.Topology

Description

Processor/memory topology

Synopsis

Documentation

data CPUMap Source #

A CPUMap is a set of CPU identifiers

TODO: replace Vector of Word32 with a variable length bitset

Constructors

CPUMap (Vector Word32) 

Instances

parseMemInfo :: Parser (Map Text Word64) Source #

Parse meminfo files

readMemInfo :: FilePath -> IO (Map Text Word64) Source #

Read cpumap files

parseCPUMap :: Parser CPUMap Source #

Parse CPU map files

readCPUMap :: FilePath -> IO CPUMap Source #

Read cpumap files

member :: Word -> CPUMap -> Bool Source #

Check that a CPU belongs to a CPU Map

data Node Source #

A NUMA node

Constructors

Node 

Fields

Instances

data NUMA Source #

A set of NUMA nodes

Constructors

NUMA 

Fields

Instances

loadNUMA :: FilePath -> IO NUMA Source #

Load platform from sysfs (Linux)

nodeMemoryStatus :: NodeMemory -> IO (Word64, Word64) Source #

Return (total,free) memory for the given node

nodeCPUs :: Node -> [Word] Source #

Return a list of CPU numbers from a map in a node