From 752ade87a9aa12e0b68f4ea1afd0075d13cd301e Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Mon, 23 May 2011 06:51:39 -0500 Subject: [PATCH] * usr/lib/byobu/disk_io: - support super fast next generation SSD hard drives --- debian/changelog | 2 ++ usr/lib/byobu/disk_io | 3 +++ 2 files changed, 5 insertions(+) diff --git a/debian/changelog b/debian/changelog index 27517965..78b1ebe0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,8 @@ byobu (4.2) unreleased; urgency=low mode for Byobu * usr/share/man/man1/byobu-quiet.1, usr/share/man/man1/byobu-silent.1: - add a manpage for byobu-silent.1, and update byobu-silent.1 + * usr/lib/byobu/disk_io: + - support super fast next generation SSD hard drives [ Scott Moser ] * usr/bin/byobu, usr/bin/byobu-reconnect-sockets, diff --git a/usr/lib/byobu/disk_io b/usr/lib/byobu/disk_io index 4ab19fdc..7b368423 100755 --- a/usr/lib/byobu/disk_io +++ b/usr/lib/byobu/disk_io @@ -76,6 +76,9 @@ for i in "read" "write"; do rate=$((($x2-$x1) / ($t2 - $t1) * 512 / 1024)) if [ "$rate" -lt 0 ]; then rate=0 + elif [ "$rate" -gt 1048576 ]; then + fpdiv "$rate" 1048576 1 + unit="GB/s" elif [ "$rate" -gt 1024 ]; then fpdiv "$rate" 1024 1 unit="MB/s"