25

I am familiar with several commands like top, htop, free, etc. However, is there a command to see the peak/burst memory usage of the entire server (not individual processes) over, say, the last 30 days/24 hours/etc.?

Michael Yaeger
  • 351
  • 1
  • 3
  • 7

2 Answers2

8

atop tracks historical metrics and is command line based.

It's packaged in Debian/Ubuntu and Fedora.

https://www.atoptool.nl/index.php

mpe
  • 286
  • 2
  • 2
  • 1
    It's not obvious how to use this `atop` tool to track memory usage OVER TIME. It just shows a big list of processes and their current memory use. – Michael Currie Jan 21 '23 at 08:09
7

You'll need to collect these metrics.

Sysstat may do this assuming you can define a couple crontabs.

Note that tools such as Munin or Collectd are a couple popular solutions that would allow you to do this (while I wouldn't recommend Statsd/Graphite to newcomers, if at all).

Monitoring solutions such as Cacti, Zabbix, Nagios (with perfdata, such as Icinga or Shinken), or SNMP-based would also allow you to generate graphs from collected metrics.

We could also mention Netdata: even though that one won't keep histories, it's still pretty helpful graphing instantaneous resources usages.

SYN
  • 2,793
  • 12
  • 19
  • 2
    [Here's a fairly comprehensive list of metric collections tools.](http://graphite.readthedocs.io/en/latest/tools.html) I believe StatsD and collectd are two of the more popular ones. – jayhendren Dec 21 '16 at 20:06
  • 2
    Thanks, but I'm looking for "a command" (i.e. CLI), not GUI. Is there an equivalent? I'm fine with collecting metrics and saving them, but I just want the data, not all the fluff. – Michael Yaeger Dec 22 '16 at 18:42