This page applies to an earlier version of the AppDynamics App IQ Platform.
For documentation on the latest version, see the 4.4 Documentation.


Skip to end of metadata
Go to start of metadata

The .NET Machine Agent takes machine snapshots to capture vital system data for Windows and IIS. Use these guidelines to tune the frequency the .NET Machine Agent takes machine snapshots in your environment.

To learn how to analyze machine snapshots in the Controller, see Machine Snapshots for .NET.

Default Settings and Configuration Considerations

By default the .NET Machine Agent takes machine snapshots under the following conditions:

  • Periodic collection: The agent takes one snapshot every 10 minutes.
  • Breached thresholds: The .NET Machine agent takes samples of machine statistics every 10 seconds within a 10 minute window. For each sample, the agent checks the CPU percent usage, the memory percent usage, and oldest item in the IIS application pool queue. The agent flags a sample as a violation when the current usage meets or exceeds one of the following thresholds:
    • CPU at 80% or higher

    • Memory at 80% or higher

    • IIS application pool queue item older than 100 milliseconds
    The agent takes a snapshot when it identifies 6 violations of a single type, such as CPU usage, within the window. The agent only takes one snapshot per window for breached thresholds.

With the default window size of 10 minutes and the violations per window of six, the sixth violation of a single type triggers a machine snapshot:

Before you change the machine snapshot settings, decide which configuration options work best for your environment.  The following questions and considerations should help you decide how to set your thresholds:

  • What percentage CPU or memory usage might flag the beginnings of an issue in your environment?
  • How long is too long for items to wait in the IIS queue?
  • Do you expect occasional CPU or memory spikes?
  • Are periodic collections every ten minutes frequent enough?
  • Make sure the value for violations is larger than the number of samples per window.

For example: If you decrease the window size to 60 seconds and take 6 samples per window, the agent takes samples at the same frequency as the default settings, once every 10 seconds. However you are likely to get more snapshots because the agent only takes one snapshot per window. If you set the violations per window to 5, the agent takes a snapshot any time half the samples in the window violate a specific threshold.

Configure machine snapshots for the .NET Machine Agent

Configure all instrumentation settings for the .NET Machine Agent in the config.xml file. See "Where to Configure Agent Properties" on Administer the .NET Agent.

  1. Open the config.xml file for editing as an administrator. See "Where to Configure Agent Properties" on Administer the .NET Agent.
  2. Copy the code block below to a child element of the AppDynamics Agent element. See AppDynamics Agent Element.

    <machine-agent>
    	<machine-snapshot enabled="true" window-size="600" samples-per-window="60" violations-per-window="6" max-percent-cpu="80" max-percent-memory="80" max-queue-item-age="100" periodic-collection="600" />
    </machine-agent>

    (info) If you have already customized the .NET Machine Agent, only copy the Machine Snapshot element and paste it as a child of the Machine Agent element.

  3. Edit the values for the Machine Snapshot element attributes:

    <?xml version="1.0" encoding="utf-8"?>
    <appdynamics-agent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    ...
     <machine-agent>
        <!--Configure machine snapshots-->
    	<machine-snapshot enabled="true" window-size="60" samples-per-window="10" violations-per-window="5" max-percent-cpu="80" max-percent-memory="80" max-queue-item-age="100" periodic-collection="600"/>
      </machine-agent>
    ...
    </appdynamics-agent>
  4. Save the config.xml file.
  5. Restart the AppDyanmics.Agent.Coordinator Service.