| Author |
Message |
kyle_white
Joined: 26 Jul 2009 Posts: 3
|
Posted: Sun 26 Jul 2009, 02:27 Post subject:
Customized XCpuload and XNet load to swallow to tray |
|
I've just started with puppy and love it for my laptop. One thing I wanted from other WMs is cpu, memory, and net monitors in the tray. I couldn't find any after some searching (but found information on how to swallow xload) so I made my own from XCpuload and XNetload. They were compiled on Debian Lenny, since I couldn't get xmkmf working on puppy, but they are working on my 4.21. I'm not sure if there's any dependencies which aren't in 4.21 native, if anyone figures some out they can add to this post. I've added several options to each program so they can be better formatted. Install these and put this into your .jwmrc-tray file
| Code: | <Swallow name="xcpuload" width="32">
xcpuload-autoscale -nolabel -nomhz -bg lightgray -fg "#0000C0" -hl darkgray -update 1 -jumpscroll 1
</Swallow>
<Swallow name="xnld" width="32">
~/.xnetload-tray/xnld -nv -ni -ch 24 -s 25 -kb -nu -ms 4 wlan0
</Swallow>
<Swallow name="xnlu" width="32">
~/.xnetload-tray/xnlu -nv -ni -ch 24 -s 25 -kb -nd -ms 4 wlan0
</Swallow> |
to do this I make a directory ~/.xnetload-tray and put absolute links to /usr/bin/xnetload called xnlu and xnld. This is necessary because swallow seems to swallow based on the name of the command
if you don't want to mess with sim links replace
| Code: | <Swallow name="xnld" width="32">
~/.xnetload-tray/xnld -nv -ni -ch 24 -s 25 -kb -nu -ms 4 wlan0
</Swallow>
<Swallow name="xnlu" width="32">
~/.xnetload-tray/xnlu -nv -ni -ch 24 -s 25 -kb -nd -ms 4 wlan0
</Swallow>
|
with
| Code: | <Swallow name="xnetload" width="32">
xnetload -nv -ni -ch 12 -s 30 -kb -ms 2 wlan0
</Swallow> |
P.S. - if anyone knows of a "XMemload" I'd like to get that swallowed too
| Description |
|
| Filesize |
22.48 KB |
| Viewed |
1323 Time(s) |

|
| Description |
|

Download |
| Filename |
xcpuload-xnetload.pet |
| Filesize |
19.91 KB |
| Downloaded |
411 Time(s) |
|
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7037 Location: qld
|
Posted: Sun 26 Jul 2009, 03:04 Post subject:
|
|
Hello kyle_white
Yep, installed and configured all good on a puppy derivative.. spup, from BarryK's woof. One problem.. I'm running an old P111 600 and the cpu seems maxed out in the meter the whole time. Is there a way to scale this? (Is it in the options?)
Same with a 1725MHz Athlon
Cheers, nice work.
| Description |
|
| Filesize |
5.1 KB |
| Viewed |
1267 Time(s) |

|
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6199 Location: Auckland, New Zealand
|
Posted: Sun 26 Jul 2009, 05:22 Post subject:
|
|
xcpuload doesn't seem to show the CPU usage as a percentage or anything. It just shows the actual CPU clock speed. So it is only useful if you are running a laptop with frequency scaling enabled, which means that your CPU slows down when it is not busy, to save power.
_________________ DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
|
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6199 Location: Auckland, New Zealand
|
Posted: Sun 26 Jul 2009, 05:27 Post subject:
|
|
| Quote: | | if anyone knows of a "XMemload" I'd like to get that swallowed too |
Freememapplet does this, depending on how you are running Puppy (it usually shows the free space in the save file). So I think it should be trivial to modify it to always show free memory. Actually, if you can find the original version I think it did only show that.
_________________ DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
|
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7037 Location: qld
|
Posted: Sun 26 Jul 2009, 05:27 Post subject:
|
|
disciple,
| Quote: | | xcpuload doesn't seem to show the CPU usage as a percentage or anything. It just shows the actual CPU clock speed. |
Thanks, that would explain it. Ah well, the other two are useful
Cheers
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 6874 Location: Perth, Western Australia
|
Posted: Sun 26 Jul 2009, 06:05 Post subject:
|
|
kyle_white,
That's great, always good to have more stuff for the tray.
Would you mind posting the modified source too, for gpl we always must have the source code available.
_________________ http://bkhome.org/blog2/
|
|
Back to top
|
|
 |
kyle_white
Joined: 26 Jul 2009 Posts: 3
|
Posted: Tue 28 Jul 2009, 20:37 Post subject:
Source and xmemload |
|
I modified xcpuload into xmemload. Had some bugs for the first go round with it but it seems to be working. I just did quick hack jobs to the source of all three of the files, but I'll get them tar'd up, hacks and all, and post them soon. xmemload uses /proc/meminfo. I'm going to look at conky and the xfce applets to see if I can't fix xcpuload to use kernel information for the graph.
Edit: I've fixed up xcpuload to use info from /proc/stat and /proc/cpuinfo. Hopefully it'll work the same as conky now. I've also attached the source for each.
Here's what I have in my jwmrc-tray
| Code: | <Swallow name="xcpuload" width="32">
xcpuload -nolabel -nomhz -bg lightgray -fg "#0000C0" -hl darkgray -update 1 -jumpscroll 1
</Swallow>
<Swallow name="xmemload" width="32">
xmemload -nolabel -nomb -bg lightgray -fg "#c00000" -hl darkgray -update 1 -jumpscroll 1 -scale 4
</Swallow>
<Swallow name="xnetload" width="32">
xnetload -nv -ni -ch 12 -s 30 -kb -ms 4 wlan0
</Swallow>
|
| Description |
|

Download |
| Filename |
xnetload-custom.tar.gz |
| Filesize |
24.14 KB |
| Downloaded |
354 Time(s) |
| Description |
|

Download |
| Filename |
xcpuload-custom.tar.gz |
| Filesize |
45.62 KB |
| Downloaded |
352 Time(s) |
| Description |
|

Download |
| Filename |
xmemload-custom.tar.gz |
| Filesize |
34.69 KB |
| Downloaded |
366 Time(s) |
| Description |
|

Download |
| Filename |
custom-xloads.pet |
| Filesize |
32.78 KB |
| Downloaded |
376 Time(s) |
| Description |
|
| Filesize |
9.13 KB |
| Viewed |
1231 Time(s) |

|
|
|
Back to top
|
|
 |
trio

Joined: 21 Dec 2008 Posts: 1786 Location: अनुमोदना
|
Posted: Thu 30 Jul 2009, 09:08 Post subject:
|
|
great effort, now, do you plan to modify a new one? what puppy don't have is wireless strength applet..
_________________ PET Maker|WbarCC|My Website
|
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6199 Location: Auckland, New Zealand
|
Posted: Fri 31 Jul 2009, 02:41 Post subject:
|
|
What everyone always wants is one to show CPU usage as a percentage... I imagine it shouldn't be too hard to do.
_________________ DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
|
|
Back to top
|
|
 |
abushcrafter

Joined: 30 Oct 2009 Posts: 1447 Location: England
|
Posted: Wed 04 Nov 2009, 14:22 Post subject:
|
|
Thanks.
Can you add the option to chose which bits of text to show eg just the percentage please
Also so for xnetload options you need -if <INTERFACE>
so...
| Code: |
<Swallow name="xnetload" width="32">
xnetload -nv -ni -ch 12 -s 30 -kb -ms 4 -if eth0
</Swallow> |
|
|
Back to top
|
|
 |
|