mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 22:34:23 -07:00
usr/lib/byobu/disk_io: fix scaling, LP: #787773
This commit is contained in:
parent
b2e6ca37d4
commit
18d24bbb76
2 changed files with 8 additions and 3 deletions
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -2,6 +2,7 @@ byobu (4.3) unreleased; urgency=low
|
|||
|
||||
* usr/lib/byobu/uptime: fix string bug in uptime introduced by smoser's
|
||||
changes
|
||||
* usr/lib/byobu/disk_io: fix scaling, LP: #787773
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Mon, 23 May 2011 19:21:36 -0500
|
||||
|
||||
|
|
|
@ -77,11 +77,15 @@ for i in "read" "write"; do
|
|||
if [ "$rate" -lt 0 ]; then
|
||||
rate=0
|
||||
elif [ "$rate" -gt 1048576 ]; then
|
||||
fpdiv "$rate" 1048576 1
|
||||
unit="GB/s"
|
||||
fpdiv "$rate" 1048576 0
|
||||
rate=${_RET}
|
||||
elif [ "$rate" -gt 1024 ]; then
|
||||
fpdiv "$rate" 1024 1
|
||||
unit="MB/s"
|
||||
fpdiv "$rate" 1024 0
|
||||
rate=${_RET}
|
||||
else
|
||||
unit="kB/s"
|
||||
fi
|
||||
fi
|
||||
[ "$rate" != "0" ] || continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue