I would like to see which program got a PID most frequently and second frequently in my system since the last reboot. If I run top now, I can see the PID column and the COMMAND column but only for system state at current moment. I'd like to dig up from some log or enable some log so whenever somethings gets a new PID with some COMMAND, I would like to add a row to a table, and analyze that table. For example:
1 root 20 0 168424 10960 7820 S 0.0 0.1 0:02.78 systemd 2 root 20 0 0 0 0 S 0.0 0.0 0:00.01 kthreadd 3 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_gp 4 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_par_gp 6 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/0:0H-events_highpri 9 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 mm_percpu_wq 10 root 20 0 0 0 0 S 0.0 0.0 0:02.26 ksoftirqd/0 11 root 20 0 0 0 0 I 0.0 0.0 0:31.57 rcu_sched You can see that a few PIDs already exited (like 5, 7, 8). I'd like to record them all once they started. Is there a command or utility that does this?