Simple network monitor for OSX/linux
Pass an interval and threshold config object and listen for events.
Usage:
npm i wifine
Tests:
Currently tests signal
, noise
, rate
, snr
, quality
, packetLoss
, download
, upload
To set threshold values pass an object to the Wifine constructor with key, value and operator:
signal:value:-66operator: >quality:value: 70operator: >packetLoss:value: 0operator: >download:value: 4operator: >
Events:
data
- Fires for every reading, returns all results.breach
- Fires when a result Value exceeds the value defined in the threshold config.error
- Fires for all caught errors.
Logging
Logging is configured by passing a config object to the constructor.
eg: { on: true, level: 'silly' }
Logs will be written to current directory ./wifine.log
Example
var Wifine = defaultvar interval = 15000var thresholdConfig =var loggingConf = on: true level: 'silly'const wifine = interval thresholdConfig loggingConfwifinewifinewifine