sysinfo: Haskell Interface for getting overall system statistics

[ bsd3, ffi, library, linux, system ] [ Propose Tags ]

This package 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.


[Skip to Readme]

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.1
Change log CHANGELOG.md
Dependencies base (>=4.7 && <5) [details]
License BSD-3-Clause
Copyright Copyright: (c) 2017 Sibi
Author Sibi Prabakaran
Maintainer sibi@psibi.in
Category FFI, Linux, System
Home page https://github.com/psibi/sysinfo#readme
Source repo head: git clone https://github.com/psibi/sysinfo
Uploaded by psibi at 2017-05-03T11:07:56Z
Distributions LTSHaskell:0.1.1, NixOS:0.1.1, Stackage:0.1.1
Reverse Dependencies 2 direct, 0 indirect [details]
Downloads 3324 total (15 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-05-03 [all 1 reports]

Readme for sysinfo-0.1.1

[back to package description]

sysinfo

Build Status

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

λ> 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}"