If the command ps awx | grep -v grep
is run the following output is produced. The list below is the last 20 lines of the complete output.
4247 pts/1 Ss+ 0:00 /bin/bash
4442 ? S< 0:00 [kworker/u17:1]
4661 ? S< 0:00 [kworker/u17:3]
4731 ? S< 0:00 [kworker/u17:5]
4734 ? S 0:00 pickup -l -t fifo -u
4847 ? S< 0:00 [kworker/u17:7]
4850 ? S 0:00 [kworker/u16:3]
4878 ? S 0:00 [kworker/u16:0]
5201 ? S< 0:00 [kworker/u17:8]
5353 ? S 0:00 [kworker/0:1]
5354 ? S 0:00 [kworker/7:2]
5355 ? S 0:00 [kworker/u16:2]
5361 ? S 0:00 [kworker/4:0]
5362 tty1 Ss 0:00 -bash
5396 ? S 0:00 [kworker/6:0]
5418 ? S 0:00 [kworker/0:0]
5420 ? S 0:00 [kworker/2:2]
5431 ? S 0:00 [kworker/7:0]
5562 ? S 0:00 [kworker/4:2]
5620 tty1 R+ 0:00 ps awx
If a subsequent command ps awx | grep grep
is run the following output is generated.
5646 tty1 S+ 0:00 grep --color=auto grep
Additionally if the following command ps awx | grep agetty
is run, the following output is displayed.
5669 tty1 S+ 0:00 grep --color=auto agetty
Why does the command ps awx
not display the process identification numbers 5646 and 5669? In fact there are no other processes listed after 5620.
ps awx
. From the initial looks5646
is not even there in your given information – Inian Jan 28 '19 at 05:285646
showed up in subsequent command, so it's a new process and couldn't have been in the original (or complete list) ofps awx
in the first place – Sergiy Kolodyazhnyy Jan 28 '19 at 05:32