mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-20 13:33:23 -07:00
* usr/lib/byobu/disk_io: LP: #934893
- initialize the x1 value correctly
This commit is contained in:
parent
463b75a6ac
commit
233fb2ce3c
2 changed files with 6 additions and 4 deletions
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -4,6 +4,8 @@ byobu (5.13) unreleased; urgency=low
|
||||||
- simply speed up using perl
|
- simply speed up using perl
|
||||||
* usr/bin/byobu: LP: #937175
|
* usr/bin/byobu: LP: #937175
|
||||||
- check tput for 256 color support before defaulting to that in tmux mode
|
- check tput for 256 color support before defaulting to that in tmux mode
|
||||||
|
* usr/lib/byobu/disk_io: LP: #934893
|
||||||
|
- initialize the x1 value correctly
|
||||||
|
|
||||||
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 16 Feb 2012 23:58:36 -0600
|
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 16 Feb 2012 23:58:36 -0600
|
||||||
|
|
||||||
|
|
|
@ -52,16 +52,16 @@ __disk_io() {
|
||||||
esac
|
esac
|
||||||
getdisk "$part"
|
getdisk "$part"
|
||||||
local disk=${_RET}
|
local disk=${_RET}
|
||||||
local t2=`date +%s` t1=
|
local t2=$(date +%s) t1=
|
||||||
for i in "read" "write"; do
|
for i in "read" "write"; do
|
||||||
local cache="$BYOBU_RUN_DIR/cache.$BYOBU_BACKEND/disk.$i"
|
local cache="$BYOBU_RUN_DIR/cache.$BYOBU_BACKEND/disk.$i"
|
||||||
t1=`stat -c %Y "$cache"` 2>/dev/null || t1=0
|
t1=$(stat -c %Y "$cache") 2>/dev/null || t1=0
|
||||||
local unit="kB/s"
|
local unit="kB/s"
|
||||||
local rate= x1= x2= symbol= unit=
|
local rate=0 x1=0 x2=0 symbol= unit=
|
||||||
if [ $t2 -le $t1 ]; then
|
if [ $t2 -le $t1 ]; then
|
||||||
rate=0
|
rate=0
|
||||||
else
|
else
|
||||||
[ -r "$cache" ] && read x1 < "$cache" || x1=0
|
[ -r "$cache" ] && read x1 < "$cache"
|
||||||
local a1= a2= a3= a4= a5= a6= a7= a8= a9= a10=
|
local a1= a2= a3= a4= a5= a6= a7= a8= a9= a10=
|
||||||
read a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 other < "/sys/block/$disk/stat"
|
read a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 other < "/sys/block/$disk/stat"
|
||||||
if [ "$i" = "read" ]; then
|
if [ "$i" = "read" ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue