find process 0 in ps tree
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I read the following sentence from an instruction
Process ID 0 is usually the scheduler process and is often known as the swapper. No program on disk corresponds to this process, which is part of the kernel and is known as a system process. Process ID 1 is usually the init process and is invoked by the kernel at the end of the bootstrap procedure.
Check the processes:
$ pstree -p $$
-+= 00001 root /sbin/launchd
-+= 00264 me /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal -psn_0_53261
-+= 00365 root login -pfl me /bin/bash -c exec -la bash /usr/local/bin/bash
-+= 00366 me -bash
|-+= 06305 me pstree -p 366
| --- 06307 root ps -axwwo user,pid,ppid,pgid,command
Could find process 1 but where is process 0?
osx ps
add a comment |
up vote
0
down vote
favorite
I read the following sentence from an instruction
Process ID 0 is usually the scheduler process and is often known as the swapper. No program on disk corresponds to this process, which is part of the kernel and is known as a system process. Process ID 1 is usually the init process and is invoked by the kernel at the end of the bootstrap procedure.
Check the processes:
$ pstree -p $$
-+= 00001 root /sbin/launchd
-+= 00264 me /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal -psn_0_53261
-+= 00365 root login -pfl me /bin/bash -c exec -la bash /usr/local/bin/bash
-+= 00366 me -bash
|-+= 06305 me pstree -p 366
| --- 06307 root ps -axwwo user,pid,ppid,pgid,command
Could find process 1 but where is process 0?
osx ps
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I read the following sentence from an instruction
Process ID 0 is usually the scheduler process and is often known as the swapper. No program on disk corresponds to this process, which is part of the kernel and is known as a system process. Process ID 1 is usually the init process and is invoked by the kernel at the end of the bootstrap procedure.
Check the processes:
$ pstree -p $$
-+= 00001 root /sbin/launchd
-+= 00264 me /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal -psn_0_53261
-+= 00365 root login -pfl me /bin/bash -c exec -la bash /usr/local/bin/bash
-+= 00366 me -bash
|-+= 06305 me pstree -p 366
| --- 06307 root ps -axwwo user,pid,ppid,pgid,command
Could find process 1 but where is process 0?
osx ps
I read the following sentence from an instruction
Process ID 0 is usually the scheduler process and is often known as the swapper. No program on disk corresponds to this process, which is part of the kernel and is known as a system process. Process ID 1 is usually the init process and is invoked by the kernel at the end of the bootstrap procedure.
Check the processes:
$ pstree -p $$
-+= 00001 root /sbin/launchd
-+= 00264 me /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal -psn_0_53261
-+= 00365 root login -pfl me /bin/bash -c exec -la bash /usr/local/bin/bash
-+= 00366 me -bash
|-+= 06305 me pstree -p 366
| --- 06307 root ps -axwwo user,pid,ppid,pgid,command
Could find process 1 but where is process 0?
osx ps
osx ps
asked yesterday
avirate
445210
445210
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
BSD ps
doesn't show PID 0:
$ ps -o pid,ppid,comm -p 0,1,$$
PID PPID COMM
1 0 /sbin/launchd
14705 14704 -zsh
Since pstree
uses ps
to get process information (as you can see in your output), obviously it can't show PID 0.
Use top
, or Activity Manager, on OSX to see PID 0:
$ top -l1 -pid 0
Processes: 480 total, 2 running, 478 sleeping, 2777 threads
2018/11/15 12:20:36
Load Avg: 1.99, 2.21, 2.13
CPU usage: 6.59% user, 18.33% sys, 75.7% idle
SharedLibs: 207M resident, 50M data, 40M linkedit.
MemRegions: 135141 total, 7727M resident, 63M private, 2624M shared.
PhysMem: 16G used (6717M wired), 61M unused.
VM: 3304G vsize, 1297M framework vsize, 5481932(0) swapins, 6319905(0) swapouts.
Networks: packets: 2367177/1916M in, 1966560/789M out.
Disks: 2569936/63G read, 1879985/62G written.
PID COMMAND %CPU TIME #TH #WQ #PORTS MEM PURG CMPRS PGRP PPID STATE BOOSTS %CPU_ME %CPU_OTHRS UID FAULTS COW MSGSENT MSGRECV SYSBSD SYSMACH CSW PAGEINS IDLEW POWER INSTRS CYCLES USER #MREGS RPRVT VPRVT VSIZE KPRVT KSHRD
0 kernel_task 0.0 47:24.02 211/8 0 0 71M+ 0B 0B 0 0 running 0[0] 0.00000 0.00000 0 400853+ 0 82636075+ 75828596+ 0 0 295335075+ 0 14150823 0.0 0 0 root N/A N/A N/A N/A N/A N/A
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
BSD ps
doesn't show PID 0:
$ ps -o pid,ppid,comm -p 0,1,$$
PID PPID COMM
1 0 /sbin/launchd
14705 14704 -zsh
Since pstree
uses ps
to get process information (as you can see in your output), obviously it can't show PID 0.
Use top
, or Activity Manager, on OSX to see PID 0:
$ top -l1 -pid 0
Processes: 480 total, 2 running, 478 sleeping, 2777 threads
2018/11/15 12:20:36
Load Avg: 1.99, 2.21, 2.13
CPU usage: 6.59% user, 18.33% sys, 75.7% idle
SharedLibs: 207M resident, 50M data, 40M linkedit.
MemRegions: 135141 total, 7727M resident, 63M private, 2624M shared.
PhysMem: 16G used (6717M wired), 61M unused.
VM: 3304G vsize, 1297M framework vsize, 5481932(0) swapins, 6319905(0) swapouts.
Networks: packets: 2367177/1916M in, 1966560/789M out.
Disks: 2569936/63G read, 1879985/62G written.
PID COMMAND %CPU TIME #TH #WQ #PORTS MEM PURG CMPRS PGRP PPID STATE BOOSTS %CPU_ME %CPU_OTHRS UID FAULTS COW MSGSENT MSGRECV SYSBSD SYSMACH CSW PAGEINS IDLEW POWER INSTRS CYCLES USER #MREGS RPRVT VPRVT VSIZE KPRVT KSHRD
0 kernel_task 0.0 47:24.02 211/8 0 0 71M+ 0B 0B 0 0 running 0[0] 0.00000 0.00000 0 400853+ 0 82636075+ 75828596+ 0 0 295335075+ 0 14150823 0.0 0 0 root N/A N/A N/A N/A N/A N/A
add a comment |
up vote
2
down vote
accepted
BSD ps
doesn't show PID 0:
$ ps -o pid,ppid,comm -p 0,1,$$
PID PPID COMM
1 0 /sbin/launchd
14705 14704 -zsh
Since pstree
uses ps
to get process information (as you can see in your output), obviously it can't show PID 0.
Use top
, or Activity Manager, on OSX to see PID 0:
$ top -l1 -pid 0
Processes: 480 total, 2 running, 478 sleeping, 2777 threads
2018/11/15 12:20:36
Load Avg: 1.99, 2.21, 2.13
CPU usage: 6.59% user, 18.33% sys, 75.7% idle
SharedLibs: 207M resident, 50M data, 40M linkedit.
MemRegions: 135141 total, 7727M resident, 63M private, 2624M shared.
PhysMem: 16G used (6717M wired), 61M unused.
VM: 3304G vsize, 1297M framework vsize, 5481932(0) swapins, 6319905(0) swapouts.
Networks: packets: 2367177/1916M in, 1966560/789M out.
Disks: 2569936/63G read, 1879985/62G written.
PID COMMAND %CPU TIME #TH #WQ #PORTS MEM PURG CMPRS PGRP PPID STATE BOOSTS %CPU_ME %CPU_OTHRS UID FAULTS COW MSGSENT MSGRECV SYSBSD SYSMACH CSW PAGEINS IDLEW POWER INSTRS CYCLES USER #MREGS RPRVT VPRVT VSIZE KPRVT KSHRD
0 kernel_task 0.0 47:24.02 211/8 0 0 71M+ 0B 0B 0 0 running 0[0] 0.00000 0.00000 0 400853+ 0 82636075+ 75828596+ 0 0 295335075+ 0 14150823 0.0 0 0 root N/A N/A N/A N/A N/A N/A
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
BSD ps
doesn't show PID 0:
$ ps -o pid,ppid,comm -p 0,1,$$
PID PPID COMM
1 0 /sbin/launchd
14705 14704 -zsh
Since pstree
uses ps
to get process information (as you can see in your output), obviously it can't show PID 0.
Use top
, or Activity Manager, on OSX to see PID 0:
$ top -l1 -pid 0
Processes: 480 total, 2 running, 478 sleeping, 2777 threads
2018/11/15 12:20:36
Load Avg: 1.99, 2.21, 2.13
CPU usage: 6.59% user, 18.33% sys, 75.7% idle
SharedLibs: 207M resident, 50M data, 40M linkedit.
MemRegions: 135141 total, 7727M resident, 63M private, 2624M shared.
PhysMem: 16G used (6717M wired), 61M unused.
VM: 3304G vsize, 1297M framework vsize, 5481932(0) swapins, 6319905(0) swapouts.
Networks: packets: 2367177/1916M in, 1966560/789M out.
Disks: 2569936/63G read, 1879985/62G written.
PID COMMAND %CPU TIME #TH #WQ #PORTS MEM PURG CMPRS PGRP PPID STATE BOOSTS %CPU_ME %CPU_OTHRS UID FAULTS COW MSGSENT MSGRECV SYSBSD SYSMACH CSW PAGEINS IDLEW POWER INSTRS CYCLES USER #MREGS RPRVT VPRVT VSIZE KPRVT KSHRD
0 kernel_task 0.0 47:24.02 211/8 0 0 71M+ 0B 0B 0 0 running 0[0] 0.00000 0.00000 0 400853+ 0 82636075+ 75828596+ 0 0 295335075+ 0 14150823 0.0 0 0 root N/A N/A N/A N/A N/A N/A
BSD ps
doesn't show PID 0:
$ ps -o pid,ppid,comm -p 0,1,$$
PID PPID COMM
1 0 /sbin/launchd
14705 14704 -zsh
Since pstree
uses ps
to get process information (as you can see in your output), obviously it can't show PID 0.
Use top
, or Activity Manager, on OSX to see PID 0:
$ top -l1 -pid 0
Processes: 480 total, 2 running, 478 sleeping, 2777 threads
2018/11/15 12:20:36
Load Avg: 1.99, 2.21, 2.13
CPU usage: 6.59% user, 18.33% sys, 75.7% idle
SharedLibs: 207M resident, 50M data, 40M linkedit.
MemRegions: 135141 total, 7727M resident, 63M private, 2624M shared.
PhysMem: 16G used (6717M wired), 61M unused.
VM: 3304G vsize, 1297M framework vsize, 5481932(0) swapins, 6319905(0) swapouts.
Networks: packets: 2367177/1916M in, 1966560/789M out.
Disks: 2569936/63G read, 1879985/62G written.
PID COMMAND %CPU TIME #TH #WQ #PORTS MEM PURG CMPRS PGRP PPID STATE BOOSTS %CPU_ME %CPU_OTHRS UID FAULTS COW MSGSENT MSGRECV SYSBSD SYSMACH CSW PAGEINS IDLEW POWER INSTRS CYCLES USER #MREGS RPRVT VPRVT VSIZE KPRVT KSHRD
0 kernel_task 0.0 47:24.02 211/8 0 0 71M+ 0B 0B 0 0 running 0[0] 0.00000 0.00000 0 400853+ 0 82636075+ 75828596+ 0 0 295335075+ 0 14150823 0.0 0 0 root N/A N/A N/A N/A N/A N/A
answered yesterday
Olorin
1,514112
1,514112
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f481829%2ffind-process-0-in-ps-tree%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown