Pstree

Comanda UNIX pstree tipărește pe ecran toate procesele care rulează pe calculator. Tipărirea se face sub forma unui arbore (tree). Comanda este similară cu comanda ps.

Sintaxă

pstree [opțiuni]

Dintre opțiunile cele mai des folosite amintim

-n - sortarea proceselor după identificatorul procesului (pid)
-p - tipărește identificatorul procesului în paranteze atașat de numele procesului
-u - tipărește identificatorul utilizatorului (uid)


Exemple

Comanda pstree într-un xterm pe un sistem Linux rulând Gnome:

# pstree
init─┬─NetworkManager─┬─dhclient
     │                └─{NetworkManager}
     ├─atd
     ├─auditd─┬─audispd─┬─sedispatch
     │        │         └─{audispd}
     │        └─{auditd}
     ├─avahi-daemon───avahi-daemon
     ├─bonobo-activati───{bonobo-activat}
     ├─clock-applet
     ├─console-kit-dae───63*[{console-kit-da}]
     ├─crond
     ├─cupsd
     ├─2*[dbus-daemon───{dbus-daemon}]
     ├─2*[dbus-launch]
     ├─devkit-disks-da───devkit-disks-da
     ├─devkit-power-da
     ├─gconf-im-settin
     ├─gconfd-2
     ├─gdm-binary───gdm-simple-slav─┬─Xorg
     │                              └─gdm-session-wor───gnome-session─┬─bluetoo+
     │                                                                ├─gdu-not+
     │                                                                ├─gnome-p+
     │                                                                ├─gnome-p+
     │                                                                ├─gnome-v+
     │                                                                ├─gpk-upd+
     │                                                                ├─metacity
     │                                                                ├─nautilus
     │                                                                ├─nm-appl+
     │                                                                ├─polkit-+
     │                                                                ├─python
     │                                                                ├─restore+
     │                                                                ├─seapplet
     │                                                                └─{gnome-+
     ├─gdm-user-switch
     ├─gnome-keyring-d───2*[{gnome-keyring-}]
     ├─gnome-screensav
     ├─gnome-settings-───{gnome-settings}
     ├─gnome-terminal─┬─bash───pstree
     │                ├─gnome-pty-helpe
     │                └─{gnome-terminal}
     ├─gnote
     ├─gvfs-fuse-daemo───3*[{gvfs-fuse-daem}]
     ├─gvfs-gdu-volume
     ├─gvfs-gphoto2-vo
     ├─gvfsd
     ├─gvfsd-burn
     ├─gvfsd-metadata
     ├─gvfsd-trash
     ├─hald───hald-runner─┬─hald-addon-acpi
     │                    ├─hald-addon-gene
     │                    ├─hald-addon-inpu
     │                    ├─hald-addon-leds
     │                    ├─hald-addon-rfki
     │                    └─2*[hald-addon-stor]
     ├─im-settings-dae
     ├─5*[mingetty]
     ├─modem-manager
     ├─notification-ar
     ├─notification-da
     ├─polkitd
     ├─pulseaudio─┬─gconf-helper
     │            └─2*[{pulseaudio}]
     ├─rsyslogd───2*[{rsyslogd}]
     ├─rtkit-daemon───2*[{rtkit-daemon}]
     ├─run-mozilla.sh───firefox─┬─npviewer.bin
     │                          └─9*[{firefox}]
     ├─2*[sendmail]
     ├─syndaemon
     ├─trashapplet
     ├─udevd───2*[udevd]
     ├─wnck-applet
     └─wpa_supplicant

Vezi și

  • ps
  • top
  • kill
  • nice


Legături externe

  • en Pagina de manual
  • en The pstree Command by The Linux Information Project (LINFO)


 v  d  m  Programe în linia de comandă pentru Unix (mai multe)
Management de fișiere: cat | cd | chmod | chown | chgrp | cksum | cmp | cp | du | df | file | fsck | ln | ls | lsof | mkdir | mount | mv | pwd | rm | rmdir | split | touch
Management de procese: at | chroot | cron | exit | kill | killall | nice | pgrep | pidof | pkill | ps | pstree | sleep | time | top | wait
Management utilizator/mediu: env | finger | id | mesg | passwd | su | sudo | uname | uptime | w | wall | who | whoami | write
Procesare text: awk | comm | cut | ed | ex | fmt | head | iconv | join | less | more | paste | sed | sort | tac | tail | tr | uniq | wc | xargs
Programare Shell: basename | echo | expr | false | printf | test | true | unset Imprimare:
lp
Communicații:
inetd | netstat | ping | rlogin | traceroute
Căutare:
find | grep | strings
Diverse:
banner | bc | cal | dd | man | size | yes