Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

Wrong CPUUsage with DualCore CPU ?

General discussion about LCD Smartie.

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo, Fast351

Post Reply
Nevertheless
Posts: 14
Joined: March 7th, 2006, 12:08 am

Wrong CPUUsage with DualCore CPU ?

Post by Nevertheless »

Hi all,

I'm having a strange problem: In my Athlon 64 X2 system (running WinXP SP2) LCD Smartie's $CPUUsage variable appearently shows only the utilization of CPU 0 :(

What I like to see, is the total CPU utilization. How can I managed this?

Thanks for any help!
ReverseEngineered
Plugin Author
Posts: 192
Joined: January 18th, 2006, 11:09 pm
Location: Saskatoon, Saskatchewan, Canada

Post by ReverseEngineered »

At the moment there is no simple solution to this. The current code only checks the CPU 0 usage. However, we are currently rewriting that entire part of LCD Smartie. I will be sure to make note to provide functions so that a person can check the CPU utilization of seperate processors, or all of them together at once.

Thanks for mentioning this bug. We appreciate user feedback. 8)
smack
Plugin Author
Posts: 21
Joined: July 12th, 2005, 8:42 am

Re: Wrong CPUUsage with DualCore CPU ?

Post by smack »

Nevertheless wrote:What I like to see, is the total CPU utilization. How can I managed this?
You can get this (and lots of other) info from the Windows performance counters. Use PerfPlugin for this (Advanced use, Function 4).

Use the Windows utility perfmon to find out the correct name of the specific performance counter. The counter names are localised in Windows' local language.

For example, on my German Windows system the counter for "percentage of total processor time" has the name "\Prozessor(_Total)\Prozessorzeit (%)".
Last edited by smack on March 7th, 2006, 11:21 am, edited 2 times in total.
smack
Plugin Author
Posts: 21
Joined: July 12th, 2005, 8:42 am

Post by smack »

ReverseEngineered wrote:At the moment there is no simple solution to this. The current code only checks the CPU 0 usage. However, we are currently rewriting that entire part of LCD Smartie. I will be sure to make note to provide functions so that a person can check the CPU utilization of seperate processors, or all of them together at once.
IMO, there is no good reason to implement this in the main program of LCD Smartie. Why would you want to write your own function to measure CPU utilization, when you can get this info from the Windows system (performance counters)?
limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Post by limbo »

smack says that right
You can use the perfmon plugin :D :D
ReverseEngineered
Plugin Author
Posts: 192
Joined: January 18th, 2006, 11:09 pm
Location: Saskatoon, Saskatchewan, Canada

Post by ReverseEngineered »

Perhaps my intentions weren't quite clear. There are already functions for displaying the CPU utilization, which work by reading these performance counters. However, only a single performance counter is read. Since we're moving everything over to plugins, PerfPlugin will basically take the place of this function. All I meant was that, rather than always displaying the CPU 0 performance counter, I would make it an option to display any of them (by adding an optional parameter).

I'm up to my neck in threads and message queues at the moment, so this might not be any clearer. I'll worry about that more when we get to that point (we're not even close to that right now).
Nevertheless
Posts: 14
Joined: March 7th, 2006, 12:08 am

Post by Nevertheless »

@limbo and @smack: I totally disagree with you to use a performance counter for this: PCs running LCDsmartie are often used as HTPCs in the living room. For this reason, I alsways recommend to disable the performance counters - e.g. to avoid the hourly disc check the OS otherwise performs regulary.
I will be sure to make note to provide functions so that a person can check the CPU utilization of seperate processors, or all of them together at once.
@ReverseEngineered: Please keep on goind to implement this for the new version of LCDsmartie. More and more dual-core CPUs are coming in the market - and by using the $CPUUsage variable, I would prefer to get the combined utilization of all CPUs at one (like other apps are doing it), which seems to be the natural way of interpreting CPU utilization.

As new user, I would not expect to get only the utilization of one CPU instead of all of them combined...

With a plugin, you can make for detailed functions available, but this sounds to me like a very basic function which should belong to the program itself :-)
smack
Plugin Author
Posts: 21
Joined: July 12th, 2005, 8:42 am

Post by smack »

Nevertheless wrote:@limbo and @smack: I totally disagree with you to use a performance counter for this: PCs running LCDsmartie are often used as HTPCs in the living room. For this reason, I alsways recommend to disable the performance counters - e.g. to avoid the hourly disc check the OS otherwise performs regulary.
I'm not an expert when it comes to Windows internals so I don't know how the performance counters and an "hourly disc check" are related. You seem to be sure about that so I won't argue...

Btw. did you notice ReverseEngineered's reply that even the variable $CPUUsage gets its value from the Windows performance counter?
Nevertheless
Posts: 14
Joined: March 7th, 2006, 12:08 am

Post by Nevertheless »

You are right (my mistake) - I meant the disc performance counters that need to be switched off to avoid the hourly dick check.

Besides this: I still vote to get the combined CPU utilization when using the $CPUUsage variable, instead of only CPU0 like it is rights now. Hopefully this will be implemented in the next version of LCD Smartie :-)
Jumpin' Jon
Plugin Author
Posts: 35
Joined: August 3rd, 2005, 12:34 am
Contact:

Post by Jumpin' Jon »

I use

Code: Select all

$Right($dll(perf,4,5,\Processor(0)\% Processor Time)%,$4%)$Right($dll(perf,4,5,\Processor(1)\% Processor Time)%,$4%)
for my Athlon64 X2 4200+.

I'm guessing the built-in one uses the "_Total" value, which - while correct - does generally show a lower-than-expected value. e.g. I load Photoshop and see my CPU hit 50% max.

JJ
Post Reply