top of page
List processes

To list processes, use the ps operator. If no arguments are included, you will get all processes. This command lists processes whose command line contains 'marcel'.

M 0.18.3 jao@loon ~/git/marcel$ ps -c python
  945        1  root      sleeping    /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
  954        1  root      sleeping    /usr/bin/python3 /usr/lib/system76-driver/system76-daemon
  1130     939  root      sleeping    /usr/bin/python3 /usr/sbin/execsnoop-bpfcc
  2867    2678  jao       sleeping    /usr/bin/python3 /usr/lib/hidpi-daemon/hidpi-daemon
  2933    2678  jao       sleeping    /usr/bin/python3 /usr/lib/hidpi-daemon/hidpi-notification
  2941    2678  jao       sleeping    /usr/bin/python3 /usr/lib/system76-driver/system76-user-daemon
  3122       1  root      sleeping    /usr/bin/python3 /usr/lib/pop-transition/
  76467  76466  jao       sleeping    python3 -m marcel.main
  89304  76467  jao       running     python3 -m marcel.main

The ps operator produces a stream of Process objects. These can be piped to other commands for further processing. For example, this command sends signal 9 to all processes owned by djt:

M 0.18.3 jao@loon ~/git/marcel$ ps -u djt | map (p: p.signal(9))

bottom of page