ps 简介

PS

NAME

    ps - report a snapshot of the current processes.

    显示当前的进程(相当重要的一个命令)

下面主要介绍几个常用的选项,对于其他选项暂时不做要求

a      BSD-style, list all processes with a termial (tty), or to list all processes when used together with the x

       option. 较 -a 选项,此选项显示所有的tty终端上的程序(不包括系统程序)

-a     Select  all processes except both session leaders and processes not associated with a terminal

      只显示本终端的程序

u     Display user-oriented format

      显示进程的用户所有者

-p          根据进程ID查看单个的进程信息,配合-u选项较好。

--pid pidlist     Select by process ID.      

--ppid pidlist     Select by Parent process ID

 

-t ttylist       Select by tty。选择特定的终端、

-g grplist      Select by session OR by effective group name.

-U userlist      Select by effective user ID or name

 

本人喜欢用的组合为:

还有更多的选项与用法,此处暂不介绍。

建议看看top命令

 

posted @ 2014-08-24 21:25  IceSword-syy  阅读(115)  评论(0编辑  收藏  举报