mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 14:03:18 -07:00
that minimum hours is 1, not 0; LP: #639855
* usr/lib/byobu/network: use bps rather than B/s by default for network traffic, LP: #578377
This commit is contained in:
parent
9063cf1622
commit
9c8145a3ed
3 changed files with 23 additions and 12 deletions
4
debian/changelog
vendored
4
debian/changelog
vendored
|
@ -7,7 +7,9 @@ byobu (3.5) unreleased; urgency=low
|
|||
* usr/lib/byobu/rcs_cost, usr/lib/byobu/ec2_cost: testing crontab
|
||||
creation time is not accurate, seems this happens at image creation
|
||||
rather than instance instantiation; use /etc/hostname instead; ensure
|
||||
that minimum hours is 1, not 0
|
||||
that minimum hours is 1, not 0; LP: #639855
|
||||
* usr/lib/byobu/network: use bps rather than B/s by default for network
|
||||
traffic, LP: #578377
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 01 Sep 2010 13:11:34 -0600
|
||||
|
||||
|
|
|
@ -53,21 +53,30 @@ for i in up down; do
|
|||
if [ "$rate" -lt 0 ]; then
|
||||
rate=0
|
||||
fi
|
||||
# Why 1000 and not 1024? http://en.wikipedia.org/wiki/Data_rate_units
|
||||
case "$NETWORK_UNITS" in
|
||||
bits)
|
||||
rate=`echo "$rate" | awk '{printf "%.0f", $1*8}'`
|
||||
unit="kbps"
|
||||
if [ "$rate" -gt 1000 ]; then
|
||||
rate=`echo "$rate" | awk '{printf "%.1f", $1/1000}'`
|
||||
unit="Mbps"
|
||||
bytes)
|
||||
if [ "$rate" -gt 1048576 ]; then
|
||||
rate=`echo "$rate" | awk '{printf "%.1f", $1/1048576}'`
|
||||
unit="GB/s"
|
||||
elif [ "$rate" -gt 1024 ]; then
|
||||
rate=`echo "$rate" | awk '{printf "%.1f", $1/1024}'`
|
||||
unit="MB/s"
|
||||
else
|
||||
unit="kB/s"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
unit="kB/s"
|
||||
if [ "$rate" -gt 1024 ]; then
|
||||
# Default to bps
|
||||
rate=`echo "$rate" | awk '{printf "%.0f", $1*8}'`
|
||||
# Why 1000 and not 1024? http://en.wikipedia.org/wiki/Data_rate_units
|
||||
if [ "$rate" -gt 1000000 ]; then
|
||||
rate=`echo "$rate" | awk '{printf "%.1f", $1/1000000}'`
|
||||
unit="Gbps"
|
||||
elif [ "$rate" -gt 1000 ]; then
|
||||
rate=`echo "$rate" | awk '{printf "%.1f", $1/1000}'`
|
||||
unit="MB/s"
|
||||
unit="Mbps"
|
||||
else
|
||||
unit="kbps"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -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
|
||||
|
||||
\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
|
||||
\fBnetwork\fP \- instantaneous upload/download bandwidth in [GMk]bps 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 (bits) with NETWORK_UNITS=bytes 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'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue