Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional documentation for heap snapshot flag #28754

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,18 @@ reference. Code may break under this flag.
added: v12.0.0
-->

Enables a signal handler that causes the node process to write a heap dump when the specified signal is received.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure the markdown linter will fail on this line because it is longer than 80 characters. Can you wrap it?

You can run the markdown linter locally with make lint-md (or, on Windows, vcbuild lint-md).

tstirrat15 marked this conversation as resolved.
Show resolved Hide resolved

```
tstirrat15 marked this conversation as resolved.
Show resolved Hide resolved
$ 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
Expand Down