Just noticed the PID tree trace didn't match on the Group: from proc/$PID/status. Here's the corrected output.
$ pid=$BASHPID; while [[ $pid -ne 0 ]]; do ids=$(grep '^\(.*id:\|Group\)' /proc/$pid/status); echo -e "cmdline: $(cat /proc/$pid/cmdline) \n $ids" 2>/dev/null; pid=$(echo $ids | awk '{print $8}'); done
cmdline: -bash Tgid: 3610 Ngid: 0 Pid: 3610 PPid: 3548 TracerPid: 0 Uid: 1000 1000 1000 1000 Gid: 1000 1000 1000 1000 Groups: NStgid: 3610 NSpid: 3610 NSpgid: 3610 NSsid: 3610
cmdline: tmux Tgid: 3548 Ngid: 0 Pid: 3548 PPid: 1 TracerPid: 0 Uid: 1000 1000 1000 1000 Gid: 1000 1000 1000 1000 Groups: NStgid: 3548 NSpid: 3548 NSpgid: 3548 NSsid: 3548
cmdline: /sbin/init Tgid: 1 Ngid: 0 Pid: 1 PPid: 0 TracerPid: 0 Uid: 0 0 0 0 Gid: 0 0 0 0 Groups: NStgid: 1 NSpid: 1 NSpgid: 1 NSsid: 1
Just noticed the PID tree trace didn't match on the Group: from proc/$PID/status. Here's the corrected output.
$ pid=$BASHPID; while [[ $pid -ne 0 ]]; do ids=$(grep '^\(.*id:\|Group\)' /proc/$pid/status); echo -e "cmdline: $(cat /proc/$pid/cmdline) \n $ids" 2>/dev/null; pid=$(echo $ids | awk '{print $8}'); done
cmdline: -bash
Tgid: 3610
Ngid: 0
Pid: 3610
PPid: 3548
TracerPid: 0
Uid: 1000 1000 1000 1000
Gid: 1000 1000 1000 1000
Groups:
NStgid: 3610
NSpid: 3610
NSpgid: 3610
NSsid: 3610
cmdline: tmux
Tgid: 3548
Ngid: 0
Pid: 3548
PPid: 1
TracerPid: 0
Uid: 1000 1000 1000 1000
Gid: 1000 1000 1000 1000
Groups:
NStgid: 3548
NSpid: 3548
NSpgid: 3548
NSsid: 3548
cmdline: /sbin/init
Tgid: 1
Ngid: 0
Pid: 1
PPid: 0
TracerPid: 0
Uid: 0 0 0 0
Gid: 0 0 0 0
Groups:
NStgid: 1
NSpid: 1
NSpgid: 1
NSsid: 1