Problem with Windows Performance Counters

Started by DanG, September 27, 2011, 10:35:42 AM

Previous topic - Next topic

DanG

Hi,

For the following counter:
PDH.CounterValue('\Microsoft Dynamics AX Object Server(01)\ACTIVE SESSIONS')
I recieve an error: H_PdhCounterValue: PDH Error C0000BB8 in call to PdhAddCounter (The specified object was not found on the computer.)

The WinPerf agent is present (checked this with Tools/Info/Agent/Agent List

To double-check I tried another counter:
PDH.CounterValue('\Processor(_Total)\% Processor Time')
and it works.

However the above Dynamics counter does exist, I can set it through performance monitor. I check it using a dot net program that shows the following counters:
Microsoft Dynamics AX Object Server [MultiInstance]
    01
        TOTAL SESSIONS
        ACTIVE SESSIONS
        NUMBER OF CLIENT REQUESTS
        NUMBER OF CLIENT REQUESTS PER SECOND
        NUMBER OF SERVER REQUESTS
        NUMBER OF BYTES SENT BY SERVER
        NUMBER OF BYTES RECEIVED BY SERVER

What can I try next?

Regards,

Dan

Victor Kirhenshtein

Hi!

It's hard to tell anything without additional tests. I have found the following MS KB article: http://support.microsoft.com/kb/957841 but I'm not sure that this is the case. If I understand this article correctly, there is a bug when you can see counters, but cannot add them for collection. You wrote that you can see counters in perfmon - but can they be really added and data can be collected?
Also, try to run from server's command line:

nxget -w 30 -l windows_server_ip PDH.Objects

you should get list of PDH objects, with Microsoft Dynamics AX Object Server among them. Then, try to run

nxget -w 30 -l windows_server_ip "PDH.ObjectInstances(Microsoft Dynamics AX Object Server)" 

You should see the instance. And then

nxget -w 30 -l windows_server_ip "PDH.ObjectCounters(Microsoft Dynamics AX Object Server)"

Should show you list of counters.

Best regards,
Victor

DanG

Hi Victor,

The command "nxget -w 30 -l windows_server_ip PDH.Objects" does NOT return the "Microsoft Dynamics AX Object Server" object (it returns 67 other objects). I run it as Administrator with the same result.

If I use the "Reliability and Performance Monitor" software on the NetXMS server I do get to see the "Microsoft Dynamics AX Object Server" object. I can add counters from it (ex. ACTIVE SESSIONS) and the counters returns correct values. If I counted correctly there're 77 object to be seen, among them .NET CLR Data, .Net CLR Exception,...

NetXMS and the AOS are both running under Windows 2008 - 64 / SP2, however the AOS (Ax32Serv.exe *32) is a 32 bit application

To be complete (this might be related) I should add that I had to start the "Performance Counter DLL Host" on the AOS server to enable the "Reliability and Performance Monitor" to see the "Microsoft Dynamics AX Object Server" object.

Could it be 32 and 64 windows version related?

Regards,

Dan

Victor Kirhenshtein

Hi!

Yes, it looks like 32bit applications cannot access counters provided by 64bit DLLs and vise versa: http://support.microsoft.com/kb/891238. This problem also seems very similar: http://btsc.webapps.blackberry.com/btsc/search.do?cmd=displayKC&docType=kc&externalId=KB21534. You can test it by running 32-bit agent on machine with AOS and check available objects with nxget.

Best regards,
Victor

DanG

Hi Victor,

I can confirm the issue is 32/64 bit version related.
After installing the 1.1.4 Agent on the AOS server, nxget returns the Dynamics AX object.
The DCI is now working as well.

The thing to find out is how the Microsoft's "Performance Monitor" can gather both 32 and 64 bit objects at the same time.
Running the NetXMS 32-bit agent is probably not ideal, but for the meanwhile it will do the trick.

Regards,

Dan