![]() |
2014-04-28
, 01:56
|
Posts: 262 |
Thanked: 315 times |
Joined on Jun 2010
|
#232
|
![]() |
2014-04-28
, 07:10
|
Posts: 2,292 |
Thanked: 4,135 times |
Joined on Apr 2010
@ UK
|
#233
|
Is it possible to use 'expr' or 'bc' for calculations given busybox's limitations?
The Following User Says Thank You to sixwheeledbeast For This Useful Post: | ||
![]() |
2014-05-07
, 23:19
|
Posts: 252 |
Thanked: 221 times |
Joined on Jul 2010
|
#234
|
![]() |
2014-05-08
, 06:06
|
|
Posts: 4,118 |
Thanked: 8,901 times |
Joined on Aug 2010
@ Ruhrgebiet, Germany
|
#235
|
![]() |
2014-05-08
, 08:32
|
Posts: 252 |
Thanked: 221 times |
Joined on Jul 2010
|
#236
|
#Get blocks used since boot from /proc/diskstats ublocks=$(awk '{if ($3=="'"$disk"'") print $10}' /proc/diskstats) echo $ublocks ublocks #Multiply blocks by 512 to get used bytes ubytes=$(($ublocks*512))
The Following 2 Users Say Thank You to chill For This Useful Post: | ||
![]() |
2014-05-10
, 20:32
|
Posts: 638 |
Thanked: 1,692 times |
Joined on Aug 2009
|
#237
|
The Following 3 Users Say Thank You to xes For This Useful Post: | ||
![]() |
2014-05-11
, 21:43
|
Posts: 2,292 |
Thanked: 4,135 times |
Joined on Apr 2010
@ UK
|
#238
|
I see /tmp/flopswapint (it's existence, not content) is used as a flag to indicate Flopswap can no longer calculate the percentage used, and once set it stays up (until reboot). To set the flag you create the file.
Ok here's my 2 cents, and please correct me where I'm wrong.
Now, in swapswitch.sh:
Why not get umbytes (and ugbytes if needed anywhere) directly by dividing by 2048, as in swapused.sh?
This is a reasonably achievable amount of written swap, and may explain why I encountered int32 overrun after about 17 days of runtime.
Since i have installed flopswap to use a fast Samsung 64GB sdxc card with swap partitions, i'm experiencing issues with hildon-status-menu starting before the optified mount point become available.
This happens because the N900 seems to start and run so fast that the boot order seems a little different!
If someone else is experiencing problems with python plugins of hildon-status-menu, here the trick
Modify: /etc/X11/Xsession.post/15hildon-status-menu
To:
#!/bin/sh
sleep 5 && /usr/sbin/dsmetool -t /usr/bin/hildon-status-menu
The Following 4 Users Say Thank You to sixwheeledbeast For This Useful Post: | ||
![]() |
2014-05-13
, 08:12
|
Posts: 252 |
Thanked: 221 times |
Joined on Jul 2010
|
#239
|
TBH I saw the whole int32 and only 17 days of runtime a non-issue anyway.
At the end of the day you will hit int32 at some point.
This is why I have recommended that you use the check swap to calculate your swap usage. Then setup something to automatically run swapswitch.sh at night.
The Following 2 Users Say Thank You to chill For This Useful Post: | ||
![]() |
2014-05-13
, 11:25
|
Posts: 2,292 |
Thanked: 4,135 times |
Joined on Apr 2010
@ UK
|
#240
|
Of course, but for practical purposes it matters when IMO. This is still 2TB/512 * 512 ~ 17 days * 512 = 23 years. Assume instead I write 4 GB of swap every day instead of every 17 days, and I still get a year and a half of swap-worry-free uptime.
Hmm, I'm not sure how running swapswitch.sh mitigates the problem. The amount of swap written since boot (/proc/diskstats) can only increase, and swapswitch.sh does not decrease it. Can you clarify?
Thanks again for your effort.
The Following 3 Users Say Thank You to sixwheeledbeast For This Useful Post: | ||
Flopswap 0.1.8 update fixes this.
Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -
Before posting or starting a thread please try this.