pstree命令--Linux命令应用大词典729个命令解读
2016-11-11 12:44
489 查看
内容来源于人民邮电出版社《Linux命令应用大词典》
本文出自 “airfish2000” 博客,更多命令查看博客:http://airfish2000.blog.51cto.com/10829608/1871746
pstree命令
使用pstree命令可以显示正在运行的进程的进程树。pstree命令用ASCII字符显示树状结构,清楚地表达进程之间的相互关系。如果不指定进程号或用户名,那么会把系统启动时的第一个进程看作是基层,并显示之后的所有进程。若指定用户名,便会以属于该用户的第一个进程当作基层,然后显示该用户的所有进程。命令语法:pstree [选项] [进程号|用户]命令中各选项的含义如表所示。表 pstree命令选项含义
例:查看进程树。[root@rhel~]# pstreeinit─┬─NetworkManager ├─abrtd ├─acpid ├─anacron ├─atd ├─auditd───{auditd} ├─automount───4*[{automount}] ├─bonobo-activati───{bonobo-activat} ├─certmonger ├─clock-applet ├─console-kit-dae───63*[{console-kit-da}] ├─crond ├─cupsd ├─2*[dbus-daemon───{dbus-daemon}] ├─2*[dbus-launch] ├─devkit-power-da ├─gconf-im-settin ├─gconfd-2........................(省略)例:查看进程树,并显示出进程号。[root@rhel~]# pstree -pinit(1)─┬─NetworkManager(1427) ├─abrtd(1771) ├─acpid(1544) ├─atd(1790) ├─auditd(2101)───{auditd}(2102) ├─automount(1625)─┬─{automount}(1626) │ ├─{automount}(1627) │ ├─{automount}(1630) │ └─{automount}(1633) ├─bonobo-activati(2245)───{bonobo-activat}(2246) ├─certmonger(1816) ├─clock-applet(2278) ├─console-kit-dae(1946)─┬─{console-kit-da}(1947) │ ├─{console-kit-da}(1948) │ ├─{console-kit-da}(1949) │ ├─{console-kit-da}(1950) │ ├─{console-kit-da}(1951) │ ├─{console-kit-da}(1952) │ ├─{console-kit-da}(1953)........................(省略)例:查看进程号为1779的进程名。[root@rhel~]# pstree 1779crond例:查看gdm用户的进程。[root@rhel ~]# pstree gdmdbus-launch
讲述729个命令,1935个例子
学习Linux系统的参考书、案头书,遇到不懂的命令或命令选项一查即可争取每天都发布内容本文出自 “airfish2000” 博客,更多命令查看博客:http://airfish2000.blog.51cto.com/10829608/1871746
pstree命令
使用pstree命令可以显示正在运行的进程的进程树。pstree命令用ASCII字符显示树状结构,清楚地表达进程之间的相互关系。如果不指定进程号或用户名,那么会把系统启动时的第一个进程看作是基层,并显示之后的所有进程。若指定用户名,便会以属于该用户的第一个进程当作基层,然后显示该用户的所有进程。命令语法:pstree [选项] [进程号|用户]命令中各选项的含义如表所示。表 pstree命令选项含义
选项 | 含义 |
-a | 显示命令行参数 |
-A | 使用ASCII画线符 |
-c | 不压缩雷同的子树 |
-h | 高亮显示当前进程及其祖先 |
-H <进程号> | 高亮显示进程号指定的进程当及其祖先 |
-G | 使用VT100划线符 |
-l | 不截断长行 |
-n | 输出按进程号排序 |
-p | 显示进程号 |
-u | 显示用户名变换 |
-U | 使用UTF-8(Unicode)划线符 |
-Z | 显示SELinux安全环境 |
相关文章推荐
- ping命令--Linux命令应用大词典729个命令解读
- alias命令--Linux命令应用大词典729个命令解读
- lpq命令--Linux命令应用大词典729个命令解读
- poweroff命令--Linux命令应用大词典729个命令解读
- getsebool命令--Linux命令应用大词典729个命令解读
- shutdown命令--Linux命令应用大词典729个命令解读
- pwd命令 Linux命令应用大词典729个命令解读
- pwd命令--Linux命令应用大词典729个命令解读
- mkfs命令--Linux命令应用大词典729个命令解读
- ls命令--Linux命令应用大词典729个命令解读
- cat命令--Linux命令应用大词典729个命令解读
- getenforce命令--Linux命令应用大词典729个命令解读
- w命令--Linux命令应用大词典729个命令解读
- cd命令--Linux命令应用大词典729个命令解读
- cd命令--Linux命令应用大词典729个命令解读
- jobs命令--Linux命令应用大词典729个命令解读
- find命令--Linux命令应用大词典729个命令解读
- useradd命令--Linux命令应用大词典729个命令解读
- help命令--Linux命令应用大词典729个命令解读
- ifconfig命令--Linux命令应用大词典729个命令解读