[python-win32] Win32pdhutil - GetFormattedCounterValue while running python thu IIS

Thomas HERVE therve at neocles.com
Mon Mar 29 03:14:33 EST 2004


> Hi guys,

Hi, 

> I ve got a piece of script which basically retrieve the "Current 
Connections", given by the Web Service
> object. I am using Win32pdhutil and it works smoothly when i run the 
script locally.
> If i try to run thru IIS  as a cgi i ve got this message :
> 
> 
>   File 
"E:\PROGRA~1\Python22\Lib\site-packages\win32\lib\win32pdhutil.py", line 
59, in GetPerformanceAttributes
>     type, val = win32pdh.GetFormattedCounterValue(hc, format)
> pywintypes.error: (-2147481645, 'GetFormattedCounterValue', 'No error 
message is available')

First one tip to understand win32pdh error codes : 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/perfmon/base/pdh_error_codes.asp
-2147481645 ---> in hex = 0x800007D3. "The data item has been added to the query but has not been validated nor 
accessed. No other status information on this data item is available."
Of course here, it's not very useful...

> I guess it might be permissions error but cannot find out which one ...

I don't think it's permissions because pdh interface allow simple user to 
gather information. I think it's more a problem with the creation of you 
counter. If you can paste how you get the counterpath and how you add it 
it would be helpful.

> Any help will be highly appreciated .

I'll try to be better next time ;).

> Seb

--
Thomas




More information about the Python-win32 mailing list