Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Anchor
AboutConfigPrecise
AboutConfigPrecise
About configuring Precise for Microsoft .NET

...

Tracking instrumentation activity is subject to the following limitations:

  • Only the Microsoft .NET version 1.1, 2.0, 3.0, and 3.5 versions 3.0, 3.5, 4.0, 4.5, 4.62, and 4.7 Frameworks are supported.
  • The time resolution (granularity) of the tracked activity is approximately 16 milliseconds.
  • Certain system DLLs that are part of the Microsoft .NET infrastructure cannot be instrumented. It is strongly recommended not to add an additional system DLL to the DLL list without first contacting Precise Technical Support.

    Info

    All system DLLs that are discussed, are safe for instrumentation.

  • Generated Microsoft .NET wrappers for COM+ components that are produced by Microsoft .NET Framework SDK utilities (such as TLBImp) cannot be tracked.
  • "Pre-Jitted" assemblies cannot be instrumented because they were compiled beforehand. For example, the System.Windows.Forms.dll is pre-jitted in the Microsoft .NET framework.

...

The Instrumentation.xml file is located in the <i3_root>\products\dotnet\config directory. It contains the following major section: Instance-specific section.

Following is an example of the file structure:

...

The file consists of the following subsections:

  • DLL list: . A list of DLLs to be instrumented and specific configuration rules for each DLL. If the underlying process of the instance should be instrumented, it must be mentioned explicitly.
  • Common instrumentation rules (“instrument”"instrument") for the whole DLL list.
  • Common exclude rules (“ignore”"ignore"). Following is an example of the file structure:

...

In the following example, all DLLs with the prefix “Pet” "Pet" are instrumented and tracked, regardless of their path. Likewise, for the classes with the prefix “Pet”, "Pet" all methods are instrumented and tracked.

...

Table 13-1 Instrumentation file tags

Tag nameDescriptionComment
instrumentation-config

The top level XML tag.

 

instances

The list of instances to be instrumented.
 

instance name (attribute)

The logical name of the instance.
 

instance tracker (attribute)The tracker DLL's reference to use.Optional tag.
dllsThe list of DLLs to be instrumented when loaded by this instance.Without a list of DLLs, all loaded DLLs should be instrumented.
dll name (attribute)The name of the DLL.Pattern match (for example Company.GUI.*) If the main module of the process must also be instrumented, the process name should be added explicitly to this DLL list.
dll path (attribute)The path of the DLL.

Pattern match. Optional tag. Without this tag, all DLLs with the indicated name are instrumented.

dll version (attribute)The version of the DLL.

Pattern match. Optional tag. Without this tag, all DLLs with the indicated name are instrumented.

instrumentThe include list for instrumentation.
 

interfacesList of interfaces to be instrumented.All classes that implement these interfaces must be instrumented.
interfaceA specific interface (item in the interfaces list).
 

classesThe list of classes to be instrumented. Also classes that inherit from these classes must be instrumented.The same syntax as the interfaces section.
class

A specific class (item in the classes list).

 


name (in interface/class section)The specific name of the interface/class.Pattern match. (for example, using * as the name indicates all names in this context)
caller-method

The list of methods to be instrumented on the callee side.

 

methods

The beginning of the list.

 


method

The description of a specific method (within the classes/interfaces context).

 


typeThe type of method invocation.Optional tag (the default is Custom). Specified in the default-inst-config.xml file.
name (of method)The specific name of the method.Pattern match (for example, using * as the method name indicates all methods in this context).
params

The list of parameter types.

 


param

A specific parameter type.

 

all-calls-to-methodThe list of methods to be instrumented on the caller side.The same syntax as the caller-method section.
ignoreThe exclude list for instrumentation.The syntax of this section and its subcomponents is identical to the instrument section.

About instrumenting DLLs from the GAC

...

The ASP.NET DLLs are typically loaded from a special temporary directory, such as:

C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\mspetshop\c73f3fa0\1ae4c2f3\assembly\dl2\bee75c45\aa2e9da0_9807c501)

As in the case of the GAC, to instrument such DLLS, do not specify the ASP.NET DLL path and only use the DLL name.

...

The Microsoft .NET AppTier Collector agent is designed to report only when a complete sequence of method invocations has finished. To deal with this kind of scenario, the ignore tag is used in the default instrumentation file to exclude the instrumentation and the tracking of the main method.

...

  • The COM+ library components are executed and used as a library (DLL) in the context of an executable. The calls to the COM+ component methods look like other intra-process method calls.
  • The COM+ server components are hosted in an external COM+ container. A call from the COM+ component client (process) to the hosted COM+ component (external server process) is an inter-process call. In other words, activity exists in two different processes: the client-side process (caller-side) and the server-side process (callee-side).

To have the Microsoft .NET infrastructure reuse COM+ technology, perform the following tasks:

...

The callee-side Web service infrastructure (Web service server-side) is implemented in ASP.NET. In other words, tracking Web services in the called-side is covered by tracking Service Requests.
See “About About the instrumentation file” on page 151file.

The Microsoft .NET framework contains comprehensive support for Web service clients (caller-side). For example, Visual Studio.NET generates a proxy class code that wraps the calls to the underlying Web service (the generated class extends an appropriate base class, such as System.Web.Services.Protocols.SoapHttpClientProtocol).

Web services are tracked by default. The ability to track Web service calls for all instances relies on the following blocks, which are part of the default instrumentation file:

<dll name="System.Web.Services.dll" >
     <instrument>
          <classes>
               <class>
                    <name>System.Web.Services.Protocols. SoapHttpClientProtocol</name>
                    <called-method>
                    <methods>
                         <method type="WS">
                              <name>Invoke</name>
                         </method>
                         <method type="WS">
                              <name>BeginInvoke</name>
                         </method>
                         <method type="WS">
                              <name>EndInvoke</name>
                         </method>
                    </methods>
                    </called-method>
               </class>
               <class>
                    <name>System.Web.Services.Protocols. HttpSimpleClientProtocol</name>
                    <called-method>
                    <methods>
                         <method type="WS">
                              <name>Invoke</name>
                         </method>
                         <method type="WS">
                              <name>BeginInvoke</name>
                         </method>
                         <method type="WS">
                              <name>EndInvoke</name>
                        </method>
                   </methods>
               </called-method>
               </class>
          </classes>
     </instrument>
</dll>

About tracking the message queue API

To have Precise for Microsoft .NET track the usage of the Microsoft Message Queue API, you need to instrument the System.Messaging.dll file by manually adding the following blocks to the instrumentation block of the specific instance in the Instrumentation.xml file. Usually, it is sufficient to only instrument and track the methods Send and Receive to ensure that all appropriate Microsoft Message Queue call are tracked.

Info

...

The default instrumentation file for Precise for Microsoft .NET does not contain these blocks. To track Microsoft Message Queue calls, you must add these blocks manually.

To instrument Message Queue calls, insert the following section under instrumentation rules for the monitored instance in the instrumentation file:

<dll name="System.Messaging.dll">
     <instrument>
          <classes>
               <class>
                    <name>System.Messaging.MessageQueue</name>
                         <called-method>
                              <methods>
                                   <method>
                                        <name>Send</name>
                                   </method>
                                   <method>
                                        <name>Receive</name>
                                   </method>
                                   <method>
                                        <name>BeginReceive</name>
                                   </method>
                                   <method>
                                        <name>EndReceive</name>

...

                                   </method>
                              </methods>
                         </called-method>
               </class>
          </classes>
     </instrument>
</dll>

Anchor
AboutActivityCollectorFile
AboutActivityCollectorFile
About the ActivityCollector.xml file

The ActivityCollector.xml file is the main configuration file of the Microsoft .NET AppTier Collector agent that gathers activity information. It is composed of the following logical sections:•    Aggregator

  • Aggregator settings

...

  • . Contains the settings that are grouped under the aggregator tag.

...

  • Tracker settings

...

  • . Contains the settings that are grouped under the tracker tag.

The Aggregator settings sections are read when the Collector agent is loaded. Therefore, if you modify these sections, you must restart the Collector agent through Precise Agent Installer or by restarting the Precise for Microsoft .NET Collector service using the Services window.

The Tracker settings are read when the tracked Microsoft .NET instance (that is, the underlying Microsoft .NET-based process) is loaded. Therefore, if this section is modified, you must restart the Microsoft .NET instance (the underlying process). For the ASP.NET instance, you should run the IISRESET command.

The ActivityCollector.xml file is located in the <i3<i3_root>root>\products\dotnet\config directory. Its settings affect all instances on the monitored server.

If you need to define instance-specific settings, for example for the Tracker threshold, place a copy of this file in the <i3<i3_root>root>\products\dotnet\config\instance name directory and modify the settings as required.

The Aggregator and Tracker settings in this file then overrides the settings that are specified in the file that is located in the parent directory.

Example of the ActivityCollector.xml file

The following is an example for the ActivityCollector.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<activity-collector-config>
     <!-- psdn_dncol_act.exe configuration, configurable per server(default) & per instance -->
     <aggregator>
          <topnsql>5</topnsql><!-- Top N SQL statement to monitor -->
          <sla>5000</sla><!-- Red SLA breach value for top http invocations in msec. -->
          <nearsla>1000</nearsla><!-- Yellow SLA breach value for top http invocations in msec. -->
          <insane-rt>300</insane-rt><!-- Long running thread timeout in seconds -->
          <!-- The following two items are related to the Insight Smartlink feature and should not be altered by the user manually -->
          <bit-vector>false</bit-vector>
          <last-level-bit-vector>false</last-level-bit-vector>
     </aggregator>
     <!-- Tracker.dll settings, configurable per server (default) & per instance -->
     <tracker>
          <threshold>50</threshold><!-- Threshold in msec for filtering out events before forwarding it to the collector. -->
     </tracker>
</activity-collector-config>

About the ActivityCollector.xml file tags

The following table describes the important tags in the ActivityCollector.xml file. You may modify these tags only. It is not recommended to modify any other tags.

Table 13-2    Collector 2 Collector configuration file tags

Tag

...

nameDescription
activity-collector-

...

configThe top-level XML tag.
Aggregator

...

The top-level definitions for the Collector agent’s aggregator.

...

TopnsqlThe top number of SQL statements to monitor.

...

SlaThe SLA (red) value (in milliseconds) for ASP.NET instance URLs.
nearsla

...

The Near SLA (yellow) value (in milliseconds) for ASP.NET instance URLs.
insane-

...

rtThe timeout value for long running threads/URLs. A method or URL that is longer than this threshold is not collected.

...

trackerSpecific definitions for the tracker.
threshold

...

The threshold (in milliseconds) for filtering events before they are forwarded to the Collector agent.

Anchor
DefineDLLs
DefineDLLs
Defining the DLLs to be monitored by using the Detection agent

A Microsoft .NET instance consists of the DLLs that make up your Microsoft .NET application. For Precise for Microsoft .NET to monitor a Microsoft .NET instance, you must first define the DLLs that you want to monitor.

You can use the Detection agent to detect all relevant DLLs that are currently running in the background. Using the Detection agent involves manually modifying the instrumentation configuration file.

To detect the DLLs currently running by using the Detection agent1.    Verify

  1. Verify that your Microsoft .NET application is running.

...

  1. Open the command prompt window.

...

  1. Change directory to the <i3_root> directory.

...

  1. Run the following command:

...

    • Microsoft .NET Framework version 1.1.
      products\dotnet\install\psdn_detect_dlls.exe /im image name /f filter file name

...

    • Microsoft .NET Framework version 2.0 and 3.0.
      products\dotnet\install\FW2.0\psdn_detect_dlls.exe /im image name /f filter file name

    where the parameter values should be set as follows:

    • image

...

    • name

    If this is an ASP.NET instance , the name of this executable depends on the Internet Information

...

  1. Server (IIS) type.

...

        • IIS 6: w3wp.exe

...

        • IIS 7: 

    If this is a regular .NET instance , the image name is the name of the .NET executable (without the path).

    • filter file

...

    • name

    The path and name of the file that lists the modules to be filtered out, as follows:
    products\dotnet\install\dlls_filter.xml

    As alternative to this step, you can also use the Process Explorer. See http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx.

...

  1. Save the XML output of the command to a temporary file.

To define the DLLs in the instrumentation file1.    Open

  1. Open the following file in an editor:
    <i3_root>\products\dotnet\config\instrumentation.xml

...

  1. Within the XML output that you saved in step 5 above, locate the <module name> tag for a DLL file you want to instrument and copy the file name.
    For example, if you want to instrument the file petshop.web.dll, copy its name from the line <module name="petshop.web.dll">.

...

  1. In the instrumentation file, paste the name of the DLL file into the entry for the instance that you want to monitor.
    For example:
    <instances>
         <instance name="AspNetIIS6" >
              <dlls>
              <dll name="petshop.web.dll"/>
              ...
              </dlls>
         </instance>
    </instances>

...

  1. Repeat step 2 and step 3 for each DLL file that you want to instrument.

...

  1. Restart your Microsoft .NET application for the changes to take effect.

Anchor
InvokingInstrumentationDriverUtility
InvokingInstrumentationDriverUtility
Invoking the Instrumentation Driver utility

The instrumentation process is the execution of a Collector agent, which reads the code (the DLLs) of your application and stores an instrumented version in the <i3<i3_root>root>\products\dotnet\cache\instr cache directory:

The contents of the cache can then be used for future invocations of your Microsoft .NET application, avoiding the time to re-instrument. The instrumentation process can last anywhere between a few minutes and an hour, depending on the size of the DLLs.

The instrumentation process consumes memory. The required memory for instrumenting a DLL is approximately 20 times the size of that DLL file. As a result, the startup of your Microsoft .NET application can be considerably slow.

The instrumentation is triggered when the Microsoft .NET application starts and one of the following criteria is applicable:.•    The

  • The .NET instance is installed for the first time.

...

  • A change is made to the instrumentation.xml file (the instrumentation configuration file).

...

  • A new code version is deployed on the monitored server.

To minimize the time it takes the Microsoft .NET application to start up, you can invoke a Precise for Microsoft .NET utility called Instrumentation Driver. The Instrumentation Driver populates the cache before it restarts the Microsoft .NET application.

Info

...

If the instance uses DLLs from several directories or several single DLLs, invoke the Instrumentation Driver utility several times using the appropriate directory or DLL names.

It is recommended to stop your Microsoft .NET application before you invoke the Instrumentation Driver utility. If you invoke the utility while the application is running, the instrumentation results are placed in the cache and used only during the next startup of the Microsoft .NET application.

If your application changes, for example because a new version is deployed, or if you modify the instrumentation.xml file, you can activate the Instrumentation Driver utility to recalculate the cache contents.

Info

...

The Instrumentation Driver utility may not calculate the cache contents for all DLLs that the application uses. These DLLs are only instrumented during the next startup of the Microsoft .NET application.

To invoke the Instrumentation Driver utility1.    After

  1. After the Microsoft .NET instance is installed, configure the DLLs, classes, and methods to be instrumented in the instrumentation.xml file.

...

  1. Open a command prompt window and run the following command:
         cd

...

  1. <i3_

...

  1. root>
         products\dotnet\bin\psdn_instr_validate.exe [-k instance-name]
         -f directory-name | -dll name [-gac]

...

  1. where:
    instance-name is the Microsoft .NET instance name, such as AspNetIIS5. If this parameter is omitted, the Instrumentation Driver works for all the Microsoft .NET instances that are installed on the monitored server. 
    directory-name is the name of the DLL directory of the Microsoft .NET instance to be instrumented. This is the location where you deployed your Microsoft .NET code. For example, a DLL for an ASP.NET application may be stored in:
          C:\Inetpub\wwwroot\MyWebApp\bin
    name is the name of a single DLL (without the path). If this DLL is located in the GAC, add -gac when running the command.

...


Scroll Ignore
scroll-pdftrue
scroll-officetrue
scroll-chmtrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-epubtrue
scroll-htmltrue
Newtabfooter
aliasIDERA
urlhttp://www.idera.com
 | 
Newtabfooter
aliasProducts
urlhttps://www.idera.com/productssolutions/sqlserver
 
Newtabfooter
aliasPurchase
urlhttps://www.idera.com/buynow/onlinestore
 | 
Newtabfooter
aliasSupport
urlhttps://idera.secure.force.com/precise/
 | 
Newtabfooter
aliasCommunity
urlhttp://community.idera.com
 
|
 
Newtabfooter
aliasResources
urlhttp://www.idera.com/resourcecentral
 | 
Newtabfooter
aliasAbout Us
urlhttp://www.idera.com/about/aboutus
 
Newtabfooter
aliasLegal
urlhttps://www.idera.com/legal/termsofuse
Precise. Performance intelligence from click to storage. Learn more > >

...