-
Notifications
You must be signed in to change notification settings - Fork 55
/
run.sh.save.1
executable file
·51 lines (36 loc) · 2.24 KB
/
run.sh.save.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
BUFF_SIZE=256 #Must be a power of 2. Normal values are 128, 256, 512
IPADDR="192.168.4.1"
# Useful to set this on low power ARM devices
#sudo cpufreq-set -g performance
# Set for RPI3 with heatsink/fan
#sudo cpufreq-set -d 1.4GHz
# Set for Tinkerboard with heatsink/fan
#sudo cpufreq-set -d 1.8GHz
sudo sh -c "echo 0 > /sys/module/usbcore/parameters/usbfs_memory_mb"
echo '3' | sudo tee /proc/sys/vm/drop_caches
echo "Starting KerberosSDR"
sudo kill $(ps aux | grep 'rtl' | awk '{print $2}')
sudo pkill rtl_daq
sudo pkill sim
sudo pkill sync
sudo pkill gate
sudo pkill python3
# Enable on the Pi 3 to prevent the internet hogging the USB bandwidth
#sudo wondershaper wlan0 3000 3000
#sudo wondershaper eth0 3000 3000
sleep 1
sudo mount -osize=30m tmpfs /ram -t tmpfs
rm _receiver/C/gate_control_fifo
mkfifo _receiver/C/gate_control_fifo
rm _receiver/C/sync_control_fifo
mkfifo _receiver/C/sync_control_fifo
rm _receiver/C/rec_control_fifo
mkfifo _receiver/C/rec_control_fifo
#nice -n -20 ./_receiver/C/rtl_daq 2>log_err_rtl_daq 1| ./_receiver/C/sync 2>log_err_sync 1| ./_receiver/C/gate 2> log_err_gate 1| python3 _GUI/hydra_main_window.py > log_dsp&
curr_user=$(whoami)
#sudo chrt -r 50 ./_receiver/C/rtl_daq $BUFF_SIZE 2>log_err_rtl_daq 1| sudo chrt -r 50 ./_receiver/C/sync $BUFF_SIZE 2>log_err_sync 1| sudo chrt -r 50 ./_receiver/C/gate $BUFF_SIZE 2> log_err_gate 1| sudo nice -n -20 sudo -u $curr_user python3 -O _GUI/hydra_main_window.py $BUFF_SIZE $IPADDR&
sudo chrt -r 50 ionice -c 1 -n 3 ./_receiver/C/rtl_daq $BUFF_SIZE 2>/dev/null 1| sudo chrt -r 50 ./_receiver/C/sync $BUFF_SIZE 2>/dev/null 1| sudo chrt -r 50 ./_receiver/C/gate $BUFF_SIZE 2>/dev/null 1| sudo nice -n -20 sudo -u $curr_user python3 -O _GUI/hydra_main_window.py &>/dev/null $BUFF_SIZE $IPADDR&
#./_receiver/C/rtl_daq $BUFF_SIZE 2>log_err_rtl_daq 1| ./_receiver/C/sync $BUFF_SIZE 2>log_err_sync 1| ./_receiver/C/gate $BUFF_SIZE 2> log_err_gate 1| python3 -O _GUI/hydra_main_window.py $BUFF_SIZE $IPADDR&
#sudo chrt -r 51 ./_receiver/C/rtl_daq 2>log_err_rtl_daq 1| sudo chrt -r 50 ./_receiver/C/sync 2>log_err_sync 1| sudo chrt -r 50 ./_receiver/C/gate 2> log_err_gate 1| sudo nice -n -20 sudo -u $curr_user python3 _GUI/hydra_main_window.py&
sudo php -S $IPADDR:8081 -t _webDisplay >&- 2>&-