Please note that LinuxExchange will be shutting down on December 31st, 2016. Visit this thread for additional information and to provide feedback.

joehillen@production:~$ ps -ef 
UID        PID  PPID  C STIME TTY          TIME CMD 
root         1     0  0 Sep02 ?        00:01:34 init [2]  
root         2     0  0 Sep02 ?        00:00:00 [kthreadd]
root         3     2  0 Sep02 ?        00:00:01 [ksoftirqd/0]
root         4     2  0 Sep02 ?        00:00:00 [migration/0]
root         5     2  0 Sep02 ?        00:00:00 [migration/1]
root         6     2  0 Sep02 ?        00:00:00 [ksoftirqd/1]
root         7     2  0 Sep02 ?        00:00:01 [migration/2]
root         8     2  0 Sep02 ?        00:00:02 [ksoftirqd/2]
root         9     2  0 Sep02 ?        00:00:01 [migration/3]
root        10     2  0 Sep02 ?        00:00:00 [ksoftirqd/3]
root        11     2  0 Sep02 ?        00:03:55 [events/0]
root        12     2  0 Sep02 ?        00:03:16 [events/1]
root        13     2  0 Sep02 ?        00:02:51 [events/2]
root        14     2  0 Sep02 ?        00:06:00 [events/3]
root        15     2  0 Sep02 ?        00:00:00 [cpuset]
root        16     2  0 Sep02 ?        00:00:00 [khelper]
root        19     2  0 Sep02 ?        00:00:00 [netns]
root        20     2  0 Sep02 ?        00:00:00 [async/mgr]
root        23     2  0 Sep02 ?        00:00:00 [xenwatch]
root        24     2  0 Sep02 ?        00:00:00 [xenbus]
root        56     2  0 Sep02 ?        00:00:24 [sync_supers]
root        58     2  0 Sep02 ?        00:00:26 [bdi-default]
root        60     2  0 Sep02 ?        00:00:00 [kblockd/0]
root        61     2  0 Sep02 ?        00:00:01 [kblockd/1]
root        62     2  0 Sep02 ?        00:00:00 [kblockd/2]
root        63     2  0 Sep02 ?        00:00:00 [kblockd/3]
root        68     2  0 Sep02 ?        00:00:00 [kseriod]
root       117     2  0 Sep02 ?        00:00:11 [kswapd0]
root       118     2  0 Sep02 ?        00:00:00 [aio/0]
root       119     2  0 Sep02 ?        00:00:00 [aio/1]
root       120     2  0 Sep02 ?        00:00:00 [aio/2]
root       121     2  0 Sep02 ?        00:00:00 [aio/3]
root       122     2  0 Sep02 ?        00:00:00 [crypto/0]
root       123     2  0 Sep02 ?        00:00:00 [crypto/1]
root       124     2  0 Sep02 ?        00:00:00 [crypto/2]
root       125     2  0 Sep02 ?        00:00:00 [crypto/3]
root       136     2  0 Sep02 ?        00:00:00 [khvcd]
root       290     2  0 Sep02 ?        00:00:00 [kstriped]
root       294     2  0 Sep02 ?        00:00:00 [ksnapd]

I'm guessing these are kernel modules. They are never really relevant to my interests.

asked 17 Nov '11, 19:32

Joehillen's gravatar image

Joehillen
1462512
accept rate: 40%




I had submitted this question to reddit, and this is the answer I got.

This is what I ended up adding to my ps alias:

ps -fN --ppid 2
link

answered 29 Nov '11, 18:02

Joehillen's gravatar image

Joehillen
1462512
accept rate: 40%

It isn't "kernel modules". You've called up : report process status

It's a list of things which are running.

What do you mean hide? Why do you want to hide it?

See http://linux.about.com/od/commands/l/blcmdl1_ps.htm

link

answered 18 Nov '11, 11:33

Alan%20Rochester's gravatar image

Alan Rochester
91
accept rate: 0%

It's not clear from your rather terse question what you are interested in seeing, so we're sorta flying blind here... but to narrowly answer your specific question using your specific example, you could pipe the output of your ps command through grep, thus:

ps -ef | grep -v -e '^root .*[[:digit:]] \['

...to weed out the lines you mentioned, though that could also remove any "normal" lines that happened to match that expression.

link

answered 18 Nov '11, 21:14

mod's gravatar image

mod
393
accept rate: 0%

I prefer that "ps -fN --ppid 2 -C init,kthreadd" approach to the grep-based one I suggested. Nice.

(01 Dec '11, 09:50) mod
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×5
×3

Asked: 17 Nov '11, 19:32

Seen: 2,855 times

Last updated: 01 Dec '11, 09:50

powered by OSQA