Rpi-Monitor for Arch Linux
- Install rpimonitor from AUR
- Delete /etc/rpimonitor/data.conf and create a new symlink to /etc/rpimonitor/template/bananian.conf:
- cd /etc/rpimonitor && rm data.conf && ln -s /etc/rpimonitor/template/bananian.conf data.conf
Copy the Code
- Arch Linux uses systemd, so we don't have syslog but journal. An easy (and dirty!) way to read the SOC/CPU temp value is from dmesg, so edit line 29 from file /usr/share/rpimonitor/scripts/bananian-temp-daemon.sh:
- nano +29 /usr/share/rpimonitor/scripts/bananian-temp-daemon.sh
Copy the Code and change tail /var/log/syslog to dmesg:
- HexVal=$(dmesg | awk -F" 0x" '/ 0x/ {print $2}' | tail -n1 )
Copy the Code
- Add a simple systemd service to handle the bananian-temp-daemon.sh script:
- nano /etc/systemd/system/bpi-temp.service
Copy the Code- [Unit]
- Description=Temperature measurement service for Banana boards
- [Service]
- ExecStart=/usr/share/rpimonitor/scripts/bananian-temp-daemon.sh
- [Install]
- WantedBy=multi-user.target
Copy the Code
- It's also needed to set the cpu governor and frequency just like this script. The best way to do this on archlinux, is by using systemd temporary files. For the cpu governor and frequency add:
- nano /etc/tmpfiles.d/cpugovernor.conf
Copy the Code- w /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - - - - ondemand
- w /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - - - - 600000
- w /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq - - - - 1008000
- w /sys/devices/system/cpu/cpufreq/ondemand/up_threshold - - - - 25
- w /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor - - - - 10
- w /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy - - - - 1
Copy the Code The same goes for the green led etc (of course you can put all your configs in one file):
- nano /etc/tmpfiles.d/greenled.conf
Copy the Code- w /sys/class/leds/green\:ph24\:led1/trigger - - - - none
Copy the Code To adjust the network parameters for LAN usage, please read Sysctl - [Optional] Load sunxi-dbgreg module on boot (the 'right' way). Module is loaded from bananian-temp-daemon.sh script, but here's another way to do it. Create a config file under /etc/modules-load.d/sunxi-dbgreg.conf and add the module we need:
- nano /etc/modules-load.d/sunxi-dbgreg.conf
Copy the Code- #Load sunxi-dbgreg needed by rpimonitor
- sunxi-dbgreg
Copy the Code
- Our final step is to start all the services (systemd service for rpimonitor gives me a "400 Bad request", so i started it from command line):
- /usr/bin/rpimonitord &
- systemctl enable bpi-temp.service
Copy the Code
- Enjoy your Rpi Monitor on http://your_banana_local_ip:8888/
Things todo:
- Check why rpimonitor doesn't work from systemd service,
- Check HDD/SSD with sata (don't have a cable yet),
- On my system "Memory" and "/boot partition" show NaN values,
- You tell me!
|