Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Wed, 16 Apr 2008 01:13:00 -0700,    group: microsoft.public.win32.programmer.wmi        back       


Wrong CPU percentage   
Hello,

We are working on the calculation of the CPU %, for this purpose we use a
query to obtain the values of the class WMI
Win32_PerfRawData_PerfOS_Processor. Those values are the PercentProcessorTime
and Timestamp_syn10n, with which we carry out the calculation.

For the calculation be made a subtraction between the current value of
PercentProcessorTime and above of this formulation:

100 * (1 – (N2-N1)/(T2-T1))

Where N2 is Current PercentProcessorTime,
N1 is Previous PercentProcessorTime,
T2 is Current Timestamp_syn10n,
T1 is Previous Timestamp_syn10n.

First a question: We know that the values of the variable
PercentProcessorTime are cumulative, we might want to know the behaviour if
we continue monitoring the computer indefinitely because in some time the
values will be reset. The question is: Which are the maximum?. Furthermore,
we have noticed that after starting the computer the first retrived value
seems not starting from zero. Which is the minimum value?


Now a wrong behaviour: In some tests we retrieve some strange values (in
random measurements) when monitoring two computers. For example, monitoring a
computer every 60 seconds we sometimes get this kind of values:

Current PercentProcessorTime: 2134687500, (UINT64)
Previous PercentProcessorTime: 555334062500, (UINT64)
Subtraction: -5.531994e+011, (long double)

Current Timestamp_syn10n: 128523767044700060, (UINT64)
Previous Timestamp_syn10n: 128523757912265245, (UINT64)
Subtraction: 9.132435e+009,(long double)

Result CPU is: 5900% (Int)


As you can see, the previous value is much greater than the current one.
This should be impossible but it happens (we don’t know how to reproduce this
problem because this happens 1 or 2 times a day).

The machine where we obtain the data it is a machine with Dual Processor
with Windows XP sp2 operating system (Spanish version). Did you know this
bug (because I suppose this is a bug)? Any ideas about what can look for to
give you more information about the “bug”?

Regards,
Tango
date: Wed, 16 Apr 2008 01:13:00 -0700   author:   Tango am

RE: Wrong CPU percentage   
Hi Tango,

Can you send an email to jetan@online.microsoft.com(remove "online.")? This 
will enable us to discuss this issue more efficiently. Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and 
suggestions about how we can improve the support we provide to you. Please 
feel free to let my manager know what you think of the level of service 
provided. You can send feedback directly to my manager at: 
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to 
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues 
where an initial response from the community or a Microsoft Support 
Engineer within 1 business day is acceptable. Please note that each follow 
up response may take approximately 2 business days as the support 
professional working with you may need further investigation to reach the 
most efficient resolution. The offering is not appropriate for situations 
that require urgent, real-time or phone-based interactions or complex 
project analysis and dump analysis issues. Issues of this nature are best 
handled working with a dedicated Microsoft Support Engineer by contacting 
Microsoft Customer Support Services (CSS) at 
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
date: Tue, 22 Apr 2008 03:43:12 GMT   author:   (Jeffrey Tan[MSFT])

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us