site  contact  subhomenews

freememapplet_tray 2.2

May 17, 2010 — BarryK
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/ 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:

...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.


Change name?
Username: PaulBx1
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..."18 May 2010, 8:17"01600"'Re free"BarryK"Yes, there have been discussions on the forum about results returned by 'free', when people haven't realised how misleading it is. Username: 18 May 2010, 8:32
"01600"'fails in full install"01micko"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. [code]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");[/code] 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"7 Aug 2010, 15:33"01600"'freemem patched source"01micko"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 This one I hacked the xpm files.. it looks like a bunch of doughnuts on a skewer, or quoits on a stick.[img][/img](frugal install) [img][/img](full install) 4 rings is 4 green rings and 1 ring is unchanged, 1 red ring. The exec is 11k. Source The usual user/password applies :happy: Cheers"9 Aug 2010, 10:27"01600"'Re freememapplet_tray"BarryK"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!

Username: ttuuxxx
"Hi Bary I re-themed the freememapplet :) sources are located at [img][/img] ttuuxxx

Username: ttuuxxx
"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

freememapplet right click menu
Username: clarf
"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: Greetings, clarf

About xload (gatotray)
Username: clarf
"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. clarf

Tags: quirky