tips:radxa:monitor

Sound Monitor

sudo apt-get install netdiscover rrdtool cifs-utils

# generate ssh keys
ssh-keygen

gedit preferences → editor

tab width: 4
check insert spaces instead of tabs

Discover RADXA

sudo netdiscover
...
192.168.2.44    ac:a2:13:42:1c:14 Shenzhen Bilian electronic CO.,LTD
...

Upload key to RADXA (password is rock)

ssh-copy-id rock@192.168.x.y

Connect to RADXA

# user rock, password rock
ssh rock@192.168.x.y

connettersi alla rete WIFI (vedi sotto)

Mount remote share

mkdir /tmp/monitor
sudo mount -t cifs -o uid=valerio,guest //192.168.2.44/monitor /tmp/monitor
cd /tmp/monitor

Edit

gedit /tmp/monitor/monitor/capture.py

Generate graph

ssh rock@192.168.2.44 monitor_graph

Project is in /home/rock/monitor

run program in devel mode

# console sul radxa (ssh rock@192.1689.x.y)
sudo systemctl stop monitor

# start in foreground
monitor_run

# stop with CTRL+C

edit code

nano ~/monitor/monitor/capture.py
sudo nmcli device wifi connect <ssid> password <password>
sudo reboot
# staccare la ethernet

/etc/systemd/system/monitor.service

[Unit]
Description=Monitor

[Service]
Type=simple
User=rock
ExecStart=/usr/local/bin/monitor_run
After=network.target
Wants=time-sync.target

[Install]
WantedBy=multi-user.target

Enable

systemctl enable monitor.service
  • tips/radxa/monitor.txt
  • Last modified: 2016/05/13 14:33
  • by scipio