Visit Our UNIX and Linux User Community


Which process was consuming most memory in the Past?


 
Thread Tools Search this Thread
Operating Systems AIX Which process was consuming most memory in the Past?
# 1  
Old 07-03-2013
Which process was consuming most memory in the Past?

Hello

There are options / commands to check which process is consuming maximum memory

However is there any command/mechanism which will tell us which process was consuming maximum memory in specific time interval in the past?

I heard nmon report can help in this regard.

is there any other option available?

Thanks and Regards
Chetanz
# 2  
Old 07-03-2013
Output from ps is normally good. Try :-
Code:
ps -el|sort -n +9
ps -el|sort -n -k10

Depending on your operating system and version, the sort will probably fail on one of these two. Process id is usually in column 3. If this looks totally useless, try getting the column headers and adjusting the column sorted on:-
Code:
ps -el|head -5


I hope that this helps.

Robin
Liverpool/Blackburn
UK
# 3  
Old 07-03-2013
Once a process exits, the information about its memory usage goes away, unless you have been monitoring it and storing the result in a file. There is no default performance history unless YOU create it as it happens. YOU get to provide timestamps to that data as well. There are lots of good, free monitoring tools.

rbatte1's result works correctly. But only for processes that have not yet exited. So if you have a long running process that has a lot of memory allocated, it will show.
# 4  
Old 07-03-2013
Quote:
Output from ps is normally good. Try :-

Code:
ps -el|sort -n +9ps -el|sort -n -k10

Depending on your operating system and version, the sort will probably fail on one of these two. Process id is usually in column 3. If this looks totally useless, try getting the column headers and adjusting the column sorted on:-

Code:
ps -el|head -5


I hope that this helps.

Robin
Liverpool/Blackburn
UK

Hello Robin,

I have just tried the following command and I am NOT able to see any CPU utilization column there, could you please help in same.


Code:
$ ps -el|sort -n +9
       F S   UID      PID     PPID   C PRI NI ADDR    SZ    WCHAN    TTY  TIME CMD


Thanks,
R. Singh
# 5  
Old 07-04-2013
@Ravinder
The thread is about memory and not about CPU. Use other switches for ps to see CPU usage statistics.
If your question is not related to the topic of the thread, open up your own thread, thanks.

@Chetanz
Why not use nmon? It is really helpful collecting your performance stats and easy to set up. With nmon2rrd you can create graphs from the collected data.

nmon
nmon2rrd

Last edited by zaxxon; 07-04-2013 at 02:57 AM.. Reason: added info
# 6  
Old 07-04-2013
For monitoring: nmon (1..10), xymon (10...100), nagios (50...) (number of monitored systems)
For an ad-hoc snapshot and debugging, I suggest the Posix format where you can specify the columns.
Examples for top 3 memory consumers:
Code:
ps -eo pid,rss,vsz,comm | { IFS= read line; echo "$line"; sort -nrk2; } | head -4
ps -e -o pid= -o rss= -o vsz= -o comm= | sort -nrk2 | head -3

This User Gave Thanks to MadeInGermany For This Post:

Previous Thread | Next Thread
Test Your Knowledge in Computers #268
Difficulty: Easy
In 1936, Turing published his paper 'On Computable Numbers, with an Application to the Entscheidungsproblem'. In this paper, Turing reformulated Kurt Godel's 1931 results on the limits of proof and computation, replacing Godel's universal arithmetic-based formal language with the formal and simple hypothetical devices that became known as Turing machines.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Finding the most memory consuming processes in Linux

Platform: Oracle Linux 6.4 To find the most memory consuming processes, I tried the following 2 methods 1. Method1 # ps aux | head -1 ; ps aux | sort -nk +4 | tail -7 USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 95 0.0 0.0 0 0 ? ... (2 Replies)
Discussion started by: kraljic
2 Replies

2. Shell Programming and Scripting

Discrepancy in finding the top memory consuming processes

When I run 'top' command,I see the following Memory: 32G real, 12G free, 96G swap free Though it shows as 12G free,I am not able to account for processes that consume the rest 20G. In my understanding some process should be consuming atleast 15-16 G but I am not able to find them. Is... (1 Reply)
Discussion started by: prasperl
1 Replies

3. AIX

Process ids consuming huge resources ?

Hi All what is the command to check process ids , which are running from long time and which are consuming more cpu? Also how to check, what a particular PID is running what For Ex: i have a pid :3223722 which is running since from long time, if i want to check what is this... (1 Reply)
Discussion started by: sidharthmellam
1 Replies

4. UNIX for Advanced & Expert Users

Memory and CPU utilization for past period

Hi All, We have a Linux (RHEL5) server hosting Oracle database. Usually, Memory utilization will by 50 % and CPU utilization will be 20%. In the last three days, volume of load was high and now back to normal. Is it possible to check the Memory (RAM) utilization and CPU utilization in %... (1 Reply)
Discussion started by: user7509
1 Replies

5. Solaris

Help to trace process consuming more space

Hi all, We have a server having much processes running. It is very difficuilt to trace the exact consuming more memory. Howerver, it shows CPU usage in sequence but how memory? Tried working with TOP command. Please let me know if something not clear. Thanks, Deepak (5 Replies)
Discussion started by: naw_deepak
5 Replies

6. AIX

Command to find TOP 5 Memory consuming process

HI All, Can anyone send me a command to find TOP 5 Memory consuming process. It would be lelpful if I get output something like below processname - pid - memory(in MB) - command I tried few commands from the internet but the result only give the real memory usage or pagging, I want total... (4 Replies)
Discussion started by: bce_groups
4 Replies

7. AIX

Process consuming most memory

How can i find the processes that is consuming most memory? I tried TOPAS and SVMON and this didn't gave me the desired result. (1 Reply)
Discussion started by: shabu
1 Replies

8. Programming

How system deamons consuming less memory

Dear all, When I write the daemon programs it is consuming high memory and processor time. How can I avoid this? But, the system daemons are not consuming more. How? Can any one explain how the system daemons are handling the memory consumption and processor time. Thanks,... (1 Reply)
Discussion started by: nagalenoj
1 Replies

9. UNIX for Dummies Questions & Answers

How ti kill a process which is consuming so much time

There is a process which is consuming too much time.. how to find that process and kill it. (3 Replies)
Discussion started by: shreenivas
3 Replies

10. Programming

Help -fwrite consuming lot of memory !!!

Hi , I am running a C/C++ program on a solaris 5.8 machine. This parituclar application has a module which saves data to a file. The module uses fwrite() function to save data. The fwrite function write about 500 MB of data to a file. The problem which I am facing is, the memory consumtion... (2 Replies)
Discussion started by: ajphaj
2 Replies

Featured Tech Videos