The easiest way is to post the code. Can't get lost in translation then. BTW thanks. Code: ...snip... #Get Swap size from /proc/swaps swapsize=$(awk '{if ($1=="'"/dev/$disk"'") print $3}' /proc/swaps) #Divide by 1024 to get swap size in megabytes swapsizembytes=$(($swapsize/1024)) ...snip...
...snip... #Get Swap size from /proc/swaps swapsize=$(awk '{if ($1=="'"/dev/$disk"'") print $3}' /proc/swaps) #Divide by 1024 to get swap size in megabytes swapsizembytes=$(($swapsize/1024)) ...snip...
[B]umbytes=$(($ublocks/2048))
echo $ublocks ublocks #Multiply blocks by 512 to get used bytes #ubytes=$(($ublocks*512)) #Calculate used bytes into Kb, Mb and Gb echo $ubytes ubytes #ukbytes=$(($ubytes/1024)) ##ukbytes=$(($ublocks/2)) ##umbytes=$(($ukbytes/1024)) umbytes=$(($ublocks/2048)) #ugbytes=$(($ubytes/1024/1024/1024)) ugbytes=$(($umbytes/1024))
I use my device heavily during work and only use my 800MB swap space in 4 days. It's possible due to "Swappolube" VM settings too.
When/If someone gets to xyz uptime and it fails then this is a bug. No? I hate bugs however slight