monky-2.2.1.0: A system state collecting library and application

Maintainerongy
Stabilitytesting
PortabilityLinux
Safe HaskellNone
LanguageHaskell2010

Monky.Memory

Description

 

Synopsis

Documentation

data MemoryHandle Source #

The memory handle used for all functions

getMemoryAvailable :: MemoryHandle -> IO Int Source #

Return the memory available to userspace

This is accurate (read from kernel) for current kernels. Old kernel (~3.13) estimates this. Old kernels may overestimate.

getMemoryHandle :: IO MemoryHandle Source #

Get a memory handle

getMemoryTotal :: MemoryHandle -> IO Int Source #

Get the total amount of memory in the system

getMemoryUsed :: MemoryHandle -> IO Int Source #

Get the amount of memory used by the kernel and processes

getMemoryFree :: MemoryHandle -> IO Int Source #

Get the amount of memory rported as free by the kernel

getMemoryStats :: MemoryHandle -> IO (Int, Int, Int, Int) Source #

Get memory statistics in one got (with only one read) (total, avail, free, used)