lcarnevale / meterpi

Meter the Raspberry Pi resources (cpu, mem, net) and power consumption.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MeterPi

python-v3-blue

This project aims monitoring power consumtion and resources (cpu, memory, network) of a Raspberry Pi 3. It uses the reader-writer paradigm for consuming messages.

How to use it

Clone the repository and build it locally using the Dockerfile. Use the build.sh script or directly the docker command.

docker build -t lcarnevale/meterpi .

Run the image, defining your configuration directory (i.e. /opt/lcarnevale/meterpi).

docker run -d --name meterpi \
    -v /opt/lcarnevale/meterpi:/etc/meterpi \
    -v /var/log/lcarnevale:/opt/meterpi/log \
    --device /dev/i2c-1 \
    --net=host \
    lcarnevale/meterpi

Use also the option --restart unless-stopped if you wanna make it able to start on boot.

How to debug it

Open the log file for watching what is going on.

tail -f /var/log/lcarnevale/meterpi.log

Troubleshooting

FileNotFoundError: [Errno 2] No such file or directory: '/dev/i2c-1'

Enable i2c in the raspi-config interface menu.

About

Meter the Raspberry Pi resources (cpu, mem, net) and power consumption.

License:MIT License


Languages

Language:Python 94.2%Language:Dockerfile 3.0%Language:Shell 2.8%