Collect the system information from you specified.
This tool will collect data and show in the monitor according to the instructions. The instruction is a JSON file.
- Python 3.5.2 (The version of Python we have on a Flo Device currently)
- pipenv: https://github.com/pypa/pipenv
- Create a virtual environment using Python 3.5
pipenv --python 3.5
- Install all dependencies for the project (including dev):
pipenv install -e .
pip install git+git://github.com/rondou/sysinfo.git
or
pipenv install 'git+ssh://git@github.com/rondou/sysinfo.git#egg=sysinfo'
Here is script.json content the key __meta__ is a magic key.
{
"load": {
"__meta__": {
"type": "shell",
"cmd": "echo \"[$(uptime | awk '{print $10}')]\"",
"rtype": "json",
"concurrent": true
}
}
}
Run sysinfo and specify json file.
sysinfo -p etc/script.json | jq .
You will get the follow result.
{
"load": [2.44]
}