-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A library for accessing the /proc filesystem in Linux
--
-- A library for accessing the /proc filesystem in Linux
@package system-linux-proc
@version 0.1.0.2
module System.Linux.Proc.Errors
data ProcError
ProcReadError :: !FilePath -> !Text -> ProcError
ProcParseError :: !FilePath -> !Text -> ProcError
ProcMemInfoKeyError :: !Text -> ProcError
renderProcError :: ProcError -> Text
instance GHC.Show.Show System.Linux.Proc.Errors.ProcError
instance GHC.Classes.Eq System.Linux.Proc.Errors.ProcError
module System.Linux.Proc.IO
listProcDirectory :: FilePath -> ExceptT ProcError IO [FilePath]
readProcFile :: FilePath -> ExceptT ProcError IO ByteString
module System.Linux.Proc.MemInfo
-- | A struct to contain information parsed from the `/proc/meminfo` file
-- (Linux only AFAIK). Fields that are listed as being in kilobytes in
-- the proc filesystem are converted to bytes. Not all versions of the
-- Linux kernel make all the fields in this struct available in which
-- case they will be assigned a value of zero.
data MemInfo
MemInfo :: !Word64 -> !Word64 -> !Word64 -> !Word64 -> !Word64 -> !Word64 -> MemInfo
-- | Total physical RAM.
[memTotal] :: MemInfo -> !Word64
-- | Total free RAM (which includes memory used for filesystem caching).
[memFree] :: MemInfo -> !Word64
-- | Available memory.
[memAvailable] :: MemInfo -> !Word64
-- | Amount of RAM used for file buffers.
[memBuffers] :: MemInfo -> !Word64
-- | Total about of swap space.
[memSwapTotal] :: MemInfo -> !Word64
-- | Amount of swap space that is free.
[memSwapFree] :: MemInfo -> !Word64
-- | Read the `/proc/meminfo` file (Linux only AFAIK) and return a
-- MemInfo structure. Although this is in IO all exceptions
-- and errors should be caught and returned as a ProcError.
readProcMemInfo :: IO (Either ProcError MemInfo)
-- | Read the value for the given key from `/proc/meminfo`. Although this
-- is in IO all exceptions and errors should be caught and
-- returned as a ProcError.
readProcMemInfoKey :: ByteString -> IO (Either ProcError Word64)
-- | Read `/proc/meminfo` file and return a value calculated from:
--
-- MemAvailable / MemTotal
--
-- Although this is in IO all exceptions and errors should be
-- caught and returned as a ProcError.
readProcMemUsage :: IO (Either ProcError Double)
instance GHC.Show.Show System.Linux.Proc.MemInfo.MemInfo
instance GHC.Classes.Eq System.Linux.Proc.MemInfo.MemInfo
module System.Linux.Proc.Process
newtype ProcessId
ProcessId :: Int -> ProcessId
[unProcessId] :: ProcessId -> Int
-- | Get the current list of ProcessIds.
getProcProcessIds :: IO (Either ProcError [ProcessId])
instance GHC.Show.Show System.Linux.Proc.Process.ProcessId
instance GHC.Classes.Eq System.Linux.Proc.Process.ProcessId