View Single Post
Posts: 2,292 | Thanked: 4,135 times | Joined on Apr 2010 @ UK
#50
Originally Posted by peterleinchen View Post
I hope we did not just talk but understood each other
What value are you dividing by 1024?
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...
Also the full source is there for anybody interested.

Originally Posted by peterleinchen View Post
Not so unusual. I get my swap space (now 2x 1,5GB filled up in one day with heavy browsing, mailing and a few more phone calls). So reaching 2GB after 1 day is possible.
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.

Originally Posted by peterleinchen View Post
Above will work. There will be no need for another solution.
TB=TeraByte, i.e. 1000GB
I do not think we will reach that amount of used swap. Even after a year uptime
When/If someone gets to xyz uptime and it fails then this is a bug. No? I hate bugs however slight
Attached Files
File Type: gz script_FAO_peter.tar.gz (10.0 KB, 69 views)
File Type: gz full_source_flopswap.tar.gz (40.0 KB, 73 views)
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.