引言 同事问我怎样看一个进程的启动时间和运行时间,我第一反应当然是说用 ps 命令啦.ps aux或ps -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 w
我们常常会想查看Linux的一些进程,很自然地用到了: ps -ef | grep xxx ps: process show 展示进程 参数:1. e 显示所有程序. 2. f 显示UID,PPIP,C与STIME栏位 grep:global search regular expression(RE) and print out the line 全局正则匹配并输出