diff --git a/inxi b/inxi index 3508b58..399ad90 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 1.0.4-b1-t2 +#### version: 1.0.4-b1-t3 #### Date: 1 March 2009 ######################################################################## #### SPECIAL THANKS @@ -2404,16 +2404,10 @@ get_partition_data() } } ' ) - # 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]/ { -# size = sprintf( "%.2f", $3*1024/1000**3 ) -# devBase = gensub( /^(\/dev\/)(.+)$/, "\\2", 1, $1 ) -# print $1 "," size "GB,,,swap," devBase -# }' ) ) - - $( cat /proc/swaps | grep /dev | gawk ' + # now add the swap partition data, don't want to show swap files, just partitions, + # though this can include /dev/ramzswap0. Note: you can also use /proc/swaps for this + # data, it's the same exact output as swapon -s + $( swapon -s | gawk ' /^\/dev/ { size = sprintf( "%.2f", $3*1024/1000**3 ) devBase = gensub( /^(\/dev\/)(.+)$/, "\\2", 1, $1 )