tweaked swap data collector a bit

This commit is contained in:
inxi-svn 2008-11-10 01:49:56 +00:00
parent 43ffbaa535
commit e3d719f74a

5
inxi
View file

@ -1414,9 +1414,10 @@ get_partition_data()
/\/$|\/boot$|\/var$|\/home$/ { /\/$|\/boot$|\/var$|\/home$/ {
print $NF "," $(NF - 4) "," $(NF - 3) "," $(NF - 1) 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 ' $( swapon -s | gawk '
/\dev\/[hs]d[a-z]/ { /^\/dev\/[hs]d[a-z]/ {
size = sprintf( "%.2f", $3*1024/1000**3 ) size = sprintf( "%.2f", $3*1024/1000**3 )
print $1 "," size "GB,,,swap" print $1 "," size "GB,,,swap"
}' ) ) }' ) )