How to find out, how much RAM and CPU “eats” certain process in Linux? And how to find out all runned processes (including daemons and system ones)? =)
UPD: using C language
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use top or ps.
For example,
ps auxwill list all processes along with their owner, state, memory used, etc.EDIT: To do that with C under Linux, you need to read the process files in the proc filesystem. For instance,
/proc/1/statuscontains information about your init process (which always hasPID 1):