Collect system level metrics and statistics

Latest on Hackage:0.1.3

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow to host generated Haddocks.

OtherLicense licensed by Brendan Hay
Maintained by Brendan Hay


Haskell bindings to the portable system statistics libstatgrab library.

Table of Contents


libstatgrab is a library that provides cross platform access to statistics about the system on which it's run. It's written in C and presents a selection of useful interfaces which can be used to access key system statistics. The current list of statistics includes CPU usage, memory utilisation, disk usage, process counts, network traffic, disk I/O, and more.

The current list of supported and tested platforms includes OSX, FreeBSD, Linux, NetBSD, OpenBSD, Solaris, DragonFly BSD, HP-UX and AIX.

Please see the libstatgrab homepage for more information.

Further documentation can be found on Hackage.


libstatgrab 0.9.0 is required.

While the bindings should correctly build on the same platforms as supported by the library, only OSX and Linux have currently been tested.


Install libstatgrab 0.9.0 from a mirror, and then run cabal install.


module Main (main) where

import Control.Monad.IO.Class
import System.Statgrab

main :: IO ()
main = do
 runStats $ (snapshot :: Stats Host) >>= liftIO . print
 runStats $ (snapshots :: Stats [NetworkInterface]) >>= liftIO . print


For any problems, comments or feedback please create an issue here on GitHub.


statgrab is released under the Mozilla Public License Version 2.0

Depends on 5 packages:
Used by 1 package:
comments powered byDisqus