sysinfo-0.1.1: Haskell Interface for getting overall system statistics

Safe HaskellSafe
LanguageHaskell2010

System.SysInfo

Contents

Synopsis

Usage

λ> import System.SysInfo
λ> val <- sysInfo
λ> either (_ -> "sysinfo failed") show val
"SysInfo {uptime = 121149, loads = Loads {sloads = [91200,80736,82592]}, totalram = 12286611456, freeram = 967655424, sharedram = 63033344, bufferram = 838983680, totalswap = 8261726208, freeswap = 8259276800, procs = 418, totalhigh = 0, freehigh = 0, memUnit = 1}"

sysInfo :: IO (Either Errno SysInfo) Source #

Function for getting system information. Internally it uses the Linux system call sysinfo to get the system statistics.

data SysInfo Source #

Data type representing system informating

Constructors

SysInfo 

Fields

newtype Loads Source #

Constructors

Loads 

Fields

Instances

Eq Loads Source # 

Methods

(==) :: Loads -> Loads -> Bool #

(/=) :: Loads -> Loads -> Bool #

Ord Loads Source # 

Methods

compare :: Loads -> Loads -> Ordering #

(<) :: Loads -> Loads -> Bool #

(<=) :: Loads -> Loads -> Bool #

(>) :: Loads -> Loads -> Bool #

(>=) :: Loads -> Loads -> Bool #

max :: Loads -> Loads -> Loads #

min :: Loads -> Loads -> Loads #

Show Loads Source # 

Methods

showsPrec :: Int -> Loads -> ShowS #

show :: Loads -> String #

showList :: [Loads] -> ShowS #

Storable Loads Source # 

Methods

sizeOf :: Loads -> Int #

alignment :: Loads -> Int #

peekElemOff :: Ptr Loads -> Int -> IO Loads #

pokeElemOff :: Ptr Loads -> Int -> Loads -> IO () #

peekByteOff :: Ptr b -> Int -> IO Loads #

pokeByteOff :: Ptr b -> Int -> Loads -> IO () #

peek :: Ptr Loads -> IO Loads #

poke :: Ptr Loads -> Loads -> IO () #