-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Load average parsing from /proc/loadavg and bindings to getloadavg (3)
--
-- Load average parsing from /proc/loadavg and bindings to
-- getloadavg (3)
@package loadavg
@version 0.1
-- | There are two basic ways you can get load average on a modern Linux
-- system. First is getloadavg (3) system call. The second is
-- /proc/loadavg file. This module provides means of getting the
-- information from both sources. /proc/loadavg provides some
-- additional information but we ignore that.
module System.Posix.LoadAvg
data LoadAvg
LoadAvg :: !Double -> !Double -> !Double -> LoadAvg
-- | sample for last 1 minute
sample_1 :: LoadAvg -> !Double
-- | sample for last 5 minutes
sample_5 :: LoadAvg -> !Double
-- | sample for last 15 minutes
sample_15 :: LoadAvg -> !Double
-- | Tries to parse the output of /proc/loadavg. If anything goes
-- wrong an arbitrary exception will be raised.
parseLoadAvg :: String -> LoadAvg
-- | Discards error checking from getLoadAvgSafe. Will raise IO exception
-- on error.
getLoadAvg :: IO LoadAvg
-- | Calls getloadavg (3) to get system load average. Provides
-- error checking, and the result may be Nothing in case of error. If
-- there is not enough data the samples will be copied from more recent
-- samples.
getLoadAvgSafe :: IO (Maybe LoadAvg)
-- | Tries to read /proc/loadavg and parse it's output with
-- parseLoadAvg. Either may fail with IO exception.
getLoadAvgProc :: IO LoadAvg
instance Read LoadAvg
instance Show LoadAvg
instance Eq LoadAvg
instance Ord LoadAvg