[Announce][Fremantle] FlopSwap - Swap GUI Management
4 Attachment(s)
FlopSwap is a concept taken from a few scripts built in the community to aid in manually controlling swaps.
For full information see wiki page. http://wiki.maemo.org/Flopswap |
Re: [Pre-Announce][Fremantle] FlopSwap - Swap GUI Management
Can you elaborate a bit more?
For us noobs. |
Re: [Pre-Announce][Fremantle] FlopSwap - Swap GUI Management
sixwheeledbeast@ FlopSwap it is the new program??? Write here more in detail!
|
Re: [Pre-Announce][Fremantle] FlopSwap - Swap GUI Management
Just setup a Nokia project page? It worked for me :P
|
Re: [Pre-Announce][Fremantle] FlopSwap - Swap GUI Management
Got teaser video to share?
|
Re: [Pre-Announce][Fremantle] FlopSwap - Swap GUI Management
So you created the thread before anybody else announce your new app :p
hopefully waiting for it :) |
Re: [Pre-Announce][Fremantle] FlopSwap - Swap GUI Management
Continuous intrigue! :) :) :)
|
Re: [Pre-Announce][Fremantle] FlopSwap - Swap GUI Management
Teaser screenshot added.
Anybody would think you haven't seen an [Announce] thread in two weeks. Thanks for the intrigue. |
Re: [Pre-Announce][Fremantle] FlopSwap - Swap GUI Management
@six
What is your basis? swapset? ereswap? self-made script? Or will you combine all the goodies? |
Re: [Pre-Announce][Fremantle] FlopSwap - Swap GUI Management
Quote:
This is not a GUI for a old program it's a separate application. |
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
Do I need to have 3 swaps? That part isn't clear to me
I only have them on /dev/mmcblk0p3 and /dev/mmcblk1p2 Is a third really needed or would this suffice? |
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
Cannot (yet ;)) answer for his app, but I assume after all the discussions that he is swappingthe swap space from one SD swap to the other SD swap, so that there is only one (exactly one: SD1 -> SD2) swap movement; hereby avoiding one full writing of swap memory, as it was done before (SD->eMMC->SD).
The third (internal) eMMC swap is just left untouched, as long as you have your SD card in. If there is the need for removing it, you may enable that internal swap again, so you have the chance to do this with a running system. @sixwheelebeast Please correct me, if I am wrong. Did not yet look into your sources. But this is how I do it. One question: do you also check swap usage and allow a automated swap refreshing (e.g. after 90% fill level)? |
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
Quote:
Yes, exactly as per peterleinchen. A swap space is required at all three locations in the OP. This is important as currently there is no way "GUI friendly way" to edit swaps and if you try to swapon to a FAT partition the system will reboot. I wanted to move away from device swap completely to remove flash wear. 0p3 is only used as a backup (this is used when pressing Unmount). 1p2 and 1p3 flip over (only one swapon/swapoff) everytime you press Fresh Swap. Also if swap is on 0p3 and you press fresh swap it will automatically swap you to 1p2, but never go back to 0p3 unless you press the Unmount button. @peterleinchen Currently no this is only a quicker manual way of editing swaps to save me open terminal all the time. However I do plan to turn it into a more complete swap manager. Plans *Put a new upstart file in event.d, this is to push swap to 1p2 or fallback to 0p3. *Adding an alarm_queue event with selectable time. If you want to read or edit the back end have a dig in /opt/flopswap |
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
Bump new version 0.0.2 with very useful "Swap on SD at Boot"
This adds/removes a file called relocateswap to /etc/event.d If checked this will automatically put swapon /dev/mmcblk1p2 after rcs-late. Very pleased as this is my first checkBox with code I have done. :) All information in OP new QRCode too! Any devs got any ideas how to add an event to the alarm_queue or some way of automatically reswapping? |
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
What the swap? No more manual swap defragging as I used to do. :) Excellent! This works like a charm when setup as described in OP.
|
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
Quote:
I have a tiny update that I am working on, I have mapped the "QWAS" keys to the buttons in the application. This works well, however I still want to test it and work on finding a solution for swapping on a timer; before a new release. |
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
Quote:
just saw your beg. If it helps you I may send you my script, which checks swap usage cyclically and at a certain border calls a defrag script. I have rewritten it a bit a few months ago, so it may match your needs (you will need some conf files in /tmp/ swapdev, swapsize, swapinuse, which deine the current swap configuration. Done it that way as I have another script checking which swaps to activate according to SD in/out/...). |
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
New version released (0.0.3).
Tried the autobuilder to no avail, so get scanning that QRCode. :) New goodies are:- *A new button to check swap usage (free | grep Swap) *Key mappings for the four main buttons on "QWAS" keys. See OP for full details, happy flopswapping! |
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
Quote:
Quote:
It just shows the amount of used swap. This will be something from a few MB up to a few 100MB. But it will not show the already written amount on that swap space. This info can be fetched via iostat (withh bb-power) or more sophisticated with following script (rely on the number of bytes, please): Code:
#!/bin/sh |
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
Quote:
I didn't want to force people to have install dependenices for this to work. However I like the look of your script (I didn't think of using diskatats) maybe I can re-jig it about to me more useful. |
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 :)). |
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
Quote:
Code:
disk=$(cat /proc/swaps | awk '/dev/ {print $1}' | cut -d "/" -f 3) 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. |
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
Quote:
Quote:
Code:
awk '{if ($1=="'"/dev/$disk"'") print $3}' /proc/swaps 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. |
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
OK. Sorry I got you now. D'oh
cat /proc/swaps get the bytes from there. |
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. |
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
Thanks for this useful tool
What about integrating compcache ? |
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
Quote:
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. |
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
Would you try to upload it to the repos? At least the dput method is still working.
|
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
Quote:
I have been trying scp everyday for the last couple of weeks. |
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? |
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
Quote:
Code:
crunch@crunch:/opt/QtSDK/builds/flopswap_build_0.0.4$ scp flopswap_0.0.4.tar.gz flopswap_0.0.4_source.changes flopswap_0.0.4.dsc sixwheeledbeast@drop.maemo.org:/var/www/extras-devel/incoming-builder/fremantle/ A TMO member has kindly offered to put applications in the repos for me. The issue is I can't easily maintain anything myself if there is a issue found in FlopSwap. While I know how much of a pain it is, I would prefer to be able to provide updates myself from here for the short term. As soon as I can upload to the repos effectively it will be there. |
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
I was messaging with ade, he also had some issues with uploading to the repos via scp, he pointed out that you can't use uppercase or underscores in the package name (could this be the issue in here, too?)
|
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
Quote:
Was worth a go, I am confident it's setup in garage correct. Thanks anyway. |
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
Nah, sixwheeledbeast's issue is the permission to upload itself, as the key is not accepted.
|
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
@sixwheeledbeast, how about making your app able to accept a command on the command line. Then we can all automate switching swap partitions using cron or alarmed or any other way we choose.
i.e. just add an optional one word argument to flopswap for the actions the main buttons do. If the app receives one of these arguments, it might do a quick sanity check and then action and exit, without displaying the GUI. Later you can still add your own means of setting up automated switching from inside flopswap. What do you think? |
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
Quote:
Remember at the moment this is a GUI to run scripts, all the scripts in this file should run from CLI, with application open or not. However I wouldn't press a button and fire a CLI command at the same time. The application is written in a way that QProcess shouldn't allow two buttons to run at the same time. To Switch Swaps Code:
sh /opt/flopswap/script/swapswitch.sh |
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
Wiki page created, most of OP moved there.
Still waiting for garage to be stable, so still use the QRc in OP. Thanks. |
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
Flopswap doesn't show me the "swap status" anymore. It used to works fine until last week. I don't know what i did but im getting this:
Code:
$ sh /opt/flopswap/script/swapused.sh Code:
ubytes=$(($ublocks*512)) Thanks. |
Re: [Announce][Fremantle] FlopSwap - Swap GUI Management
Quote:
Out interest what's your uptime? Two things to try if you can please. Install bash and edit the script to run with "bash" instead of sh, this should make it work again. Turn the script back to "sh" and reboot, this should also make the script work again. |
Thanks man... I'll do that as soon as i could get a PC.
About the uptime: $ uptime 21:01:50 up 1 day, 1:22, 0 users, load average: 0.08, 0.43, 0.47 i'll report back. Thanks again. |
All times are GMT. The time now is 15:06. |
vBulletin® Version 3.8.8