swapfile manager
swapfile manager
Wizard for creating swap files, with user entry for size and name/location. Default is 100M. Management includes swap on/off, and info button which displays free memory. Main window displays status and size of file.
Notes:
Version 1.2.1. Input KB; default set at 100M; edit path.
Version 2.0: Input Megs vs KB, set default at 512M, /mnt/home/swapfile. Make sure you have sufficient space, or change path/size.
Version3.0: Added Swappiness selection (decrease swappiness for computers with lots of ram)
Version 3.5 Added option to save settings; refresh labels to settings; friendlier window management, etc.
Version 4.0 Uses gtimer process widget (if installed)
Version 4.1 Better integration of gtimer
Version 4.2 Defaults to gtkdialog4, but reverts to gtkdialog3 if not present.
Added version name to work with pet uninstaller.
Version 4.5 Save settings to /etc/rc.d/init.d/swapmanager vs /etc/profile.local
Version 4.6 Remove annoyance test bug
Notes:
Version 1.2.1. Input KB; default set at 100M; edit path.
Version 2.0: Input Megs vs KB, set default at 512M, /mnt/home/swapfile. Make sure you have sufficient space, or change path/size.
Version3.0: Added Swappiness selection (decrease swappiness for computers with lots of ram)
Version 3.5 Added option to save settings; refresh labels to settings; friendlier window management, etc.
Version 4.0 Uses gtimer process widget (if installed)
Version 4.1 Better integration of gtimer
Version 4.2 Defaults to gtkdialog4, but reverts to gtkdialog3 if not present.
Added version name to work with pet uninstaller.
Version 4.5 Save settings to /etc/rc.d/init.d/swapmanager vs /etc/profile.local
Version 4.6 Remove annoyance test bug
- Attachments
-
- gtimer-2.0.pet
- process widget-- requires gtkdialog =>0.7.21
- (1.19 KiB) Downloaded 2350 times
-
- swapfilemanager-4.6.pet
- Version 4.6 Input MB
- (4.11 KiB) Downloaded 4060 times
-
- swapfilemanager.pet
- Version 1.2.1 Input KB
- (2.76 KiB) Downloaded 2712 times
-
- swapfilemanager.png
- (22.85 KiB) Downloaded 8715 times
Last edited by jpeps on Wed 21 Aug 2013, 05:02, edited 19 times in total.
- RetroTechGuy
- Posts: 2947
- Joined: Tue 15 Dec 2009, 17:20
- Location: USA
Re: swapfile manager
Excellent jpeps! I'll give it a try (just the tool we need for newbies!).jpeps wrote:Wizard for creating swap files, with user entry for size and name/location. Default is 100M. Management includes swap on/off, and info button which displays free memory. Main window displays status and size of file.
- abushcrafter
- Posts: 1418
- Joined: Fri 30 Oct 2009, 16:57
- Location: England
- Contact:
Some errors:
Can't switch swap off. Does not remember swap file path.
Good .desktop file:
Code: Select all
# swapfilemanager
swapoff: can't stat '/mnt/sda2/swapfile': No such file or directory
EXIT="OK"
# swapfilemanager
swapon: can't stat '/mnt/sda2/swapfile': No such file or directory
EXIT="OK"
# swapfilemanager
dd: opening `/mnt/sda1/swapfile': No such file or directory
/mnt/sda1/swapfile: No such file or directory
FILE="/mnt/sda1/swapfile"
KB="102400"
EXIT="OK"
#
Good .desktop file:
Code: Select all
[Desktop Entry]
Encoding=UTF-8
Name=Swapfile Manager
Icon=woodendrive.xpm
Comment=
Exec=swapfilemanager
Terminal=false
Type=Application
Categories=X-SystemMemory
Last edited by abushcrafter on Wed 11 Aug 2010, 15:34, edited 1 time in total.
[url=http://www.adobe.com/flashplatform/]adobe flash is rubbish![/url]
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/
- abushcrafter
- Posts: 1418
- Joined: Fri 30 Oct 2009, 16:57
- Location: England
- Contact:
Haven't found any new bugs. Seems that this is a new useful app
. Now for a feature request
. Can you please add the feature for switching on and off a swap partition. Thanks for you work so far.


[url=http://www.adobe.com/flashplatform/]adobe flash is rubbish![/url]
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/
swapon/swapoff -a ?? (I don't have one to test). My original idea was to just handle swap files.abushcrafter wrote:Haven't found any new bugs. Seems that this is a new useful app. Now for a feature request
. Can you please add the feature for switching on and off a swap partition. Thanks for you work so far.
- abushcrafter
- Posts: 1418
- Joined: Fri 30 Oct 2009, 16:57
- Location: England
- Contact:
Ok, never mined it's not a must have. It's your app and I will let that be. I also don't know how to swap on/off just a swap partition any way.jpeps wrote:swapon/swapoff -a ?? (I don't have one to test). My original idea was to just handle swap files.abushcrafter wrote:Haven't found any new bugs. Seems that this is a new useful app. Now for a feature request
. Can you please add the feature for switching on and off a swap partition. Thanks for you work so far.
Thanks for the swapon command. Been meaning to find out what command to use to switch swap on.
Now to add this to my puplet, A Powerful Puppy (appup or app).
[Edit] Here is a better menu category: "X-SystemMemory". You also haven't done the "pet.specs" part of the PET properly.
[url=http://www.adobe.com/flashplatform/]adobe flash is rubbish![/url]
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/
I don't have that category in stardust, and don't see it in petspec either.abushcrafter wrote: [Edit] Here is a better menu category: "X-SystemMemory". You also haven't done the "pet.specs" part of the PET properly.
For some reason, dir2pet bypassed the petspec gui and I got an empty pet.specs file (although package uninstalls OK). However, I see swapfilemanager appended to .user-installed-packages:
Code: Select all
swapfilemanager||||System|||swapfilemanager.pet|||
Code: Select all
swapfilemanager-1.2|swapfilemanager|1.2||System|4.0K|/usr/local/bin|swapfilemanger.pet||Swap File Manger||||
Code: Select all
** ERROR **: gtkdialog: Error in line 16, near token '</default>': syntax error
aborting...
NOTE: dir2pet issue moved to :
http://murga-linux.com/puppy/viewtopic.php?t=52033
- abushcrafter
- Posts: 1418
- Joined: Fri 30 Oct 2009, 16:57
- Location: England
- Contact:
You do. A list of category's is at "/etc/xdg/menus/hierarchy".jpeps wrote:I don't have that category in stardust, and don't see it in petspec either.abushcrafter wrote: [Edit] Here is a better menu category: "X-SystemMemory". You also haven't done the "pet.specs" part of the PET properly.
I have had that error before. Not sure what I did to fix it. I think I launched the Package Database Entry Creator (petspec). The menu entry is "create pkg db entry" in the "Utility" sub menu btw.I put the generated "pet.specs" into my PET and then the dir2pet script worked. It might have been a newer version of petspec which has a fix for this bug, I think. Which Is the one I have been using currently.jpeps wrote:For some reason, dir2pet bypassed the petspec gui and I got an empty pet.specs file (although package uninstalls OK). However, I see swapfilemanager appended to .user-installed-packages:Here's the output if I run petspec manually:Code: Select all
swapfilemanager||||System|||swapfilemanager.pet|||
edit: Here's the dir2pet error when attempting to load GUI window:Code: Select all
swapfilemanager-1.2|swapfilemanager|1.2||System|4.0K|/usr/local/bin|swapfilemanger.pet||Swap File Manger||||
Strange....GUI loads fine with "petspec"Code: Select all
** ERROR **: gtkdialog: Error in line 16, near token '</default>': syntax error aborting...
[url=http://www.adobe.com/flashplatform/]adobe flash is rubbish![/url]
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/
Abushcrafer: Let's move the dir2pet issue over to
http://murga-linux.com/puppy/viewtopic.php?t=52033
I ran the updated version with same issue, and posted petspec result above. Thanks!
http://murga-linux.com/puppy/viewtopic.php?t=52033
I ran the updated version with same issue, and posted petspec result above. Thanks!
- abushcrafter
- Posts: 1418
- Joined: Fri 30 Oct 2009, 16:57
- Location: England
- Contact:
Ok. Just saw you post before you posted herejpeps wrote:Abushcrafer: Let's move the dir2pet issue over to
http://murga-linux.com/puppy/viewtopic.php?t=52033
I ran the updated version with same issue, and posted petspec result above. Thanks!

[url=http://www.adobe.com/flashplatform/]adobe flash is rubbish![/url]
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/
- abushcrafter
- Posts: 1418
- Joined: Fri 30 Oct 2009, 16:57
- Location: England
- Contact:
That was it.jpeps wrote:abushcrafter: I had to run dir2pet with manually generated petspec file inside to create proper pet.spec.
[url=http://www.adobe.com/flashplatform/]adobe flash is rubbish![/url]
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/
How does this differ from this one - http://www.murga-linux.com/puppy/viewtopic.php?t=56431?
Everyone seems a lot more interested in this!
Everyone seems a lot more interested in this!
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]
Isn't is just semantics? Don't they create the same kind of file?jemimah wrote:I think it's because I'm not sure why I need a scratch file, but the purpose of a swap file is more obvious.
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]
Aha.. that must be it. Very succinct.jemimah wrote:A swap file adds virtual memory. A scratch file is like an additional save file, yes?
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]
- RetroTechGuy
- Posts: 2947
- Joined: Tue 15 Dec 2009, 17:20
- Location: USA
The one thing I didn't like about the tool was that it, by default, did not name the file pupswap.swp (IIRC that's the default pup swap filename).jemimah wrote:A swap file adds virtual memory. A scratch file is like an additional save file, yes?
Also, I think the default size was a little strange (did I miss read it, or was it 10 MB?) -- and it would probably be better if it used MB as the size measurement (I doubt anyone wants to fine-tune the swap size to kilobytes, or bytes...).
I'm guessing that if someone is adding a swap file, they probably want 256MB or 512 MB, so I would be inclined to make one of those sizes the "default" choice (the user can still change the size manually).
Otherwise, the tool seemed to work fine (a couple weeks back, I converted another Windows user to Puppy -- too little RAM for Windows to run properly, but Puppy did just fine, with a swap file
