performancecounter - "Category does not exist." Creating performance counter for MSMQ Queue -
I am trying to:
using System.Diagnostics; // ... var queueCounter = new PerformanceCounter ("MSMQ queue", "message in queue", @ "machinename \ private $ \ testqueue2"); Console.light line ("qi contains {0} messages", queueCounter.extValue (). ToString ());
that came from this post:
This error is mentioned, but there is no resolution when using PerformanceCounter.
I also mentioned here:
However, this thread began on this exact topic, but before answering the preliminary question on what to do about the error, a Got another direction Actually I do not need to know the records per second, I just need to know when the back line of the queue is starting.
What is the reason for this error? I have tried to point out to the private and public queue as well as the messages pointing to the queue which was a message to them.
Edit: I've added Perfmum to ensure the path and queue name in the server correctly. / P>
OK ... put it The queue names did not include the fully qualified names of the machine name they were running. I found out this by using PerformanceCounterCategory.GetInstanceNames (). This gives you the correct name of the queue Fixed display was new to using the final constructor of the controller which lets you specify the name of the machine. I have a specified queue name machine name, but the name of the machine is fully qualified:
New displayconverter ("MSMQ Qi", "Message in Queue", @ "Machine Name> Personal $ \ Dispatch ", @" & lt; fully qualified machine name ";))
Comments
Post a Comment