Author |
Message |
disciple
Joined: 20 May 2006 Posts: 6781 Location: Auckland, New Zealand
|
Posted: Fri 30 Jan 2009, 23:19 Post subject:
|
|
Quote: | What's wrong with this sentence: |
AFAICS what's wrong with it is that I wasn't certain about the correct terminology because I hadn't investigated it properly. I don't think getting the terminology precisely right will make much difference to the understanding of most users unless we define the terminology as well.
I'm not much of a hacker, and the last I heard xload was going to be switched off in Puppy 4.2, but when I get a chance I might have a look to see if I can add a tooltip or a context menu.
_________________ If you have or know of a good gtkdialog application, please post a link here
Classic Puppy quotes
ROOT FOREVER
|
Back to top
|
|
 |
vtpup

Joined: 15 Oct 2008 Posts: 1208 Location: Republic of Vermont
|
Posted: Sat 31 Jan 2009, 00:01 Post subject:
|
|
Peace be with you, my friend.
|
Back to top
|
|
 |
HairyWill

Joined: 26 May 2006 Posts: 2946 Location: Southampton, UK
|
Posted: Sat 07 Feb 2009, 09:33 Post subject:
|
|
My previous load average example giving a 1 minute average was a bit lacking in granularity. This might be more promising Code: | while [ 1 ]; do top -n 1 | head -2 | tail -n 1 | awk '{print $8}'| sed 's/%//';sleep 2;done | it displays the idle value from top, subtract it from 100 and you have the current cpu utilization (I think). I have hooked this into brads battery monitor so that you get a green square in the taskbar with 8 levels of red filling it up depending on the utilization. The icon is just created from 9 32x32 png files ranging from all green to all red. It is not very pretty!
Description |
|
Filesize |
2.04 KB |
Viewed |
5600 Time(s) |

|
_________________ Will
contribute: community website, screenshots, puplets, wiki, rss
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13648 Location: Karlsruhe, Germany
|
Posted: Sat 07 Feb 2009, 09:40 Post subject:
|
|
cpu usage from deskicons002:
Code: | #!/bin/bash
# by Paul Colby (http://colby.id.au), no rights reserved ;)
####cd ../icons
####cp -ax terminal-black.png /tmp/deskiconsramdrive/terminal.png
PREV_TOTAL=0
PREV_IDLE=0
while true; do
CPU=(`cat /proc/stat | grep '^cpu '`) # Get the total CPU statistics.
unset CPU[0] # Discard the "cpu" prefix.
IDLE=${CPU[4]} # Get the idle CPU time.
# Calculate the total CPU time.
TOTAL=0
for VALUE in "${CPU[@]}"; do
let "TOTAL=$TOTAL+$VALUE"
done
# Calculate the CPU usage since we last checked.
let "DIFF_IDLE=$IDLE-$PREV_IDLE"
let "DIFF_TOTAL=$TOTAL-$PREV_TOTAL"
let "DIFF_USAGE=(1000*($DIFF_TOTAL-$DIFF_IDLE)/$DIFF_TOTAL+5)/10"
#### comment next line for use with deskicons
echo -en "\rCPU: $DIFF_USAGE% \b\b"
####pic=terminal-green.png
####if [ $DIFF_USAGE -gt 33 ];then
#### pic=terminal-yellow.png
####fi
####if [ $DIFF_USAGE -gt 66 ];then
#### pic=terminal-red.png
####fi
####cp -ax $pic /tmp/deskiconsramdrive/terminal.png
# Remember the total and idle CPU times for the next check.
PREV_TOTAL="$TOTAL"
PREV_IDLE="$IDLE"
# Wait before checking again.
sleep 1
done |
I commented with #### the desktopicons specific lines, so it is reverted back to the original script I found in the web.
Like this it prints the values to the console.
With slight modifications concerning the pictures, you might adapt it for the jwm tray.
Mark
_________________ my recommended links
|
Back to top
|
|
 |
HairyWill

Joined: 26 May 2006 Posts: 2946 Location: Southampton, UK
|
Posted: Sat 07 Feb 2009, 10:09 Post subject:
|
|
thanks Mark
That confirms that the value I am using is sensible, I'm just collecting it in an expensive way. I will probably try and do a complete solution in C to avoid the cost of opening a shell every couple of seconds. I do find it interesting how my cpu bounces from 2-30% whilst I am not interacting with my machine.
_________________ Will
contribute: community website, screenshots, puplets, wiki, rss
|
Back to top
|
|
 |
DaveS

Joined: 09 Oct 2008 Posts: 3726 Location: UK
|
Posted: Sun 20 Sep 2009, 04:43 Post subject:
|
|
I read through this thread a few times now, and oddly have come to the conclusion that a monitor for running processes is actually a lot more useful as a diagnostic tool than a CPU meter.
_________________ Spup Frugal HD and USB
Root forever!
|
Back to top
|
|
 |
asdf42
Joined: 21 Dec 2009 Posts: 2
|
Posted: Sat 09 Jan 2010, 10:52 Post subject:
|
|
A few things about xload and CPU meters:
* I use puppy for web browsing, often with many pages opened. Xload increases before my PC gets unresponsive. It is a very useful information. Until I read this thred, I never knew how it detects it, but I used it.
* For a very long time, I didnt pay attention to the white lines across it. It took me *very* long to realize that these are the scales and thus their number is more important than the graph itself. - I believe a tooltip saying how the graph should be read and what it means is VERY important and it should be included in the next version of puppy.
* If anybody wants to monitor the CPU usage, I recommend running a console and calling "top". It is a standard unix command that gives info about processes sorted by CPU usage, about memory usage and similar things. If you dont know it, just try it! I believe this info about managing your processes should be in all starter guides.
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6781 Location: Auckland, New Zealand
|
Posted: Sat 30 Jan 2010, 21:22 Post subject:
Great idea |
|
Quote: | I believe a tooltip saying how the graph should be read and what it means is VERY important and it should be included in the next version of puppy. |
Yes, good point. freememapplet needs the same thing. But I don't think jwm can provide tooltips for swallowed items though, so you'd either need to modify jwm or xload and freememapplet, or perhaps run them via alltray or something...
Quote: | I believe this info about managing your processes should be in all starter guides. |
Yes, although you shouldn't really need to know it. Puppy should just work
_________________ If you have or know of a good gtkdialog application, please post a link here
Classic Puppy quotes
ROOT FOREVER
|
Back to top
|
|
 |
DMcCunney
Joined: 02 Feb 2009 Posts: 894
|
Posted: Thu 04 Feb 2010, 16:16 Post subject:
|
|
asdf42 wrote: | * If anybody wants to monitor the CPU usage, I recommend running a console and calling "top". It is a standard unix command that gives info about processes sorted by CPU usage, about memory usage and similar things. If you dont know it, just try it! I believe this info about managing your processes should be in all starter guides. |
I use top regularly. But it should be noted that the implementation Puppy uses is the cut down version included in busybox. The real thing has a much larger feature set. See http://linux.die.net/man/1/top
I have Ubuntu in another partition on the box that runs Puppy, and copied Ubuntu's full version over for use in Puppy.
______
Dennis
|
Back to top
|
|
 |
proximityinfotech1
Guest
|
Posted: Tue 13 Jul 2010, 06:16 Post subject:
|
|
Now the question is, is there a similar app that DOES graph CPU usage, and can be used in JWM?
There is xloadtime, which is a fork of xload, that can display an extra bar for it, but it doesn't show a graph over time, just a single bar per CPU.
_____________________________________________
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6781 Location: Auckland, New Zealand
|
Posted: Tue 13 Jul 2010, 06:31 Post subject:
|
|
Somebody found some sort of easy tool for making tray apps a while ago and several apps were made - one of them may have been for CPU usage.
I think this was in the thread for 2.14R or something - can anybody remember?
_________________ If you have or know of a good gtkdialog application, please post a link here
Classic Puppy quotes
ROOT FOREVER
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 8670 Location: qld
|
Posted: Tue 13 Jul 2010, 08:34 Post subject:
|
|
disciple
Is this the one? http://www.murga-linux.com/puppy/viewtopic.php?t=44986
I still have it installed on my old machine.
_________________ Puppy Linux Blog - contact me for access
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6781 Location: Auckland, New Zealand
|
Posted: Wed 14 Jul 2010, 06:06 Post subject:
|
|
No, at least not the first version posted there. As I described there, it seems to show the CPU speed, so is useful on a laptop or something with dynamic CPU scaling or whatever it's called..
I can't remember for sure what the "modified" version there shows, but from my second comment it sounds like it isn't conventional "cpu usage" either.
_________________ If you have or know of a good gtkdialog application, please post a link here
Classic Puppy quotes
ROOT FOREVER
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6781 Location: Auckland, New Zealand
|
Posted: Wed 14 Jul 2010, 06:21 Post subject:
|
|
If I haven't imagined it and there really was one, I think it was about the same time as that post though... maybe a couple of months later.
_________________ If you have or know of a good gtkdialog application, please post a link here
Classic Puppy quotes
ROOT FOREVER
|
Back to top
|
|
 |
mulluysavage
Joined: 30 Apr 2010 Posts: 53
|
Posted: Sat 02 Oct 2010, 14:24 Post subject:
|
|
I upgraded to 5.1.1 yesterday. I was concerned about my red blob, which I thought was a cpu meter! Today, my red blob has 5 lines, 4 of which are full. My computer runs fine, but I am wondering why I have so many threads! (Do I have a lot, it seems like it)
Asus M3N78 Pro
AMD Phenom Quad-Core @ 2.6 Ghz
3 GB RAM
|
Back to top
|
|
 |
|