Node.js CLI Performance & Profiling/Write heap snapshot on signal

Generate heap snapshots on demand.

Section: Memory, Profiling, and Coverage

Write heap snapshot on signal

bash
bash
node --heapsnapshot-signal=SIGUSR2 app.js
Explanation

Useful for long-running services where you want snapshots without stopping the process.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Memory, Profiling, and Coverage
Generate heap profile
Record heap allocation data.
OpenIn sheetbashsame section
Increase max old space size
Raise the V8 heap ceiling in MiB.
OpenIn sheetbashsame section
Generate V8 profile log
Record profiling output for CPU analysis.
OpenIn sheetbashsame section
Generate CPU profile
Collect a CPU profile for DevTools analysis.
OpenIn sheetbashsame section
Trace GC activity
Print V8 garbage collection events.
OpenIn sheetbashsame section
Write V8 coverage output
Collect coverage JSON into a directory.
OpenIn sheetbashsame section