Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- data MemInfo = MemInfo {
- memTotal :: !Word64
- memFree :: !Word64
- memAvailable :: !Word64
- memBuffers :: !Word64
- memSwapTotal :: !Word64
- memSwapFree :: !Word64
- readProcMemInfo :: IO (Either ProcError MemInfo)
- readProcMemInfoKey :: ByteString -> IO (Either ProcError Word64)
- readProcMemUsage :: IO (Either ProcError Double)
- renderSizeBytes :: Word64 -> Text
Documentation
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.
MemInfo | |
|
readProcMemInfoKey :: ByteString -> IO (Either ProcError Word64) Source #
renderSizeBytes :: Word64 -> Text Source #
Render a Word64 as an easy to read size with a bytes, kB, MB, GB TB or PB suffix.