Linux and Unix are multitasking operating systems i.e. a system that can run multiple tasks (process) during the same period of time. A process is nothing but a running program (command) on Linux or Unix-like systems.

The pstree command shows running processes as a tree.

Display command line arguments To see the list of command line arguments, pass the -a option:

$ pstree -a
  ├─abrt-dump-oops -d /var/spool/abrt -rwx /var/log/messages
  │   ├─audispd
  │   │   ├─sedispatch
  │   │   └─{audispd}
  │   └─{auditd}
  ├─dbus-daemon --system
  │   └─{dbus-daemon}
  │   ├─hald-runner
  │   │   ├─hald-addon-acpi
  │   │   └─hald-addon-inpu
  │   └─{hald}
  ├─irqbalance --pid=/var/run/
  ├─keepalived -D
  │   ├─keepalived -D
  │   └─keepalived -D
  │   ├─pickup -l -t fifo -u
  │   └─qmgr -l -t fifo -u
  ├─mingetty /dev/tty1
  ├─mingetty /dev/tty2
  ├─mingetty /dev/tty3
  ├─mingetty /dev/tty4
  ├─mingetty /dev/tty5
  ├─mingetty /dev/tty6
  │   ├─nginx
  │   ├─nginx
  │   └─nginx
  ├─ntpd -u ntp:ntp -p /var/run/ -g
  ├─rsyslogd -i /var/run/ -c 5
  │   ├─{rsyslogd}
  │   ├─{rsyslogd}
  │   └─{rsyslogd}
  │   └─sshd
  │       └─bash
  │           └─pstree -a
  ├─udevd -d
  │   ├─udevd -d
  │   └─udevd -d
  └─vnstatd -d

Display PIDs To show PIDS for each process name, pass the -p option:

$ pstree -p
        |                  `-{bamfdaemon}(6533)
        |              `-{colord}(3091)
        |                       |-{console-kit-dae}(2497)
        │                       └─{vmware-vmblock-}(1794)

results matching ""

    No results matching ""