From e3d719f74aea6e8af721e3f04bd7c9fe3c51353a Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Mon, 10 Nov 2008 01:49:56 +0000 Subject: [PATCH] tweaked swap data collector a bit --- inxi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/inxi b/inxi index 5f9885d..60743ab 100755 --- a/inxi +++ b/inxi @@ -1414,9 +1414,10 @@ get_partition_data() /\/$|\/boot$|\/var$|\/home$/ { print $NF "," $(NF - 4) "," $(NF - 3) "," $(NF - 1) }' ) - # now add the swap partition, this doesn't show percent used, someone can figure that in the future + # now add the swap partition data, doesn't show percent used, someone can figure that in the future + # don't want to show swap files, just partitions $( swapon -s | gawk ' - /\dev\/[hs]d[a-z]/ { + /^\/dev\/[hs]d[a-z]/ { size = sprintf( "%.2f", $3*1024/1000**3 ) print $1 "," size "GB,,,swap" }' ) )