Use the formatted output (-o
option) of ps command and choose the format. For example:
$ ps -eo pid,ppid,lstart,cmd
PID PPID STARTED COMMAND
1 0 Mon Jan 11 12:26:03 2021 systemd
2 0 Mon Jan 11 12:26:03 2021 kthreadd
3 2 Mon Jan 11 12:26:03 2021 rcu_gp
4 2 Mon Jan 11 12:26:03 2021 rcu_par_gp
5 2 Mon Jan 11 12:26:03 2021 kworker/0:0-events
6 2 Mon Jan 11 12:26:03 2021 kworker/0:0H-kblockd
9 2 Mon Jan 11 12:26:03 2021 mm_percpu_wq
[...]
Available formats are described in the "STANDARD FORMAT SPECIFIERS" section of the manual.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…