Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-07-2009, 07:55 AM   #1
LQ Newbie
Registered: Sep 2009
Posts: 2

Rep: Reputation: 0
Get max memory usage by process ?

I have some issue with a process: it use to much memory.
I am trying to reduce its usage by change parameters and I would like to get the max memory usage.
DO you know how can I get that ?

top and htop do not show me that, as it is only instant usage, and refresh all x seconds. I will miss the memory spike.


Old 09-07-2009, 03:14 PM   #2
Registered: Feb 2008
Location: Rome, Italy
Distribution: OpenSuSE 11.x, vectorlinux, slax, Sabayon
Posts: 206
Blog Entries: 2

Rep: Reputation: 45
I also don't know a specific method to track memory spikes, other than having instruments sampling more often. You could play with ps options and make it run, say, very often to print a specific process' memory utilization to a file.

Another option, is to use the command ulimit (run it from the command line) to limit the maximum memory usage for a process. If you set it to a certain value and you find your program crashing, it is because the program exceeded this limit.
Old 09-08-2009, 07:42 AM   #3
LQ Newbie
Registered: Sep 2009
Posts: 2

Original Poster
Rep: Reputation: 0

I am looking to output the ps command frequently.
A friend spot out that time could fit this usage. I am currently trying to find out how it works.

Old 09-08-2009, 08:06 AM   #4
Senior Member
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Maybe a look at the systat family might help

It includes a programm that collects statistics about single processes. pidstat its name


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory Usage at its max but box not doing anything? keysorsoze Linux - Hardware 5 01-29-2008 04:45 PM
How can I set CPU max % usage for a process ? lapin3000 Linux - Software 3 12-01-2007 07:51 PM
how to find max memory usage for process in Linux by command line kashameni Linux - Newbie 9 06-01-2007 01:39 AM
resources: how to limit process to max. 20% CPU usage alesz Linux - Software 4 03-30-2006 02:49 PM
What is the max memory a process can use? shelby Linux - Hardware 1 04-27-2004 12:05 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:58 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration