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.
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.
Open the log file for watching what is going on.
tail -f /var/log/lcarnevale/meterpi.log
FileNotFoundError: [Errno 2] No such file or directory: '/dev/i2c-1'
Enable i2c in the raspi-config
interface menu.