Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanner Stirrat <tstirrat@gmail.com>2019-07-18 22:36:12 +0300
committerRich Trott <rtrott@gmail.com>2019-07-20 22:38:18 +0300
commit4fbefc4283592e13d50888d9a1a62bb0c2f3356b (patch)
tree5030a9c613f8f634e43cb0d7734babdc826ecb30 /doc/api/cli.md
parent6c075238b0f1019f38a56d6a93f6f7b0f3eeeda0 (diff)
doc: add information for heap snapshot flag
It's nice to have usage examples, especially since the flag requires the `SIG` version of the signal name, unlike `kill`. PR-URL: https://github.com/nodejs/node/pull/28754 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'doc/api/cli.md')
-rw-r--r--doc/api/cli.md13
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