Page History
...
- About configuring Precise for Microsoft .NET
- About the instrumentation file
- About the ActivityCollector.xml file
- Defining the DLLs to be monitored by using the Detection agent
- Invoking the Instrumentation Driver utility
Anchor | ||||
---|---|---|---|---|
|
...
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 name | Description | Comment |
---|---|---|
instrumentation-config | The top level XML tag. |
instances | The list of instances to be instrumented. |
| The logical name of the instance. |
instance tracker (attribute) | The tracker DLL's reference to use. | Optional tag. |
dlls | The 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. |
instrument | The include list for instrumentation. |
interfaces | List of interfaces to be instrumented. | All classes that implement these interfaces must be instrumented. |
interface | A specific interface (item in the interfaces list). |
classes | The 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). |
type | The 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-method | The list of methods to be instrumented on the caller side. | The same syntax as the caller-method section. |
ignore | The 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:
...
<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 | ||||
---|---|---|---|---|
|
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:
...
Table 13-2 Collector configuration file tags
Tag name | Description |
---|---|
activity-collector-config | The top-level XML tag. |
Aggregator | The top-level definitions for the Collector agent’s aggregator. |
Topnsql | The top number of SQL statements to monitor. |
Sla | The SLA (red) value (in milliseconds) for ASP.NET instance URLs. |
nearsla | The Near SLA (yellow) value (in milliseconds) for ASP.NET instance URLs. |
insane-rt | The timeout value for long running threads/URLs. A method or URL that is longer than this threshold is not collected. |
tracker | Specific definitions for the tracker. |
threshold | The threshold (in milliseconds) for filtering events before they are forwarded to the Collector agent. |
Anchor | ||||
---|---|---|---|---|
|
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.
...
- Verify that your Microsoft .NET application is running.
- Open the command prompt window.
- Change directory to the
<i3_root>
directory. - 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 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.
- Microsoft .NET Framework version 1.1.
- Save the XML output of the command to a temporary file.
...
- Open the following file in an editor:
<i3<i3_
root>root>\products\dotnet\config\instrumentation.xml
- 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">
. - 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> - Repeat step 2 and step 3 for each DLL file that you want to instrument.
- Restart your Microsoft .NET application for the changes to take effect.
Anchor | ||||
---|---|---|---|---|
|
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_root>\products\dotnet\cache\instr
cache directory:
...
- After the Microsoft .NET instance is installed, configure the DLLs, classes, and methods to be instrumented in the instrumentation.xml file.
- Open a command prompt window and run the following command:
cd<i3_root>
products\dotnet\bin\psdn_instr_validate.exe [-k instance-name]
-f directory-name | -dll name [-gac]
Wherewhere:
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.
Precise. Performance intelligence from click to storage. Learn more > >
...
...