Author Topic: Working CPU monitor  (Read 2897 times)

rgrep

  • Full Member
  • ***
  • Posts: 149
    • View Profile
Working CPU monitor
« on: October 17, 2004, 02:19:28 am »
Hi guys,

I've modified mb-applet-system-monitor so that it no longer always shows 100% CPU usage.  In the below screenshot the applet on the right is the original version and my modified version is on the left:



Cheers,

Matt
[img]https://www.oesf.org/forums/style_emoticons/default/smile.gif\" border=\"0\" class=\"linked-sig-image\" /] Has: Dynamism C760 / Linksys WCF12 WiFi / Kingston 512MB SD
[img]https://www.oesf.org/forums/style_emoticons/default/biggrin.gif\" border=\"0\" class=\"linked-sig-image\" /] Loves: pdaXrom / Warwalking
[img]https://www.oesf.org/forums/style_emoticons/default/sad.gif\" border=\"0\" class=\"linked-sig-image\" /] Hates: NetGear MA701 WiFi / SanDisk 256MB SD / C760 Charging Faults

ikm

  • Full Member
  • ***
  • Posts: 172
    • View Profile
    • http://
Working CPU monitor
« Reply #1 on: October 17, 2004, 03:11:20 am »
Quote
Hi guys,

I've modified mb-applet-system-monitor so that it no longer always shows 100% CPU usage.  In the below screenshot the applet on the right is the original version and my modified version is on the left:

Hope someone finds this useful.

Cheers,

Matt
Great, that needed bashing. Now it really works and is something I was missing, thanks.

Btw, when I raise the CPU load to 100% instanteneously ("while true; do true; done" in bash, for instance), the indicator display doesn't show the change in one step when it updates -- rather, it shows CPU gradually increasing step-by-step until it is full. When I remove the load, it goes down the same way. Was that a feature or maybe some problem?

rgrep

  • Full Member
  • ***
  • Posts: 149
    • View Profile
Working CPU monitor
« Reply #2 on: October 17, 2004, 03:51:30 am »
Quote
Btw, when I raise the CPU load to 100% instanteneously ("while true; do true; done" in bash, for instance), the indicator display doesn't show the change in one step when it updates -- rather, it shows CPU gradually increasing step-by-step until it is full. When I remove the load, it goes down the same way. Was that a feature or maybe some problem?
That must just be due to the way the applet works.  I just installed it on my desktop PC and it had the same behaviour.  The code says it's based on wmbubblemon which I also run on my desktop, and while wmbubblemon also increments/decrements the CPU usage it does so much faster than mb-applet-system-monitor.  If anyone wants to report this as a bug make sure to send it to the matchbox project rather than pdaXrom.
« Last Edit: October 17, 2004, 03:57:25 am by rgrep »
[img]https://www.oesf.org/forums/style_emoticons/default/smile.gif\" border=\"0\" class=\"linked-sig-image\" /] Has: Dynamism C760 / Linksys WCF12 WiFi / Kingston 512MB SD
[img]https://www.oesf.org/forums/style_emoticons/default/biggrin.gif\" border=\"0\" class=\"linked-sig-image\" /] Loves: pdaXrom / Warwalking
[img]https://www.oesf.org/forums/style_emoticons/default/sad.gif\" border=\"0\" class=\"linked-sig-image\" /] Hates: NetGear MA701 WiFi / SanDisk 256MB SD / C760 Charging Faults

rgrep

  • Full Member
  • ***
  • Posts: 149
    • View Profile
Working CPU monitor
« Reply #3 on: October 17, 2004, 03:55:34 am »
I forgot to mention how the modification works.

Basically all I did was make the applet ignore kapm-idled in the CPU usage statistics.  The way this works is by subtracting kapm-idled's user/system CPU time from the current total user/system CPU time.  The PID of kapm-idled is discovered by the applet when it first starts by executing "pidof kapm-idled".
« Last Edit: October 17, 2004, 04:00:25 am by rgrep »
[img]https://www.oesf.org/forums/style_emoticons/default/smile.gif\" border=\"0\" class=\"linked-sig-image\" /] Has: Dynamism C760 / Linksys WCF12 WiFi / Kingston 512MB SD
[img]https://www.oesf.org/forums/style_emoticons/default/biggrin.gif\" border=\"0\" class=\"linked-sig-image\" /] Loves: pdaXrom / Warwalking
[img]https://www.oesf.org/forums/style_emoticons/default/sad.gif\" border=\"0\" class=\"linked-sig-image\" /] Hates: NetGear MA701 WiFi / SanDisk 256MB SD / C760 Charging Faults

ikm

  • Full Member
  • ***
  • Posts: 172
    • View Profile
    • http://
Working CPU monitor
« Reply #4 on: October 17, 2004, 05:14:43 am »
Quote
That must just be due to the way the applet works.  I just installed it on my desktop PC and it had the same behaviour.  The code says it's based on wmbubblemon which I also run on my desktop, and while wmbubblemon also increments/decrements the CPU usage it does so much faster than mb-applet-system-monitor.  If anyone wants to report this as a bug make sure to send it to the matchbox project rather than pdaXrom.
I guess it is just because wmbubblemon does the same number of graduate steps, but refreshes more often, each refresh taking one step. Clearly a once-nifty graphical effect of wmbubblemon turned into an outright bug in mb-applet-system-monitor