

You can download the check_mem.pl and configure with NRPE daemon. Monitor Memory UsesĪ Nagios plugin is available to monitor memory uses on Linux systems.

The requests go to the remote host and the NRPE server checks for the command defined as check_load and execute it. Let’s verify the configuration by running the check_nrpe command from the Nagios serverĪs per the above screenshot, the Nagios server sent NRPE requests to the defined host (192.168.1.15) to execute command check_load and send results back. 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.Command =/ usr/ lib/ nagios/ plugins/ check_load - w 15, 10, 5 - c 30, 25, 20 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 Using a SQLite GUI can be a more convenient to explore and query the database (e.g. $ 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.
