monky-2.1.0.0: A system state collecting library and application

PortabilityLinux
Stabilitytesting
Maintainerongy
Safe HaskellSafe-Inferred

Monky.Memory

Description

 

Synopsis

Documentation

data MemoryHandle Source

The memory handle used for all functions

getMemoryAvailable :: MemoryHandle -> IO IntSource

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 MemoryHandleSource

Get a memory handle

getMemoryTotal :: MemoryHandle -> IO IntSource

Get the total amount of memory in the system

getMemoryUsed :: MemoryHandle -> IO IntSource

Get the amount of memory used by the kernel and processes

getMemoryFree :: MemoryHandle -> IO IntSource

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)