Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brendanhay/statgrab
Haskell bindings to the portable system statistics libstatgrab library.
https://github.com/brendanhay/statgrab
Last synced: 3 months ago
JSON representation
Haskell bindings to the portable system statistics libstatgrab library.
- Host: GitHub
- URL: https://github.com/brendanhay/statgrab
- Owner: brendanhay
- License: mpl-2.0
- Created: 2013-07-20T08:45:10.000Z (over 11 years ago)
- Default Branch: develop
- Last Pushed: 2015-01-29T09:55:25.000Z (almost 10 years ago)
- Last Synced: 2024-05-01T23:17:20.258Z (8 months ago)
- Language: Haskell
- Homepage:
- Size: 440 KB
- Stars: 9
- Watchers: 4
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Statgrab
Haskell bindings to the portable system statistics `libstatgrab` library.
## Table of Contents
* [Introduction](#introduction)
* [Compatibility](#compatibility)
* [Installation](#installation)
* [Examples](#examples)
* [Contributing](#contributing)
* [Licence](#licence)## Introduction
`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](http://www.i-scream.org/libstatgrab/)
for more information.Further documentation can be found on [Hackage](http://hackage.haskell.org/package/statgrab).
## Compatibility
`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.## Installation
Install `libstatgrab` `0.9.0` from a [mirror](http://www.i-scream.org/mirrors.xhtml),
and then run `cabal install`.## Examples
```haskell
module Main (main) whereimport Control.Monad.IO.Class
import System.Statgrabmain :: IO ()
main = do
runStats $ (snapshot :: Stats Host) >>= liftIO . print
runStats $ (snapshots :: Stats [NetworkInterface]) >>= liftIO . print
```## Contributing
For any problems, comments or feedback please create an issue [here on GitHub](github.com/brendanhay/statgrab/issues).
## Licence
statgrab is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/)