memory usage log/graph?

Does anyone know of an easy way to track memory usage over time, just like CPU and bandwidth usage? I mean, something that'll let me know how much memory/swap I was using at the time of a surge in web traffic while I was sleeping.

I could probably do something like free -M >> logfile.log every few minutes using cron, and then write another script to analyze the resulting logfile. But there's got to be a more elegant solution than that! And I don't want to be staring at htop all the time.


3 Replies

Overkill, but meets your spec:

Wow, that does look like overkill! I'll look into it anyway. Thanks.

IMO, one of the more straightforward solutions is to use 'gnuplot'. This may get you started: … ht=gnuplot">

Hal Williams


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct