pi-stats
reads stats from a Raspberry Pi's VideoCore processor and writes them
to stdout using InfluxDB's line protocol0.
Based on ericlagergren's pi-stats https://github.com/ericlagergren/pi-stats including pull request from hancockks for throttling information. In addition the stepping has been delayed from 1 second to 10 seconds by default to reduce unnecessary I/O to the Pi's SD card.
To have everything installed for you, run make all
. You'll likely need root
privileges.
To install pi-stats
manually:
- Build the
pi-stats
binary withmake
(ormake install
and skip step #2) - Copy
pi-stats
to/usr/local/bin
- Copy
pi-stats.service
to/etc/systemd/service/
(ormake install-service
) - Copy
pi-stats.conf
to/etc/logrotate.d/pi-stats
(ormake install-logrot
)
Once you've installed pi-stats
, make sure to enable and run the service with
systemctl enable pi-stats
and systemctl start pi-stats
, respectively. Again,
you'll likely need root privileges.
By default, pi-stats
reads from VideoCore once per second. This can be
configured with the -s
flag, which is the number of seconds between reads.
The stats are written to /var/log/pi-stats.log
, which can then be parsed by
Telegraf1.