![](/img/trans.png)
[英]How to print the most recent last call on linux without exiting the program
[英]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
默认情况下,大多数发行版都不记录进程启动历史记录。 linux审计框架可以提供该功能(以及其他功能)。
如果只想在短时间内观看某个进程的子进程的启动,则还可以使用strace
并过滤相应的fork()
/ exec()
系统调用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.