ps aux seems to conveniently list all processes and their status and resource usage (Linux/BSD/MacOS), however I cannot comprehend the meaning of parameter
a = show processes for all users
u = display the process's user/owner
x = also show processes not attached to a terminal
By the way,
man ps is a good resource.
Historically, BSD and AT&T developed incompatible versions of
ps. The options without a leading dash (as per the question) are the BSD style while those with a leading dash are AT&T Unix style. On top of this, Linux developed a version which supports both styles and then adds to it a third style with options that begin with double dashes.
In the comments, you say you are using Apple MacOS (OSX, I presume). The OSX man page for
ps is here and it shows support only for AT&T style.
a Lift the BSD-style "only yourself" restriction, which is imposed upon the set of all processes when some BSD-style (without "-") options are used or when the ps personality setting is BSD-like. The set of processes selected in this manner is in addition to the set of processes selected by other means. An alternate description is that this option causes ps to list all processes with a terminal (tty), or to list all processes when used together with the x option. u Display user-oriented format. x Lift the BSD-style "must have a tty" restriction, which is imposed upon the set of all processes when some BSD-style (without "-") options are used or when the ps personality setting is BSD-like. The set of processes selected in this manner is in addition to the set of processes selected by other means. An alternate description is that this option causes ps to list all processes owned by you (same EUID as ps), or to list all processes when used together with the a option.
$ ps aux | head -10 USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 51120 2796 ? Ss Dec22 0:09 /usr/lib/systemd/systemd --system --deserialize 22 root 2 0.0 0.0 0 0 ? S Dec22 0:00 [kthreadd] root 3 0.0 0.0 0 0 ? S Dec22 0:04 [ksoftirqd/0] root 5 0.0 0.0 0 0 ? S< Dec22 0:00 [kworker/0:0H] root 7 0.0 0.0 0 0 ? S Dec22 0:15 [migration/0] root 8 0.0 0.0 0 0 ? S Dec22 0:00 [rcu_bh] root 9 0.0 0.0 0 0 ? S Dec22 2:47 [rcu_sched] ... saml 3015 0.0 0.0 117756 596 pts/2 Ss Dec22 0:00 bash saml 3093 0.9 4.1 1539436 330796 ? Sl Dec22 70:16 /usr/lib64/thunderbird/thunderbird saml 3873 0.0 0.1 1482432 8628 ? Sl Dec22 0:02 gvim -f root 5675 0.0 0.0 124096 412 ? Ss Dec22 0:02 /usr/sbin/crond -n root 5777 0.0 0.0 51132 1068 ? Ss Dec22 0:08 /usr/sbin/wpa_supplicant -u -f /var/log/wpa_supplica saml 5987 0.7 1.5 1237740 119876 ? Sl Dec26 14:05 /opt/google/chrome/chrome --type=renderer --lang=en- root 6115 0.0 0.0 0 0 ? S Dec27 0:06 [kworker/0:2] ...
With the above switches you'll get output regarding your processes like above.
aux will show you:
The key to understanding the manpage is not to search for "aux" (which I tried first), but to focus on the section that describes the kinds of parameter
This version of ps accepts several kinds of options:
- UNIX options, which may be grouped and must be preceded by a dash.
- BSD options, which may be grouped and must not be used with a dash.
- GNU long options, which are preceded by two dashes.
From this, we know that
aux is a set of (grouped) BSD options,
x, which makes them slightly easier to look up.
x control which processes are selected, and used together are explicitly described to select all processes.
u outputs using the "user-oriented" format, which gives more columns, including the user id and CPU/memory usage.