简体   繁体   中英

how show what program has been run the most times since the system was last rebooted in linux

正如标题所示,我如何显示运行最多的程序,即使它关闭也是如此,如下所示,但它只显示正在运行的程序

lastreboot | ps -aux --sort=-time | head -2 
  • Most distributions do not record process launch history by default. The linux auditing framework can provide that functionality (among others).

  • If you just want to watch launching of children of a certain process for a short amount of time, you could also use strace and filter the respective fork() / exec() system calls.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM