Operating System - Linux
1828046 Members
1690 Online
109973 Solutions
New Discussion

what command can show the memory be used by certain process?

 
SOLVED
Go to solution

what command can show the memory be used by certain process?

are there some one available?

thanks
frederick
8 REPLIES 8
Vernon Brown_4
Trusted Contributor

Re: what command can show the memory be used by certain process?

The top command will show the top processes. Memory usage is among the things it shows.

Just enter top from the command line.

Vern

Re: what command can show the memory be used by certain process?

Dear vern, i have tried the top command, but seems it is hard to tell me clearly, there is any other else?

thanks,
Frederick
Martin P.J. Zinser
Honored Contributor

Re: what command can show the memory be used by certain process?

Hello Frederick,

what exactly are you interested in? %MEM in top shows the percentage of physical memory a process uses. There are a number of other metrics available in top, but to get the most appropriate you would need to be more specific. There are also additonal fields available for display that can be selected interactively. Check man top for details.

top is good for on-line interactive checking if you do have other objectives please clarify.

Greetings, Martin
Vernon Brown_4
Trusted Contributor

Re: what command can show the memory be used by certain process?

There's one if you like the Gnome GUI.

Gnome destop has a system monitor. You can get to it by clicking the Gnome button > system > more programs > system monitor.

Vern

Re: what command can show the memory be used by certain process?

Dear Martin,

As what my said before, that my system will almost run out my RAM in several days, furthermore, even if I close the application at that time, only few RAM (may be one third) can be freed. So I want to have a look, what process do occupy me memory? whether some application can not release their memory after references? the top command seems do the CURRENT call process nor the static.

rgds,
Frederick
dirk dierickx
Honored Contributor
Solution

Re: what command can show the memory be used by certain process?

try this command: 'ps -eo cmd,pid,user,pmem,rss,sz'
it should give you plenty of information regarding memory usage of processes.
Mark Grant
Honored Contributor

Re: what command can show the memory be used by certain process?

What application do you run?

You mind find that is shared memory that is eating your RAM.

"ipcs -m" will show you whose using shared memory and how much.
Never preceed any demonstration with anything more predictive than "watch this"
Claudio Cilloni
Honored Contributor

Re: what command can show the memory be used by certain process?

'top' can sort its process list by memory usage (high usage first). hit 'M'.

I think it is absolutely normal to find all your RAM used after some time of activity. Remember that RAM contains not only processes, but other things like disk cache buffer; and not all processes shrink their memory occupation when they need less memory space; they will reuse the allocated space later, when needed.

Ciao
Claudio