diff options
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/cli.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/api/cli.md b/doc/api/cli.md index 61e833b878d..9c40dc51594 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -223,6 +223,19 @@ reference. Code may break under this flag. added: v12.0.0 --> +Enables a signal handler that causes the Node.js process to write a heap dump +when the specified signal is received. + +```console +$ node --heapsnapshot-signal=SIGUSR2 index.js & +$ ps aux +USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND +node 1 5.5 6.1 787252 247004 ? Ssl 16:43 0:02 node --heapsnapshot-signal=SIGUSR2 index.js +$ kill -USR2 1 +$ ls +Heap.20190718.133405.15554.0.001.heapsnapshot +``` + ### `--heap-prof` <!-- YAML added: v12.4.0 |