mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 08:57:57 +00:00
tweaked swap data collector a bit
This commit is contained in:
parent
43ffbaa535
commit
e3d719f74a
5
inxi
5
inxi
|
@ -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"
|
||||||
}' ) )
|
}' ) )
|
||||||
|
|
Loading…
Reference in a new issue