Score:0

Getting aggregate memory usage of a Linux process?

ng flag

How is it possible to aggregate memory usage of a Linux process and all its children in human readable format?

I tried this link and even using cat /proc/$pid/status but the latter had 18GB of VirtualMemory for chrome on my machine which only has 12GB of RAM (I know it is virtual and can be higher than physical RAM amount). But I need to know the physical memory usage of all chrome instances at once and at the moment.

user10489 avatar
in flag
You could create a cgroup for it, and either start it in the cgroup or move the process and all its children into the cgroup after the fact. Then the cgoup will keep track of aggregate max RSS. (A full answer for this should include how to create the cgroup and read out the details.)
Masked Man avatar
ng flag
@user10489 I prefer an approach with available commands and tools, not a custom homemad. In windows it's very easy and intuitive on its own system monitor.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.