Score:0

Is there a utility to monitor memory for processes over time?

cn flag

This question has been asked in different ways over time. Specifically, given current versions, I'd like to chart memory usage of processes over time, ideally in comparison with other processes.

Use case: With regular updates I'll reboot my Ubuntu systems once every couple weeks - a required process for which Linux fans used to mock Windows users. If I don't restart for maybe three weeks or a month, the system eventually becomes inaccessible, with the console reporting out of memory conditions. To determine which process(es) is/are responsible for this I want to see which processes consume and then do not release memory. A graph should show at least one process with an average consumption that is greater than its release - until memory is exhausted. That is - a line graph should should show one or more processes continuing to go up from one reboot to the next.

I understand that I can craft a solution with RRDtool, pidstat, ps in a cron, etc. Before I create a DIY project I'd like to know if there is an existing tool that already does this. I have to believe there is. Of course if I have to create it, I'll FOSS it. Thanks.

Nmath avatar
ng flag
Is sounds like you have a memory leak. Opening a resource monitor when you're out of memory should be sufficient to diagnose this problem
heynnema avatar
ru flag
What version Ubuntu? Edit your question and show me `free -h` and `sysctl vm.swappiness`. Start comments to me with @heynnema or I'll miss them.
cn flag
@Nmath Yes, there is certainly a memory leak. However, by the time I'm aware of the problem the system is locked and I can't do diagnostics. This is why I'm asking if there is a known utility for logging memory consumption over time so that I can find out after the fact which process(es) may be at fault.
cn flag
@heynnema The version is "current and fully updated", but this is not relevant as I'm looking for a specfic kind of utility as a long term solution to this problem and others, and not a diagnostic technique for this one problem. As noted above, by the time I'm aware of the problem the system is locked and I can't do diagnostics. This is why I'm asking if there is a known utility for logging memory consumption over time so that I can find out after the fact which process(es) may be at fault.
heynnema avatar
ru flag
Well, you could answer my simple three questions, or blow me off. But the questions directly relate to the problem that you're having. I **still** need to know Ubuntu version, `free -h`, and `sysctl vm.swappiness`. I'm not personally aware of an application that you request.
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.