add
This commit is contained in:
parent
d84b7a20a5
commit
04a73ae1a2
3 changed files with 23 additions and 1 deletions
|
@ -11,7 +11,8 @@ Ambient temperature is read from `/sys/bus/w1/devices` so you must have 1wire en
|
||||||
# compilation and usage
|
# compilation and usage
|
||||||
`make` or `gcc main.c -o measurer` \
|
`make` or `gcc main.c -o measurer` \
|
||||||
Should throw no warnings \
|
Should throw no warnings \
|
||||||
`./measurer <output>`
|
`./measurer <output>` \
|
||||||
|
You can schedule this with [systemd](/src/branch/master/systemd)
|
||||||
|
|
||||||
# why
|
# why
|
||||||
like heavy ahh like databases grafana etc go away you're a performance monitor why'd you reduce performance
|
like heavy ahh like databases grafana etc go away you're a performance monitor why'd you reduce performance
|
11
systemd/measurer.service
Normal file
11
systemd/measurer.service
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[Unit]
|
||||||
|
Description=measurer
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=pi
|
||||||
|
Group=pi
|
||||||
|
WorkingDirectory=/home/pi/measurer
|
||||||
|
ExecStart=/home/pi/measurer/measurer /home/pi/measurer/data.csv
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
10
systemd/measurer.timer
Normal file
10
systemd/measurer.timer
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Say Hello every 10 seconds
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnBootSec=10
|
||||||
|
OnUnitActiveSec=10
|
||||||
|
AccuracySec=1
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
Loading…
Reference in a new issue