mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 22:34:23 -07:00
* profiles/common: drop mem-used to run every 10 seconds, and disk-used to
run every 30 seconds, and wifi_quality to run every 10 seconds * bin/wifi_quality: significant performance improvements, remove unneeded route call, cache iwconfig output so that it's only called once Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
parent
7a52dff182
commit
fc0d2e130f
3 changed files with 12 additions and 8 deletions
|
@ -17,14 +17,13 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
interface=`/sbin/route -n | tail -n 1 | sed "s/^.* //"`
|
|
||||||
|
|
||||||
if [ "$1" = "--detail" ]; then
|
if [ "$1" = "--detail" ]; then
|
||||||
/sbin/iwconfig 2>/dev/null
|
/sbin/iwconfig 2>/dev/null
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bitrate=`/sbin/iwconfig "$interface" 2>/dev/null | grep "Bit Rate." | sed "s/^.*Bit Rate.//" | sed "s/ .*$//g"`
|
iwconfig=`/sbin/iwconfig 2>/dev/null`
|
||||||
|
bitrate=`echo "$iwconfig" | grep "Bit Rate." | sed "s/^.*Bit Rate.//" | sed "s/ .*$//g"`
|
||||||
[ -z "$bitrate" ] && bitrate="0"
|
[ -z "$bitrate" ] && bitrate="0"
|
||||||
quality=`/sbin/iwconfig "$interface" 2>/dev/null | grep "Link Quality=" | sed "s/^.*Link Quality=//" | sed "s/ .*$//g"`
|
quality=`echo "$iwconfig" | grep "Link Quality=" | sed "s/^.*Link Quality=//" | sed "s/ .*$//g"`
|
||||||
echo "$bitrate" "$quality" | awk '{printf "\005{=b Ck}%s\005{-}\005{= Ck}Mb/s,\005{-}\005{=b Ck}%.0f\005{-}\005{= Ck}%%\005{-} ", $1, $2}'
|
echo "$bitrate" "$quality" | awk '{printf "\005{=b Ck}%s\005{-}\005{= Ck}Mb/s,\005{-}\005{=b Ck}%.0f\005{-}\005{= Ck}%%\005{-} ", $1, $2}'
|
||||||
|
|
7
debian/changelog
vendored
7
debian/changelog
vendored
|
@ -9,8 +9,13 @@ byobu (2.12) unreleased; urgency=low
|
||||||
all status scripts from *-* to *_*; this allows us to source the
|
all status scripts from *-* to *_*; this allows us to source the
|
||||||
~/.byobu/status file, rather than grepping through it for configuration
|
~/.byobu/status file, rather than grepping through it for configuration
|
||||||
information, yielding significant performance improvements, LP: #386546
|
information, yielding significant performance improvements, LP: #386546
|
||||||
|
* profiles/common: drop mem-used to run every 10 seconds, and disk-used to
|
||||||
|
run every 30 seconds, and wifi_quality to run every 10 seconds
|
||||||
|
* bin/wifi_quality: significant performance improvements, remove unneeded
|
||||||
|
route call, cache iwconfig output so that it's only called once
|
||||||
|
|
||||||
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 16 Jun 2009 14:44:43 -0500
|
|
||||||
|
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 16 Jun 2009 15:35:30 -0500
|
||||||
|
|
||||||
byobu (2.11-0ubuntu1) karmic; urgency=low
|
byobu (2.11-0ubuntu1) karmic; urgency=low
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ backtick 103 2 2 byobu-status cpu_freq
|
||||||
backtick 104 86400 86400 byobu-status cpu_count
|
backtick 104 86400 86400 byobu-status cpu_count
|
||||||
backtick 105 86400 86400 byobu-status mem_available
|
backtick 105 86400 86400 byobu-status mem_available
|
||||||
backtick 106 2 2 byobu-status load_average
|
backtick 106 2 2 byobu-status load_average
|
||||||
backtick 107 2 2 byobu-status mem_used
|
backtick 107 10 10 byobu-status mem_used
|
||||||
backtick 108 600 600 byobu-status ec2_cost
|
backtick 108 600 600 byobu-status ec2_cost
|
||||||
backtick 109 3600 3600 byobu-status hostname
|
backtick 109 3600 3600 byobu-status hostname
|
||||||
backtick 110 86400 86400 byobu-status whoami
|
backtick 110 86400 86400 byobu-status whoami
|
||||||
|
@ -46,12 +46,12 @@ backtick 115 60 60 byobu-status uptime
|
||||||
backtick 116 2 2 byobu-status processes
|
backtick 116 2 2 byobu-status processes
|
||||||
backtick 117 2 2 byobu-status network_up
|
backtick 117 2 2 byobu-status network_up
|
||||||
backtick 118 2 2 byobu-status network_down
|
backtick 118 2 2 byobu-status network_down
|
||||||
backtick 119 2 2 byobu-status wifi_quality
|
backtick 119 10 10 byobu-status wifi_quality
|
||||||
backtick 120 86400 86400 byobu-status date
|
backtick 120 86400 86400 byobu-status date
|
||||||
backtick 121 86400 86400 byobu-status time
|
backtick 121 86400 86400 byobu-status time
|
||||||
backtick 122 3600 3600 byobu-status ip_address
|
backtick 122 3600 3600 byobu-status ip_address
|
||||||
backtick 123 86400 86400 byobu-status disk_available
|
backtick 123 86400 86400 byobu-status disk_available
|
||||||
backtick 124 2 2 byobu-status disk_used
|
backtick 124 30 30 byobu-status disk_used
|
||||||
backtick 125 30 30 byobu-status temp_c
|
backtick 125 30 30 byobu-status temp_c
|
||||||
backtick 126 30 30 byobu-status temp_f
|
backtick 126 30 30 byobu-status temp_f
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue