Can't find Enterprise Library Caching Counters in PerfMon

Topics: Caching Application Block , Logging Application Block
Aug 2, 2007 at 5:24 PM
I have a windows service using the caching block to act like a cache server, it runs nicely and I would like to monitor it. So I add the config as below to my exe.config and restart the service.
<instrumentationConfiguration performanceCountersEnabled="true"
eventLoggingEnabled="false" wmiEnabled="false" />

Then I go to the PerfMon and click add counter, but From the Performance object list I can't find the ELB caching counter category.

What I have done wrong here? Hope someone can give me some suggestion.

Thank you very much
Aug 2, 2007 at 6:01 PM

For Perf Counter or WMI instrumentation you need to install the enterprise library assemblies using installutil. You can use the "InstallServices.bat" batch file installed along with the binaries to install all the assemblies, or you can run installutil yourself.

There are some details about this on the "Instrumentation" topic in the integrated help.

Aug 3, 2007 at 8:57 AM
Edited Aug 3, 2007 at 9:25 AM
Thanks for your reply. I find the instrumentation help in the ELB help. And run the Install Instrumentation from the start menu which run the InstallServices.bat. After the installation, I can now see the Enterprise Library Cache Counter category from PerfMon. And can see the counter from the graph now. Though I haven't fully understand what they mean yet. I haven't used PerfMon before, will search online for some instructions. If you have any suggestion reading about the Performance Monitor, please let me know as well :-)

I have one questions here about which assemblies I need to register (currently I done all but might not necessary).
Let me explain how I developed my cache service:

1. I copied only the Core and Caching Block from the Enterprise Library source code to a different location in my pc, then build them. (This just for convenience for just keep the stuff we need and check in to source safe)
2. Implement our cache to use the assembly from step 1, and implement a windows service as host for the cache, build them
3. Add necessary configuration section in the windows service's exe.config, it originally only get the cache configuration section, now I add the instrumentation section in.
4. Use installService.bat to install ELB assembly and services, the installService.bat is under the original Enterprise Library folder in Programs, so it installed the original assemblies instead of those I build in step 1.
Then I also use installutil manually install the 3 ELB dlls from step 1 in my windows service folder :
5. Start the windows service, use web client to add and get data from the cache, and add counters in PerfMon

My question is, in step 4, can I just install that 3 dlls in my windows service folder? or I always have to install the ELB dlls in the original Enterprise Library folder under programs?

Thank you
Aug 3, 2007 at 12:49 PM

You can install either version, and you can install only the assemblies you need. Of course if you do the latter you'll have to run installutil yourself.

Aug 3, 2007 at 4:40 PM
Thank you very much, really appreciate your help :)