O BSD ps
não mostra o PID 0:
$ ps -o pid,ppid,comm -p 0,1,$$
PID PPID COMM
1 0 /sbin/launchd
14705 14704 -zsh
Como pstree
usa ps
para obter informações de processo (como você pode ver na sua saída), obviamente não é possível mostrar o PID 0.
Use top
ou Activity Manager no OSX para ver o 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