Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I need to output system processes via ps. As far as I know, flag F (first column) is responsible for this: 1 means that this is system process. How can I output only these processes without others?

'ps -el' example:

share|improve this question
1  
According to man ps, a 1 in the F column means "forked but didn't exec", not system process. On my system, several of my web browser processes show up with F=1, and they're definitely not special. –  Paul Jun 1 '13 at 17:52
1  
There are various possible things that may conceivably be called “system process”, but this is not standard terminology. The F column has nothing to do with any reasonable meaning of “system process”. What are you trying to achieve? –  Gilles Jun 1 '13 at 19:31

3 Answers 3

Try ps aux see if that works for you. Please let me know if you need further help on this.

share|improve this answer
1  
I meant I need to filter process list to display system processes only, ps aux display all of them. This is task from high school, not for practical using. –  snorlax212 Jun 1 '13 at 17:41
    
I see, I thought you were trying to use ps to show certain things. Actually, you want ps to display what it finds, and then grep for the root processes as Tomas identified. –  RGS Jun 1 '13 at 18:42

From man ps :

ps -aux

If the user named "x" does not exist, this ps may interpret the command as "ps aux"

so, for only root process, use:

ps -auroot

or equal

ps -au root
share|improve this answer
    
Not helpful, redundant (use of ps was already stated by another post), and incorrect for this situation. You misread the man page at linux.die.net. –  RGS Jun 1 '13 at 17:37
    
@RGS maybe, or maybe not. ps aux is equal to ps -el, so also your answer is not helpful. maybe you misread question. –  girardengo Jun 1 '13 at 18:01
    
you're right; I misunderstood the question. OP wanted to grep through the results of ps, he/she just didn't know how to say it. –  RGS Jun 1 '13 at 18:44

Assuming you don't mess around with sudo or root, sytem services would run under root

ps aux | grep root

First will list all services running and second just takes root proceses. This does not list servers (aeg apache) as many of them run under their own users but apache is not fully a system process

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.