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. See Machine Snapshots for .NET.

Default Settings and Configuration Considerations

By default, the .NET Machine Agent takes machine snapshots under these 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 the 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 these 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 ten minutes and the violations per window of six, the sixth violation of a single type triggers a machine snapshot:

Machine Snapshot

Before you change the machine snapshot settings, determine which configuration options work best for your environment. Use these questions and considerations to help determine your threshold settings: 

  • 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 six 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 five, the agent takes a snapshot any time half the samples in the window violate a specific threshold. See .NET Agent Configuration Properties.

Configure Machine Snapshots for the .NET Machine Agent

Configure all instrumentation settings for the .NET Machine Agent in the config.xml file:

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

    	<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" />

    (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="" xmlns:xsd="">
        <!--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"/>
  4. Save the config.xml file.
  5. Restart the AppDynamics.Agent.Coordinator service.