monky-2.2.1.0: A system state collecting library and application

Maintainerongy, moepi
Stabilitytesting
PortabilityLinux
Safe HaskellNone
LanguageHaskell2010

Monky

Description

This module contains the main logic for monky. This has to be included in the Monky.hs. The entry point for monky is startLoop which has to be called with a [IO Modules]. This type was chosen to make the syntax in the config file prettier.

The submodules of this generally provide an interface based on handles. To use them, get the handle at the beginning of you application and hand it to other functions later on.

Synopsis

Documentation

startLoop :: MonkyOutput o => IO o -> [IO Modules] -> IO () Source #

Start the mainLoop of monky. This should be the return type of your main

startLoopT :: MonkyOutput o => Int -> IO o -> [IO Modules] -> IO () Source #

Start the mainLoop of monky. With custom tick timer (in μs)

For 1s tick-timer pass 1000000 to this. This does not scale the timers for collection modules passed into it. So if 500000 is passed here, and a collector should update every second it needs to update every 2nd tick, so it has to be scaled.

    startLoop getAsciiOut [ pollPack 1 $ getRawCPU ]

    startLoopT 500000 getAsciiOut [ pollPack 2 $ getRawCPU ]