mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 05:53:22 -07:00
* etc/byobu/statusrc, usr/lib/byobu/network:
- add support for a network threshold setting; set to 20kbps by default, ignore network traffic less than 20kbps; less busy status
This commit is contained in:
parent
593747729a
commit
b88a75b410
3 changed files with 9 additions and 1 deletions
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -10,6 +10,9 @@ byobu (4.3) unreleased; urgency=low
|
|||
- fix the motd display at auto launch, which was broken recently
|
||||
* usr/lib/byobu/mem_available:
|
||||
- fix MB display bug
|
||||
* etc/byobu/statusrc, usr/lib/byobu/network:
|
||||
- add support for a network threshold setting; set to 20kbps by default,
|
||||
ignore network traffic less than 20kbps; less busy status
|
||||
|
||||
[ Scott Moser ]
|
||||
* usr/lib/byobu/.shutil: fix rounding across a decimal point in fpdiv()
|
||||
|
|
|
@ -63,6 +63,7 @@ wifi_quality=1
|
|||
#LOGO="\o/"
|
||||
#MONITORED_DISK=/
|
||||
#MONITORED_INTERFACE=eth0
|
||||
#NETWORK_THRESHOLD=20
|
||||
#MONITORED_TEMP=/proc/acpi/thermal_zone/THM0/temperature
|
||||
#TEMP=F
|
||||
#DISTRO=Ubuntu
|
||||
|
|
|
@ -31,6 +31,10 @@ else
|
|||
while read cn other; do interface=$cn; done < /proc/net/route
|
||||
fi
|
||||
|
||||
# By default, we won't bug the user with the display of network traffic
|
||||
# below NETWORK_THRESHOLD in kbps; override in $DATA/status
|
||||
[ -n "$NETWORK_THRESHOLD" ] || NETWORK_THRESHOLD=20
|
||||
|
||||
if [ "$1" = "--detail" ]; then
|
||||
LC_ALL=C /sbin/ifconfig "$interface" | sed 's/\s*$//'
|
||||
exit 0
|
||||
|
@ -91,7 +95,7 @@ for i in up down; do
|
|||
;;
|
||||
esac
|
||||
fi
|
||||
if [ "$rate" != "0" ]; then
|
||||
if [ "$rate" -gt $NETWORK_THRESHOLD ]; then
|
||||
color b m w; printf "%s%s" "$symbol" "$rate"; color -; color m w; printf "%s" "$unit"; color --
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue