內容來源于人民郵電出版社《Linux命令應用大詞典》
講述729個命令,1935個例子
學習Linux系統的參考書、案頭書,遇到不懂的命令或命令選項一查即可
爭取每天都發布內容
linux at命令詳解,本文出自 “airfish2000” 博客,更多命令查看博客:
pstree命令
使用pstree命令可以顯示正在運行的進程的進程樹。pstree命令用ASCII字符顯示樹狀結構,清楚地表達進程之間的相互關系。如果不指定進程號或用戶名,那么會把系統啟動時的第一個進程看作是基層,并顯示之后的所有進程。若指定用戶名,便會以屬于該用戶的第一個進程當作基層,然后顯示該用戶的所有進程。
命令語法:
pstree [選項] [進程號|用戶]
linux命令運行結果。命令中各選項的含義如表所示。
表? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?pstree命令選項含義選項含義
-a顯示命令行參數
-A使用ASCII畫線符
-c不壓縮雷同的子樹
shell腳本中讀取輸入使用什么命令,-h高亮顯示當前進程及其祖先
-H 高亮顯示進程號指定的進程當及其祖先
-G使用VT100劃線符
-l不截斷長行
-n輸出按進程號排序
使用shell命令?-p顯示進程號
-u顯示用戶名變換
-U使用UTF-8(Unicode)劃線符
-Z顯示SELinux安全環境
例:查看進程樹。
linux基本命令的使用?[root@rhel~]# pstree
init─┬─NetworkManager
├─abrtd
├─acpid
├─anacron
linux命令速查手冊。├─atd
├─auditd───{auditd}
├─automount───4*[{automount}]
├─bonobo-activati───{bonobo-activat}
├─certmonger
shell命令行,├─clock-applet
├─console-kit-dae───63*[{console-kit-da}]
├─crond
├─cupsd
├─2*[dbus-daemon───{dbus-daemon}]
linux有什么用、├─2*[dbus-launch]
├─devkit-power-da
├─gconf-im-settin
├─gconfd-2
........................(省略)
linux命令中選項的含義、例:查看進程樹,并顯示出進程號。
[root@rhel~]# pstree -p
init(1)─┬─NetworkManager(1427)
├─abrtd(1771)
├─acpid(1544)
linux at命令?├─atd(1790)
├─auditd(2101)───{auditd}(2102)
├─automount(1625)─┬─{automount}(1626)
│???????????????? ├─{automount}(1627)
│???????????????? ├─{automount}(1630)
linux中GUN命令的含義,│???????????????? └─{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 1779
crond
例:查看gdm用戶的進程。
[root@rhel ~]# pstree gdm
dbus-launch
版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。
工作时间:8:00-18:00
客服电话
电子邮件
admin@qq.com
扫码二维码
获取最新动态