maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce][Fremantle] FlopSwap - Swap GUI Management (https://talk.maemo.org/showthread.php?t=87985)

peterleinchen 2012-12-01 21:01

Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
 
Yeah, do so please. :) As this script does not depend on anything.
And name the output something like "swap amount written". Or make it a percentage value (even bettter :)).

sixwheeledbeast 2012-12-01 21:14

Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
 
Quote:

Originally Posted by peterleinchen (Post 1300443)
Yeah, do so please. :) As this script does not depend on anything.
And name the output something like "swap amount written". Or make it a percentage value (even bettter :)).

I have changed the disk part to get the current swap partition.
Code:

disk=$(cat /proc/swaps | awk '/dev/ {print $1}' | cut -d "/" -f 3)
This outputs the current partition without the "/dev/" part "mmcblk1p2" and fits it perfect.

But where do I get the total number of bytes to get a percentage?
A percentage will be easier to work off as this doesn't limit you to a particular swap size.

peterleinchen 2012-12-01 21:37

Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
 
Quote:

Originally Posted by sixwheeledbeast (Post 1300448)
Code:

disk=$(cat /proc/swaps | awk '/dev/ {print $1}' | cut -d "/" -f 3)
This outputs the current partition without the "/dev/" part "mmcblk1p2" and fits it perfect.

OK.


Quote:

Originally Posted by sixwheeledbeast (Post 1300448)
But where do I get the total number of bytes to get a percentage?

What about:
Code:

awk '{if ($1=="'"/dev/$disk"'") print $3}' /proc/swaps
in your notation.

P.S.: as I have more than one swap online (I know I know), I needed to get the one out of them, You seem to have only one online at a time.
Sorry for delay, had a batt shutdown.

sixwheeledbeast 2012-12-01 22:22

Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
 
OK. Sorry I got you now. D'oh

cat /proc/swaps get the bytes from there.

sixwheeledbeast 2012-12-11 19:34

Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
 
Updated to Version 0.0.4

Changes / QR code / Download in OP

This update now makes Flopswap do what I intended.
After some fun with ash and some help from others here, I have now made Flopswap able to monitor Swap defragmentation.

This update now makes Flopswap have all the functionally of Ereswap with the added benifits of:-

*Being optified and not installing files in /sbin and /root that don't get removed on uninstallation.

*Not modifing rcs-late at all (you may wish to return your rcs-late to it's pre-ereswap form).

*Not depending on anything, like busybox-power or iostat for example.

*GUI

While not looking like much of an update there have been a fair few changes in the code and scripts.
I have been testing it on two devices for the last week to make sure it stable and functional.

Happy Swapping.

pierrem 2012-12-11 21:19

Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
 
Thanks for this useful tool
What about integrating compcache ?

sixwheeledbeast 2012-12-12 00:39

Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
 
Quote:

Originally Posted by pierrem (Post 1303602)
What about integrating compcache ?

I don't use it myself.
To benefit from compcache you need to modify VM settings to swap more. Also using ramz will reduce battery life, due to compressing and uncompressing.

I personally don't see much benefit, compared with thumb for example, so will leave compcache to the "swapset"application.

ivgalvez 2012-12-12 08:16

Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
 
Would you try to upload it to the repos? At least the dput method is still working.

sixwheeledbeast 2012-12-12 13:48

Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
 
Quote:

Originally Posted by ivgalvez (Post 1303700)
Would you try to upload it to the repos? At least the dput method is still working.

I would love to put it in the repos.
I have been trying scp everyday for the last couple of weeks.

mr_jrt 2012-12-12 14:51

Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
 
Intriguing...have to check this out later. Been away from my Maemo hacking for far too long...hence the lack of updates to swapset ;)

...incidentally, has any effort been made by those versed in kernel-power to fix the fragmentation problem at source i.e. in the kernel?


All times are GMT. The time now is 09:50.

vBulletin® Version 3.8.8