
If you're running Kernel 4.14+ you can get more advanced Linux memory usage metrics like Proportional Set Size (PSS), Unique Set Size (USS), proportional swap usage and others (see the documentation for what you can get from /proc/]įor me, it was important to have structured output so that I could more easily consume it for analysis. Procpath can also visualise RSS of the target process into an SVG out of the box like this: $ procpath plot -d tgt.sqlite -f tgt.svg -q rss -p $PID Stopped containers are excluded by default.

The final column, PIDS, is a count of the number of processes started by the container. When no limit is set, you’ll see the amount of RAM available on your host.

Using a SQLite GUI can be a more convenient to explore and query the database (e.g. The Memory column shows the live memory usage as well as the memory limit configured on the container. $ sqlite3 tgt.sqlite "SELECT ts, stat_rss * 4 rss_kib FROM record WHERE stat_pid = $PID" When you think it has recorded enough datapoints, Ctrl+C it and this will give you the recordings. By default it makes a recording per 10 seconds (for the target process, its ancestors and descendants). In the simplest case you point it to the PID of interest and let it record its Procfs metrics including Resident Set Size (RSS).

Yes, can achieve exactly this, a bit more with Procpath (author here). I want to monitor memory usage of a process, and I want this data to be logged.
