This page describes how process snapshots are generated and viewed.

Automatic Process Snapshot Generation

When a business transaction snapshot is triggered by periodic collection or by a diagnostic session, a ten-second process snapshot is automatically started. By default, the agent starts no more than two process snapshots per minute automatically, but this behavior is configurable.

You can also start process snapshots manually on demand. See Collect Process Snapshots Manually.

Configure Automatic Collection

You can configure automatic process snapshot collection using these settings:

  • processSnapshotCountResetPeriodSeconds: Frequency, in seconds, at which the automatic process snapshot count is reset to 0; default is 60 seconds.
  • maxProcessSnapshotsPerPeriod: Number of automatic process snapshots allowed in processSnapshotCountResetPeriodSeconds seconds; default is 2 snapshots.
  • autoSnapshotDurationSeconds: Duration of an automatically-generated process snapshot; default is 10 seconds.

To configure these settings, add them to the require statement in your application source code as described in Install the Node.js Agent. Then stop and restart the application.

Collect Process Snapshots Manually

If you want to generate some process snapshots now, you can start them manually.

  1. Navigate to the dashboard for the tier or node for which you want to collect process snapshots.
  2. Click the Process Snapshots tab.
  3. Click Collect Process Snapshots.
  4. If you are in the Tier dashboard, select the node for which you want to collect snapshots from the Node dropdown. If you are in the Node dashboard, you can only set up snapshot collection for that node.
  5. Enter how many seconds you want to collect process snapshots for this node. The maximum is 60 seconds.
  6. Click Create.

The agent collects process snapshots for the configured duration. Process snapshots that are started manually include an allocation call graph that shows how much memory has been allocated and not freed during the period recorded by the snapshot.