-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from SpeckiJ/contrib
Add some helper scripts
- Loading branch information
Showing
3 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# run vnc viewer in fullscreen on the selected monitor. | ||
# restarts it on connectivity issues, press ctrl-c TWICE to quit. | ||
# | ||
# usage: pixelvnc.sh [<host>[:<port>] [monitor-index]] | ||
# depends on: tigervnc | ||
|
||
host=${1:=vnc.schenklklopfer.de} | ||
screen=${2:=1} | ||
|
||
while :; do | ||
vncviewer ReconnectOnError=0 ViewOnly=1 FullScreen=1 FullScreenMode=Selected FullScreenSelectedMonitors=$screen $host | ||
sleep 1 # give room to ^C out of the loop | ||
done | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/sh | ||
|
||
# sets up BBR congestion control (https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=0f8782ea14974ce992618b55f0c041ef43ed0b78) | ||
# for the given interface | ||
|
||
DEV=${$1:=eth0} | ||
MODE=${$2:="temporary"} | ||
|
||
echo pre-run state: | ||
echo `sysctl net.ipv4.tcp_congestion_control` | ||
echo qdisc on $DEV: `tc qdisc show dev $DEV` | ||
|
||
# set required "fair queueing" queuing discipline (man tc-fq) | ||
echo "qdisc on $DEV was: `tc qdisc show dev $DEV`" | ||
tc qdisc replace dev $DEV root fq | ||
echo "qdisc on $DEV now is: `tc qdisc show dev $DEV`" | ||
|
||
# (permanently) configure BBR | ||
if [[ mode == "temporary" ]]; then | ||
echo -e 'net.core.default_qdisc=fq | ||
net.ipv4.tcp_congestion_control=bbr' | sysctl -p- | ||
elif [[ mode == "permanent"]]; then | ||
echo -e 'net.core.default_qdisc=fq | ||
net.ipv4.tcp_congestion_control=bbr' >> /etc/sysctl.d/20-net-bbr.conf | ||
sysctl -p /etc/sysctl.d/20-net-bbr.conf | ||
algo=`sysctl net.ipv4.tcp_congestion_control` | ||
if [[ "$algo" != 'net.ipv4.tcp_congestion_control = bbr' ]]; then | ||
echo "couldn't apply changes at runtime, you should reboot." | ||
fi | ||
else | ||
echo "unknown mode, congestion control algo unchanged" | ||
fi |
File renamed without changes.