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.
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
processSnapshotCountResetPeriodSecondsseconds; 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.
- Navigate to the dashboard for the tier or node for which you want to collect process snapshots.
- Click the Process Snapshots tab.
- Click Collect Process Snapshots.
- 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.
- Enter how many seconds you want to collect process snapshots for this node. The maximum is 60 seconds.
- 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.