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 Wed 22 Oct 2014, 09:03
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 Posts_count  
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   1947 Time(s)

xnetcpuload.jpg

xcpuload-xnetload.pet
Description 
pet

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


Joined: 11 Oct 2008
Posts: 7834
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   1890 Time(s)

cpu-down-up.jpg


_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send_private_message Visit_website 
disciple

Joined: 20 May 2006
Posts: 6448
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: 6448
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: 7834
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_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_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  422 Time(s) 
xcpuload-custom.tar.gz
Description 
gz

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

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

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

tray.jpg

Back to top
View user's profile Send_private_message 
trio


Joined: 21 Dec 2008
Posts: 1802
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
Back to top
View user's profile Send_private_message 
disciple

Joined: 20 May 2006
Posts: 6448
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_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


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