Advance Process Mgmt. Commands
แสดงความสัมพันธ์ของโปรเซสทั้งหมดในระบบด้วยคำสั่ง pstree
$ pstree -n -p -c

แสดงความสัมพันธ์และหมายเลขของแต่ละโปรเซสด้วยคำสั่ง pstree
โดยการใช้ pstree
ตามด้วย option -p
และ -u <ชื่อ user>
ดังตัวอย่าง
$ pstree -p -u <ชื่อ user>

$ pstree -p -u <ชื่อ user> | grep terminal

ค้นหาหมายเลขโปรเซสด้วยคำสั่ง pgrep
$ pgrep emacs-gtk
หรือ
$ pgrep emacs

ในกรณีใช้คำสั่ง ps ก็สามารถแสดงหมายเลขโปรเซสได้เช่นเดียวกัน ดังตัวอย่าง
$ ps -e | grep emacs-gtk
หรือ
$ ps -e | grep emacs

Last updated
Was this helpful?