freememapplet_tray 2.2

Ha ha, many people will be pleased with this! I have removed an apparent anomaly with the readout of free memory when booted off a Flash drive.

When Puppy is running from a Flash drive, PUPMODE is 13, and everything is running in RAM, with periodic saves to the save-file on the Flash drive. The free memory applet in the tray showed the working space in the RAM, not in the save-file -- this is what has caused confusion.

The reason for doing this is that the free working space in RAM is usually the critical factor. In the case of Aufs, any packages installed go into RAM and are not flushed to the save-file until shutdown. Thus, if the free memory was showing the free space in the save-file, you could be unaware that your RAM space has become critical.

With the latest Quirky and Lupu, using a recent Aufs, packages are now saved direct to the save-file, bypassing the tmpfs RAM layer. This now matches behaviour that we had with the Unionfs layered filesystem. See script /usr/local/petget/pkginstall.sh for the code.

The end result is that it is now ok to always display the free space of the actual save-file (or save-partition if using an entire partition).

Here is the latest PET:
http://distro.ibiblio.org/pub/linux/distributions/quirky/pet_packages-quirky/freememapplet_tray-2.2-q1.pet

...compiled in Quirky but should work in other puppies.

Note that the 'freememapplet_tray' executable is now in /root/Startup (previously it was in /usr/sbin).

Background color
For freememapplet_tray and powerapplet_tray, there is no passed parameter to set the background color when running in the JWM tray. The icons have a transparent background, so such a setting is not required.

I don't know why Retrovol and Blinky require their backgound colours to be set. This needs to be investigated. Hmmm, I might take a look at the Blinky source, rewrite it.


Posted on 17 May 2010, 19:27


Comments:

Posted on 18 May 2010, 8:17 by PaulBx1
Change name?
Maybe the name of this applet should be changed to "freesavespace" or "savespaceremaining" or something like that, to reflect its changed function (and what it is actually measuring). I always thought the name freememapplet was misleading, since it (usually) has nothing to do with ram.

Then another applet is needed to guage the free memory too (basically the command line "free", but shown in the task bar). That way both critical measures are shown.

Woops, I forgot, "free" is not that useful because of the caching nature of linux. Never mind...


Posted on 18 May 2010, 8:32 by BarryK
Re free
Yes, there have been discussions on the forum about results returned by 'free', when people haven't realised how misleading it is.



Posted on 7 Aug 2010, 15:33 by 01micko
fails in full install
Hi Barry

With all the full install testing of lupu I discovered a bug in freememapplet_tray.. no work in a full install!

Ok, I decided to dive in and patch it.. I know no C but it didn't seem too hard to figure out and it works.

line 63

---
if (pupmode==3) fp = (FILE *)popen("df -m | grep ' /initrd/pup_ro1$' | tr -s ' ' | cut -f 2,4 -d ' '","r");
else if (pupmode==7) fp = (FILE *)popen("df -m | grep ' /initrd/pup_ro1$' | tr -s ' ' | cut -f 2,4 -d ' '","r");
else if (pupmode==13) fp = (FILE *)popen("df -m | grep ' /initrd/pup_ro1$' | tr -s ' ' | cut -f 2,4 -d ' '","r");
else fp = (FILE *)popen("df -m | grep ' /initrd/pup_rw$' | tr -s ' ' | cut -f 2,4 -d ' '","r");

+++
if (pupmode==3) fp = (FILE *)popen("df -m | grep ' /initrd/pup_ro1$' | tr -s ' ' | cut -f 2,4 -d ' '","r");
else if (pupmode==7) fp = (FILE *)popen("df -m | grep ' /initrd/pup_ro1$' | tr -s ' ' | cut -f 2,4 -d ' '","r");
else if (pupmode==13) fp = (FILE *)popen("df -m | grep ' /initrd/pup_ro1$' | tr -s ' ' | cut -f 2,4 -d ' '","r");
else if (pupmode==2) fp = (FILE *)popen("df -m | grep '/dev/root' | tr -s ' '| cut -f 2,4 -d ' '","r");
else fp = (FILE *)popen("df -m | grep ' /initrd/pup_rw$' | tr -s ' ' | cut -f 2,4 -d ' '","r");


Um I don't know the correct syntax for a proper C patch but I guess you can see what's going on here. It compiled fine.

We'll be using this in Lupu.

Cheers


Posted on 9 Aug 2010, 10:27 by 01micko
freemem patched source
Hi

I thought I better upload my upload my patched source for freememapplet_tray, the right thing to do.

This link is essentially the same freememapplet_tray with the patch only, no visual difference to what is seen in any late model woof based puppy/quirky
http://www.smokey01.com/01micko/freememapplet_tray-2.2-2.tar.gz

This one I hacked the xpm files.. it looks like a bunch of doughnuts on a skewer, or quoits on a stick.(frugal install)
(full install)
4 rings is 4 green rings and 1 ring is unchanged, 1 red ring. The exec is 11k.
Source
http://www.smokey01.com/01micko/freememapplet_tray-2.2-2me1.tar.gz

The usual user/password applies

Cheers


Posted on 21 Aug 2010, 9:20 by BarryK
Re freememapplet_tray
Ok, I have created freememapplet_tray version 2.3 with your bugfix. I didn't apply those extra icons variations, but they sure do look interesting!



Posted on 12 Sep 2010, 17:25 by ttuuxxx
freememapplet
Hi Bary I re-themed the freememapplet :)
sources are located at http://www.murga-linux.com/puppy/viewtopic.php?mode=attach&id=32481

ttuuxxx


Posted on 12 Sep 2010, 24:28 by ttuuxxx
xload
Hi Barry

Your latest freememory and network monitor swallows great in xfce taskbar, but xload doesn't, I was wondering if you ever thought about building your own xload app? the default xload we usually have to specify the size, colour etc in jwm tray. When most apps come that way. Just an idea. I like your app versions usually better than the default older ones.
ttuuxxx


Posted on 14 Sep 2010, 10:10 by clarf
freememapplet right click menu
Hi Barry, ttuuxxx icons looks good. This change motivated my to play with freememapplet today.

I like the default options in the old freememapplet, then I modified this tray version to add Right click menu for lxpanel, Time&Date and Partview. Also changed the text memory description for the actual pupmode, something I wanted long time ago to avoid confusion between RAM memory, pup_save and Hard Disk free space.

You can use stock icons for menu items instead of labels (I included the necessary code but itīs commented), you also can remove the "Exit" button too if you want, just remove any menuitemExit code and trayExit function.

Source:

http://murga-linux.com/puppy/viewtopic.php?t=42553&start=3854

Greetings,
clarf



Posted on 17 Sep 2010, 3:35 by clarf
About xload (gatotray)
jemimah just created a thread, about a good cpu monitor that includes a graphic temperature thermometer.

It works with different Puppy version, although it does not show some info for kernel version older than 2.6.26.

Anyway the info seems fixable for those older kernels.

http://murga-linux.com/puppy/viewtopic.php?t=59930

clarf