Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 26 Jul 2014, 15:37
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Customized XCpuload and XNet load to swallow to tray
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [10 Posts]  
Author Message
kyle_white

Joined: 26 Jul 2009
Posts: 3

PostPosted: 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 Smile
xnetcpuload.jpg
 Description   
 Filesize   22.48 KB
 Viewed   1529 Time(s)

xnetcpuload.jpg

xcpuload-xnetload.pet
Description 
pet

 Download 
Filename  xcpuload-xnetload.pet 
Filesize  19.91 KB 
Downloaded  472 Time(s) 
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7782
Location: qld

PostPosted: 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. Smile
cpu-down-up.jpg
 Description   
 Filesize   5.1 KB
 Viewed   1467 Time(s)

cpu-down-up.jpg


_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
disciple

Joined: 20 May 2006
Posts: 6426
Location: Auckland, New Zealand

PostPosted: 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
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6426
Location: Auckland, New Zealand

PostPosted: 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
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7782
Location: qld

PostPosted: 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 Smile

Cheers

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: 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/news/
Back to top
View user's profile Send private message Visit poster's website 
kyle_white

Joined: 26 Jul 2009
Posts: 3

PostPosted: 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>      
xnetload-custom.tar.gz
Description 
gz

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

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

 Download 
Filename  xmemload-custom.tar.gz 
Filesize  34.69 KB 
Downloaded  414 Time(s) 
custom-xloads.pet
Description 
pet

 Download 
Filename  custom-xloads.pet 
Filesize  32.78 KB 
Downloaded  429 Time(s) 
tray.jpg
 Description   
 Filesize   9.13 KB
 Viewed   1399 Time(s)

tray.jpg

Back to top
View user's profile Send private message 
trio


Joined: 21 Dec 2008
Posts: 1788
Location: अनुमोदना

PostPosted: 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
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6426
Location: Auckland, New Zealand

PostPosted: 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
View user's profile Send private message 
abushcrafter


Joined: 30 Oct 2009
Posts: 1447
Location: England

PostPosted: 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 Smile

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
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [10 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0765s ][ Queries: 12 (0.0043s) ][ GZIP on ]