-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Haskell Interface for getting overall system statistics
--   
--   This package can be used to get system statistics like uptime, free
--   memory, system load etc. Note that the package works *only* on Linux
--   system with kernel version &gt;= 2.3.23 and uses FFI calls.
@package sysinfo
@version 0.1.1

module System.SysInfo

-- | Function for getting system information. Internally it uses the Linux
--   system call sysinfo to get the system statistics.
sysInfo :: IO (Either Errno SysInfo)

-- | Data type representing system informating
data SysInfo
SysInfo :: CLong -> Loads -> CULong -> CULong -> CULong -> CULong -> CULong -> CULong -> CUShort -> CULong -> CULong -> CUInt -> SysInfo

-- | Seconds since boot
[uptime] :: SysInfo -> CLong

-- | 1, 5, and 15 minute load averages
[loads] :: SysInfo -> Loads

-- | Total usable main memory size
[totalram] :: SysInfo -> CULong

-- | Available memory size
[freeram] :: SysInfo -> CULong

-- | Amount of shared memory
[sharedram] :: SysInfo -> CULong

-- | Memory used by buffers
[bufferram] :: SysInfo -> CULong

-- | Total swap space size
[totalswap] :: SysInfo -> CULong

-- | swap space still available
[freeswap] :: SysInfo -> CULong

-- | Number of current processes
[procs] :: SysInfo -> CUShort

-- | Total high memory size
[totalhigh] :: SysInfo -> CULong

-- | Available high memory size
[freehigh] :: SysInfo -> CULong

-- | Memory unit size in bytes
[memUnit] :: SysInfo -> CUInt
newtype Loads
Loads :: [CULong] -> Loads
[sloads] :: Loads -> [CULong]
instance GHC.Classes.Ord System.SysInfo.SysInfo
instance GHC.Classes.Eq System.SysInfo.SysInfo
instance GHC.Show.Show System.SysInfo.SysInfo
instance GHC.Classes.Ord System.SysInfo.Loads
instance GHC.Classes.Eq System.SysInfo.Loads
instance GHC.Show.Show System.SysInfo.Loads
instance Foreign.Storable.Storable System.SysInfo.SysInfo
instance Foreign.Storable.Storable System.SysInfo.Loads
