linux 查看进程启动时间

这本阿里P8撰写的算法笔记,再次推荐给大家,身边不少朋友学完这本书最后加入大厂:

Github 疯传!史上最强悍!阿里大佬「LeetCode刷题手册」开放下载了!

同事问我怎样看一个进程的启动时间和运行时间,我第一反应当然是说用 ps 命令啦。 ps auxps -ef不就可以看时间吗?

ps aux选项及输出说明

我们来重新复习下ps aux的选项,这是类 BSD 风格的命令选项,因为不带“-”。

通过 man 可以看到 aux 选项解释如下:

a      Lift the BSD-style "only yourself" restriction, which is imposed upon the set of all processes 
when some BSD-style (without "-") options are used or when the ps personality setting is BSD-like.  
The set of processes selected in this manner is in addition to the set of processes selected by other means.
An alternate description is that this option causes ps to list all processes with a terminal (tty), 
or to list all processes when used together with the x option.x      Lift the 


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部