Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 1
    This would dump a whole lot of numbers to the screen every two seconds. How could you modify this to give the user the peak RAM usage, which is what they are actually asking about?
    – Kusalananda
    Commented Feb 6, 2023 at 10:13
  • Also note that the question is about a process tree (i.e. a process and all its children and descendants), not about a single process.
    – CAFxX
    Commented Feb 6, 2023 at 13:36
  • @CAFxX If you are talking about valgrind, see my edit. To measure all the descendants you simply add the --trace-children=yes parameter. The Kusalananda comment was before I added the valgrind information.
    – tukan
    Commented Feb 6, 2023 at 14:05