As far as I know, linux kenerl has sessions and process groups concept, I want to see the sessions and groups, what should I do?
You can use this command
ps xao pid,ppid,pgid,sid,comm | less PID PPID PGID SID COMMAND 1 0 1 1 systemd 2 0 0 0 kthreadd 3 2 0 0 ksoftirqd/0 5 2 0 0 kworker/0:0H 6 2 0 0 kworker/u64:0 8 2 0 0 migration/0 . . . . . . . . . . . . . . . . hit enter to see the next line PID - Process ID PPID - Parent Process ID PGIF - process group ID SID - Session ID
for more check ps man
If you would like to check specific PID then use this command:
ps xao pid,ppid,pgid,sid,comm | grep <PID>
ps p <PID> o pid,ppid,pgid,sid,comm