usr/lib/byobu/network, usr/share/man/man1/byobu.1: allow for

configuration of network traffic in [kM]ps, LP: #578377
This commit is contained in:
Dustin Kirkland 2010-08-20 23:07:44 -05:00
commit 7ac602d1d2
3 changed files with 10 additions and 1 deletions

2
debian/changelog vendored
View file

@ -3,6 +3,8 @@ byobu (3.2) unreleased; urgency=low
* usr/share/byobu/keybindings/f-keys: resize the screen as part of the * usr/share/byobu/keybindings/f-keys: resize the screen as part of the
F5/refresh, LP: #619899 F5/refresh, LP: #619899
* usr/bin/byobu-launcher: don't launch if in a dumb terminal, LP: #612886 * usr/bin/byobu-launcher: don't launch if in a dumb terminal, LP: #612886
* usr/lib/byobu/network, usr/share/man/man1/byobu.1: allow for
configuration of network traffic in [kM]ps, LP: #578377
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 03 Aug 2010 15:19:23 -0400 -- Dustin Kirkland <kirkland@ubuntu.com> Tue, 03 Aug 2010 15:19:23 -0400

View file

@ -57,6 +57,13 @@ for i in up down; do
rate=`echo "$rate" | awk '{printf "%.1f", $1/1024}'` rate=`echo "$rate" | awk '{printf "%.1f", $1/1024}'`
unit="MB/s" unit="MB/s"
fi fi
# Some users want to see bps rather than B/s
case "$NETWORK_UNITS" in
bits)
rate=`echo "$rate" | awk '{printf "%.0f", $1*8}'`
unit=`echo "$unit" | sed "s:B/s:bps:"`
;;
esac
fi fi
printf "$symbol$(color b m w)$rate$(color -)$(color m w)$unit$(color -) " printf "$symbol$(color b m w)$rate$(color -)$(color m w)$unit$(color -) "
done done

View file

@ -56,7 +56,7 @@ byobu \- wrapper script for seeding a user's byobu configuration and launching s
\fBmenu\fP \- a simple indicator directing new users to use the F9 keybinding to access the byobu menu \fBmenu\fP \- a simple indicator directing new users to use the F9 keybinding to access the byobu menu
\fBnetwork\fP \- instantaneous upload/download bandwidth in kB/s over the last 3 seconds; displayed in the lower bar toward the right in white text on a purple background with a leading '^' sign indicating 'up' and 'v' sign indicating 'down'; override the default interface by specifying an alternate interface with MONITORED_NETWORK=eth1 in \fI$HOME/.byobu/statusrc\fP \fBnetwork\fP \- instantaneous upload/download bandwidth in kB/s over the last 3 seconds; displayed in the lower bar toward the right in white text on a purple background with a leading '^' sign indicating 'up' and 'v' sign indicating 'down'; override the default interface by specifying an alternate interface with MONITORED_NETWORK=eth1, and override the default units (kB/s) with NETWORK_UNITS=bits in \fI$HOME/.byobu/statusrc\fP
\fBprocesses\fP \- total number of processes running on the system; displayed in the lower bar in white text on a dark yellow background with a trailing '&' indicating 'background processes' \fBprocesses\fP \- total number of processes running on the system; displayed in the lower bar in white text on a dark yellow background with a trailing '&' indicating 'background processes'