Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/psibi/sysinfo
Haskell Interface for getting overall system statistics
https://github.com/psibi/sysinfo
ffi haskell linux
Last synced: 9 days ago
JSON representation
Haskell Interface for getting overall system statistics
- Host: GitHub
- URL: https://github.com/psibi/sysinfo
- Owner: psibi
- License: other
- Created: 2017-04-27T00:54:22.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-08T02:22:29.000Z (over 5 years ago)
- Last Synced: 2024-04-25T06:20:59.952Z (7 months ago)
- Topics: ffi, haskell, linux
- Language: Haskell
- Size: 25.4 KB
- Stars: 16
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# sysinfo
[![Build Status](https://travis-ci.org/psibi/sysinfo.svg?branch=master)](https://travis-ci.org/psibi/sysinfo)
Haskell interface for the `sysinfo` Linux system call. This can be used
to get system statistics like uptime, free memory, system load etc.Note that the package works *only* on Linux system with kernel
version >= 2.3.23 and uses FFI calls.## Usage
``` haskell
λ> import System.SysInfo
λ> val <- sysInfo
λ> either (\_ -> "sysinfo failed") show val
"SysInfo {uptime = 121149, loads = Loads {sloads = [91200,80736,82592]}, totalram = 12286611456, freeram = 967655424, sharedram = 63033344, bufferram = 838983680, totalswap = 8261726208, freeswap = 8259276800, procs = 418, totalhigh = 0, freehigh = 0, memUnit = 1}"
```