* usr/bin/wifi-status:

- ping the router, too, to verify at least local connectivity
This commit is contained in:
Dustin Kirkland 2016-11-06 19:25:44 -06:00
commit 27a6abe8cf
2 changed files with 6 additions and 2 deletions

3
debian/changelog vendored
View file

@ -1,6 +1,7 @@
byobu (5.113) unreleased; urgency=medium byobu (5.113) unreleased; urgency=medium
* UNRELEASED * usr/bin/wifi-status:
- ping the router, too, to verify at least local connectivity
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 16 Sep 2016 10:13:08 -0500 -- Dustin Kirkland <kirkland@ubuntu.com> Fri, 16 Sep 2016 10:13:08 -0500

View file

@ -27,14 +27,17 @@ else
dev="$1" dev="$1"
fi fi
router=$(route -n | grep "^0.0.0.0" | awk '{print $2}')
if [ -z "$TMUX" ]; then if [ -z "$TMUX" ]; then
watch -n1 "iwconfig $dev; ifconfig $dev; route -n; echo; (grep $dev: /var/log/syslog | tail -n 10 | sort -r); echo; ping -I $dev -c 1 8.8.8.8" watch -n1 "iwconfig $dev; ifconfig $dev; route -n; echo; (grep $dev: /var/log/syslog | tail -n 10 | sort -r); echo; ping -I $dev -c 1 8.8.8.8"
else else
tmux new-window -n wifi-status "watch -c iwconfig $dev \| ccze -A" \; \ tmux new-window -n wifi-status "watch -c iwconfig $dev \| ccze -A" \; \
split-window -t wifi-status -v "watch -c ifconfig $dev \| ccze -A" \; \ split-window -t wifi-status -v "watch -c ifconfig $dev \| ccze -A" \; \
split-window -t wifi-status -v "watch -c route -n \| ccze -A" \; \ split-window -t wifi-status -v "watch -c route -n \| ccze -A" \; \
split-window -t wifi-status -h "ping -I $dev 8.8.8.8" \; \ split-window -t wifi-status -h "ping -I $dev $router" \; \
split-window -t wifi-status -v "watch -c grep $dev: /var/log/syslog \| tail -n 10 \| sort -r \| ccze -A" \; \ split-window -t wifi-status -v "watch -c grep $dev: /var/log/syslog \| tail -n 10 \| sort -r \| ccze -A" \; \
split-window -t wifi-status -h "ping -I $dev 8.8.8.8" \; \
select-layout -t wifi-status tiled select-layout -t wifi-status tiled
fi fi