How to check 'how much ram and cpu a process is consuming'

General support questions including new installations
Post Reply
DANNDP
Posts: 22
Joined: 2009/11/26 21:24:53
Contact:

How to check 'how much ram and cpu a process is consuming'

Post by DANNDP » 2010/03/19 18:35:51

Hello my friends,

I'm trying to check how much ram memmory and CPU is a particular process consuming, i have checked free -m and top but is not esay to undesrtand the output from CPU

What i need is to check the consuming for a particular process; with free -m i'm able to see only the available space of memmry and i want to know how much is consuming a particular process, the same with 'top'

It's hard ot understan the output from top, to many columns and MAY process, not easy to check the process i want to monitor

Thanks in advance for your help

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

How to check 'how much ram and cpu a process is consuming'

Post by pschaff » 2010/03/19 18:47:42

man top
top -p -p ...

DANNDP
Posts: 22
Joined: 2009/11/26 21:24:53
Contact:

Re: How to check 'how much ram and cpu a process is consuming'

Post by DANNDP » 2010/03/19 19:21:25

Thanks Phil,

Do you see any weird here:
[code]
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
21040 root 15 0 30180 12m 5788 S 0.0 0.3 2:08.19 asterisk
[/code]
Thanks again!

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: How to check 'how much ram and cpu a process is consuming'

Post by pschaff » 2010/03/19 19:28:57

Not that I can spot. Watching the change over time might tell you something. Should asterisk run as root?

DANNDP
Posts: 22
Joined: 2009/11/26 21:24:53
Contact:

Re: How to check 'how much ram and cpu a process is consuming'

Post by DANNDP » 2010/03/19 21:04:30

Thanks Phil,

What should i check over the time? the problem is that this application (Asterisk) get freezed "some times" and i want to know why?

Whats the meaning of PR? NI? VIRT? RES? SHR? S? %CPU? %MEM? TIME+?

Thanks in advance my friend

Regards!

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: How to check 'how much ram and cpu a process is consuming'

Post by pschaff » 2010/03/19 21:37:38

[quote]
DANNDP wrote:
What should i check over the time? the problem is that this application (Asterisk) get freezed "some times" and i want to know why?[/quote]
My guess is primarily CPU and MEM. May also want to keep an eye on swap usage.

[quote]
Whats the meaning of PR? NI? VIRT? RES? SHR? S? %CPU? %MEM? TIME+?
[/quote]
man top

Post Reply

Return to “CentOS 5 - General Support”