Linux find out what process are eating all memory and time allocated to process

by Vivek Gite on August 31, 2006 · 4 comments

Q. How do I find out what process are eating up all my memory. Is it possible to find out how long that memory has been allocated to particular process? How do I kill that process to free up memory?

A. You need to use the top command which provides a dynamic real-time view of a running system. It can display system summary information as well as a list of tasks currently being managed by the Linux kernel.

Simply type top command:
# top

top command will tell you the percentage of physical memory a particular process is using at any given time. As far as I know, there is no easy way that can tell how long that memory has been allocated.

You can also use ps command to get more information about process.
# ps aux | less

To kill process use kill command under Linux. Read man page of top and ls for more information.

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

{ 4 comments… read them below or add one }

1 Mahesh December 5, 2007

i want to find the process execution time in LINUX???

Reply

2 boopathi November 2, 2010

time(command) | grep user|cut -f 2

Reply

3 Tim June 26, 2008

I recommend using `htop’ instead of top to monitor processes. It’s much friendlier and easy to use, and allows you to do more. (It’s colorized too!)

It’s in the ubuntu repositories, I imagine you can install it easily for debian as well.

Reply

4 Ashish Jaiswal November 30, 2011

I prefer using atop.. which gives all the option network activity, disk activity and many more you can check in the man page of it

I dont know abt redhat and fedora but its there in ubuntu and debian repo

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 8 + 6 ?
Please leave these two fields as-is:
Solve the simple math so we know that you are a human and not a bot.



Previous post:

Next post: