* bin/mem_available: read mem_available from /proc, should be more

efficient


Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
Dustin Kirkland 2009-06-24 13:32:47 -05:00
commit 2425255656
2 changed files with 4 additions and 3 deletions

View file

@ -28,7 +28,7 @@ fi
. "$HOME/.$PKG/status" . "$HOME/.$PKG/status"
[ "$mem_used" = "1" ] && comma="," || whitespace=" " [ "$mem_used" = "1" ] && comma="," || whitespace=" "
mem=`free | grep -m 1 "^Mem:" | awk '{print $2}'` mem=`head -n1 /proc/meminfo | awk '{print $2}'`
if [ $mem -ge 1048576 ]; then if [ $mem -ge 1048576 ]; then
mem=$(echo "$mem" | awk '{ printf "%.1f", $1 / 1048576 }') mem=$(echo "$mem" | awk '{ printf "%.1f", $1 / 1048576 }')
unit="GB" unit="GB"

5
debian/changelog vendored
View file

@ -1,9 +1,10 @@
byobu (2.17) unreleased; urgency=low byobu (2.17) unreleased; urgency=low
* UNRELEASED
* debian/postinst: can't assume a group named for the user, LP: #391722 * debian/postinst: can't assume a group named for the user, LP: #391722
* bin/mem_available: read mem_available from /proc, should be more
efficient
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 24 Jun 2009 12:44:29 -0500 -- Dustin Kirkland <kirkland@ubuntu.com> Wed, 24 Jun 2009 13:32:18 -0500
byobu (2.16-0ubuntu1) karmic; urgency=low byobu (2.16-0ubuntu1) karmic; urgency=low