Use it as the entry point when a program hangs, uses too many resources, or will not start or stop.
Processes
A process is a running program with its own PID, memory, open files, user and environment. Processes are created by a parent (fork/exec), run, may create children, and exit with a status.
1. pgrep -a <name> — running? Which PID?
2. ps -o pid,ppid,user,stat,etime,cmd -p <pid> — owner, state and age.
3. Started by systemd? systemctl status <pid> shows the unit.
4. Resource use → top -p <pid>; files → ls -l /proc/<pid>/fd | wc -l.
5. Stop or restart through its unit or owner.
parent forks → child execs the program → runs as a user with limits → exits with a status → parent reaps it
For Processes, continue with the first unproven Topic check: Pin the workload, host/container namespace and observation timestamp before interpreting a PID. If that boundary is healthy, advance to the adjacent check: Capture PID, PPID, start time, executable/cmdline, credentials and relevant cgroup/unit association. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
psPrimary Commands
Configuration and operational commands for this Topic.
psReferenceCapture a point-in-time process listing with selected identity, state and resource fields.
Use when: Primary lookup intent: verify. Use ps when the lookup goal is to capture a point-in-time process listing with selected identity, state and resource fields. Tie the result to the same host, namespace, user identity and time window as the symptom.
Quick note: Output review: healthy and suspicious cues are command-specific interpretation boundaries, not fixed literal output samples. Intent class: verify. Safety class: read_only. Intent describes the primary lookup role; safety remains command-family capability and can be higher than a read-only invocation. ps is documented as an operational lookup primitive under Processes. The canonical leaf intentionally represents the command family; options remain distribution/tool-version specific.
topReferenceInteractively sample processes, CPU, memory and load for live resource triage.
Use when: Primary lookup intent: troubleshoot. Use top when the lookup goal is to interactively sample processes, CPU, memory and load for live resource triage. Tie the result to the same host, namespace, user identity and time window as the symptom.
Quick note: Output review: healthy and suspicious cues are command-specific interpretation boundaries, not fixed literal output samples. Intent class: troubleshoot. Safety class: low_impact. Intent describes the primary lookup role; safety remains command-family capability and can be higher than a read-only invocation. top is documented as an operational lookup primitive under Processes. The canonical leaf intentionally represents the command family; options remain distribution/tool-version specific.
htopReferenceInteractively inspect and manage processes with a curses-based resource view.
Use when: Primary lookup intent: troubleshoot. Use htop when the lookup goal is to interactively inspect and manage processes with a curses-based resource view. Tie the result to the same host, namespace, user identity and time window as the symptom.
Quick note: Output review: healthy and suspicious cues are command-specific interpretation boundaries, not fixed literal output samples. Intent class: troubleshoot. Safety class: low_impact. Intent describes the primary lookup role; safety remains command-family capability and can be higher than a read-only invocation. htop is documented as an operational lookup primitive under Processes. The canonical leaf intentionally represents the command family; options remain distribution/tool-version specific.
pgrepReferenceReturn process identifiers that match names or other process-selection criteria.
Use when: Primary lookup intent: verify. Use pgrep when the lookup goal is to return process identifiers that match names or other process-selection criteria. Tie the result to the same host, namespace, user identity and time window as the symptom.
Quick note: Output review: healthy and suspicious cues are command-specific interpretation boundaries, not fixed literal output samples. Intent class: verify. Safety class: read_only. Intent describes the primary lookup role; safety remains command-family capability and can be higher than a read-only invocation. pgrep is documented as an operational lookup primitive under Processes. The canonical leaf intentionally represents the command family; options remain distribution/tool-version specific.
pkillReferenceSend a signal to processes selected by name or other matching criteria.
Use when: Primary lookup intent: configure. Use pkill when the lookup goal is to send a signal to processes selected by name or other matching criteria. Tie the result to the same host, namespace, user identity and time window as the symptom.
Quick note: Post-change verification for pkill: Verify the intended process set and rerun affected service/workload health tests. Output review: healthy and suspicious cues are command-specific interpretation boundaries, not fixed literal output samples. Intent class: configure. Safety class: disruptive. Intent describes the primary lookup role; safety remains command-family capability and can be higher than a read-only invocation. pkill is documented as an operational lookup primitive under Processes. The canonical leaf intentionally represents the command family; options remain distribution/tool-version specific.
killReferenceSend a selected signal to one or more process identifiers.
Use when: Primary lookup intent: configure. Use kill when the lookup goal is to send a selected signal to one or more process identifiers. Tie the result to the same host, namespace, user identity and time window as the symptom.
Quick note: Post-change verification for kill: Confirm the intended process state and rerun the service/workload health check. Output review: healthy and suspicious cues are command-specific interpretation boundaries, not fixed literal output samples. Intent class: configure. Safety class: disruptive. Intent describes the primary lookup role; safety remains command-family capability and can be higher than a read-only invocation. kill is documented as an operational lookup primitive under Processes. The canonical leaf intentionally represents the command family; options remain distribution/tool-version specific.
killallReferenceSend a signal to processes selected primarily by executable name.
Use when: Primary lookup intent: configure. Use killall when the lookup goal is to send a signal to processes selected primarily by executable name. Tie the result to the same host, namespace, user identity and time window as the symptom.
Quick note: Post-change verification for killall: Verify only intended processes changed and retest each affected service/workload. Output review: healthy and suspicious cues are command-specific interpretation boundaries, not fixed literal output samples. Intent class: configure. Safety class: disruptive. Intent describes the primary lookup role; safety remains command-family capability and can be higher than a read-only invocation. killall is documented as an operational lookup primitive under Processes. The canonical leaf intentionally represents the command family; options remain distribution/tool-version specific.
niceReferenceStart a command with an adjusted CPU scheduling niceness value.
Use when: Primary lookup intent: configure. Use nice when the lookup goal is to start a command with an adjusted CPU scheduling niceness value. Tie the result to the same host, namespace, user identity and time window as the symptom.
Quick note: Output review: healthy and suspicious cues are command-specific interpretation boundaries, not fixed literal output samples. Intent class: configure. Safety class: low_impact. Intent describes the primary lookup role; safety remains command-family capability and can be higher than a read-only invocation. nice is documented as an operational lookup primitive under Processes. The canonical leaf intentionally represents the command family; options remain distribution/tool-version specific.
reniceReferenceChange the niceness of an already running process, process group or user workload.
Use when: Primary lookup intent: configure. Use renice when the lookup goal is to change the niceness of an already running process, process group or user workload. Tie the result to the same host, namespace, user identity and time window as the symptom.
Quick note: Output review: healthy and suspicious cues are command-specific interpretation boundaries, not fixed literal output samples. Intent class: configure. Safety class: low_impact. Intent describes the primary lookup role; safety remains command-family capability and can be higher than a read-only invocation. renice is documented as an operational lookup primitive under Processes. The canonical leaf intentionally represents the command family; options remain distribution/tool-version specific.
jobsReferenceList jobs tracked by the current interactive shell and their job-control state.
Use when: Primary lookup intent: verify. Use jobs when the lookup goal is to list jobs tracked by the current interactive shell and their job-control state. Tie the result to the same host, namespace, user identity and time window as the symptom.
Quick note: Output review: healthy and suspicious cues are command-specific interpretation boundaries, not fixed literal output samples. Intent class: verify. Safety class: read_only. Intent describes the primary lookup role; safety remains command-family capability and can be higher than a read-only invocation. jobs is documented as an operational lookup primitive under Processes. The canonical leaf intentionally represents the command family; options remain distribution/tool-version specific.
nohupReferenceRun a command with hangup handling and output redirection suitable for session detachment.
Use when: Primary lookup intent: configure. Use nohup when the lookup goal is to run a command with hangup handling and output redirection suitable for session detachment. Tie the result to the same host, namespace, user identity and time window as the symptom.
Quick note: Output review: healthy and suspicious cues are command-specific interpretation boundaries, not fixed literal output samples. Intent class: configure. Safety class: low_impact. Intent describes the primary lookup role; safety remains command-family capability and can be higher than a read-only invocation. nohup is documented as an operational lookup primitive under Processes. The canonical leaf intentionally represents the command family; options remain distribution/tool-version specific.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
workload invocation → process creation/exec → PID + start-time identity → credentials/cgroup/unit → scheduler state + resources → signals/waits/exits → service/application readiness → workload result
Healthy evidence: the expected process tree exists with matching start identity, credentials and state, and the application-level acceptance test succeeds.
Step 2 Commands Verify boundary
ps -eo pid,ppid,user,stat,%cpu,%mem,cmd --sort=-%cpu | head
pgrep -a nginx
kill -TERM <pid>
top -p <pid>
Step 3 Verification and output interpretation Verify boundary
Verification path. Correlate unit state with MainPID/cgroup membership and then with the service-specific listener, socket, file or transaction that represents useful work. Use process state, exit code/reason, journal for the same boot/unit, and dependency results. For restart loops, preserve timestamps and counters before intervening. Verify enablement only when persistence across boot matters; verify current runtime separately. A green active status is a starting point, not end-to-end evidence.
Existing fast checks for this Topic. - Pin the workload, host/container namespace and observation timestamp before interpreting a PID.
- Capture PID, PPID, start time, executable/cmdline, credentials and relevant cgroup/unit association.
- Inspect scheduler/process state and resource use without substituting them for application-level readiness.
- Repeat the original workload/service check after any process-control action.
Verification chain. workload invocation → process creation/exec → PID + start-time identity → credentials/cgroup/unit → scheduler state + resources → signals/waits/exits → service/application readiness → workload result
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: operators rely only on a PID or top output, confuse process existence with readiness, or kill/restart without proving the first failing step.
Process evidence shows facts about a captured execution context; it does not by itself show that dependencies, sockets, data paths or application-level acceptance are healthy.
Next check: Continue from the first step that has not been verified: reacquire stable process identity, inspect effective loaded unit configuration and dependency/job state, correlate process/cgroup plus journal evidence, then run the original readiness/workload test before changing additional settings.
Step 5 Common mistakes Narrow the fault
kill -9as the first option.- Killing the parent but leaving children.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Subtopics
Go one level deeper into this subject.
The Linux process model combines task creation, exec, virtual memory, file-descriptor inheritance, credentials, namespaces, signals, scheduling and exit/wait semantics into the execution context visible to user space.
Subtopic PID / PPIDPID identifies a process within a PID namespace at a point in time, while PPID records its parent relationship; both are transient numeric references whose meaning depends on namespace and process lifetime.
Subtopic bg / fgbg and fg are shell job-control operations that continue a stopped job in the background or bring a shell-managed job to the foreground; they operate on the shell job table, not on arbitrary system services.
Subtopic Process StatesLinux process states summarize what a task is doing from the scheduler/kernel perspective, such as runnable/running, interruptible sleep, uninterruptible sleep, stopped/traced or zombie; state is a diagnostic clue rather than a root-cause verdict.
Find the process first, then its owner (systemd unit, shell, cron) — restart it through that owner, not by killing it. A service may have several processes; systemctl status shows its cgroup.
ps -eo pid,ppid,user,stat,%cpu,%mem,etime,cmd --sort=-%cpu | head— processes by CPU with parent and statepstree -p <pid>— process treetop / htop— live CPU and memorycat /proc/<pid>/status— state, threads and memory of one process
ReferenceWhat it is1 section · depth on demand
Core model
Start from the exact workload invocation and identify the resulting process or process tree. Capture PID plus a stable correlator such as start time, executable/cmdline or service unit because PIDs are reusable. Separate process existence from scheduler state, resource consumption, signal handling and application readiness; a running PID is only evidence that a process exists in that observation window.
ReferenceWhy it matters1 section · depth on demand
How it works in operation
Processes, namespaces, filesystems, devices, sockets and cgroups each have identity and lifecycle boundaries.
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
Process evidence shows facts about a captured execution context; it does not by itself show that dependencies, sockets, data paths or application-level acceptance are healthy.
In depth
Inspecting processes with ps
ps gives a snapshot of running processes. Knowing a few formats makes it a precise tool. The ps(1) manual page describes the option styles:
- UNIX options take a dash and can be grouped (
ps -ef). - BSD options take no dash (
ps aux). - GNU long options use two dashes (
--forest).
-o selects exactly which columns to show, and columns can be renamed. Processes marked <defunct> are dead but haven't yet been cleaned up by their parent.
Useful columns (manual)
| Column | Meaning |
|---|---|
pid, ppid | Process and parent process ID |
stat | State, with BSD flags such as s (session leader), l (multi-threaded), + (foreground) |
etime | Elapsed time since start |
rss | Resident memory in KiB |
vsz | Virtual memory size in KiB |
comm / args | Program name / full command line |
Common views
| Goal | Command |
|---|---|
| All processes, full format | ps -ef |
| All, with CPU and memory | ps aux |
| Tree | ps -ef --forest or pstree -p |
| Top memory users | ps -eo pid,user,rss,comm --sort=-rss | head |
| One program | ps -C nginx -o pid,ppid,stat,etime,args |
| Threads | ps -L -p <pid> |
| Which unit owns a process | ps -o pid,unit,comm -p <pid> |
Snapshot or live view
ps shows one moment. top or htop show live data, and pidstat shows per-process statistics over time. A process using CPU in short bursts may not show up in a single ps sample.
host$ ps -C nginx -o pid,ppid,user,stat,etime,rss,args
PID PPID USER STAT ELAPSED RSS COMMAND
1203 1 root Ss 02:31:05 2124 nginx: master process /usr/sbin/nginx
1204 1203 www-data S 02:31:05 6880 nginx: worker process
1205 1203 www-data S 02:31:05 6912 nginx: worker process
host$ ps -eo pid,user,rss,comm --sort=-rss | head -4
host$ ps -ef --forest | grep -A3 '[s]shd:'
host$ ps -o pid,unit,comm -p 1203
PID UNIT COMMAND
1203 nginx.service nginx
host$ ps -eo stat,pid,ppid,comm | awk '$1 ~ /^Z/'
Reading the example
The master process runs as root with parent PID 1 (systemd), and Ss marks it as a sleeping session leader. The workers are its children, running as www-data. That's the expected shape of a pre-forking daemon. The last command lists zombie processes, if any.
Documented example, not captured output.
How it works at runtime
Processes is part of Processes. Processes are the running execution contexts Linux schedules and accounts for: each process has an identity, credentials, address space, open resources, scheduling attributes, parentage and observable lifecycle state that must be correlated with the workload it represents.
Runtime state ownership and mechanics. Processes have PID/TID identity, parentage, credentials, namespaces, cgroups, open files, memory mappings, scheduling state and signal disposition. systemd adds unit state, dependency ordering, cgroup ownership, restart policy and activation semantics above the raw process model. A service unit can be active while a child workload is degraded, and a daemon process can exist outside the intended unit or with stale configuration.
Topic-specific state model. Processes are the running execution contexts Linux schedules and accounts for: each process has an identity, credentials, address space, open resources, scheduling attributes, parentage and observable lifecycle state that must be correlated with the workload it represents.
Technical metadata. Host/container, boot/session context, timestamp, PID namespace, PID/PPID + start time, executable/cmdline, process state, credentials, cgroup, canonical unit name/type, fragment path + drop-ins, load/unit-file state, requirement and ordering edges, systemd job result, MainPID/control process, active/sub/result state, journal correlation, readiness probe, original workload result.
Interpretation rule. - Process exists ≠ application is ready or healthy.
- PID value ≠ stable process identity across time because Linux reuses PIDs.
- CPU or memory consumption ≠ root cause without workload and time correlation.
- Signal delivered ≠ target process performed the intended shutdown/reload action.
Quick reference
Process inspection toolkit:
ps -eo pid,ppid,user,stat,%cpu,%mem,etime,cmd --sort=-%cpu | head
pstree -ap | less
top / htop / atop
pgrep -a nginx; pkill -f 'python worker.py'
lsof -p <pid>; ls -l /proc/<pid>/fd
systemctl status <pid> # which unit owns this PID
nice -n 10 cmd; renice +5 -p <pid>; ionice -c3 -p <pid>
Limits and how it fails
Primary failure point. Process evidence shows facts about a captured execution context; it does not by itself show that dependencies, sockets, data paths or application-level acceptance are healthy.
Process CPU/memory symptoms can originate in kernel wait, I/O, child processes or cgroup limits rather than application code alone.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Restart, reload and start each have different semantics. Preserve unit override ownership instead of editing vendor unit files unless replacement is deliberate and maintained.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Processes. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://gitlab.com/procps-ng/procps · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Processes operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for Processes.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | Processes are the running execution contexts Linux schedules and accounts for: each process has an identity, credentials, address space, open resources, scheduling attributes, parentage and observable lifecycle state that must be correlated with the workload it represents. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin host/container + timestamp → identify exact process or unit → capture PID plus start identity and cgroup/unit → resolve effective unit fragment + drop-ins → inspect dependency/order transaction → record systemd job result → verify process/cgroup and active/sub state → prove application readiness → repeat the original workload test. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | workload invocation → process creation/exec → PID + start-time identity → credentials/cgroup/unit → scheduler state + resources → signals/waits/exits → service/application readiness → workload result | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | Process evidence proves facts about a captured execution context; it does not by itself prove that dependencies, sockets, data paths or application-level acceptance are healthy. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux process/systemd evidence can establish this proof path: workload invocation → process creation/exec → PID + start-time identity → credentials/cgroup/unit → scheduler state + resources → signals/waits/exits → service/application readiness → workload result | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove behavior outside the captured process, manager, unit, dependency, runtime or application scope. Process evidence proves facts about a captured execution context; it does not by itself prove that dependencies, sockets, data paths or application-level acceptance are healthy. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven boundary: reacquire stable process identity, inspect effective loaded unit configuration and dependency/job state, correlate process/cgroup plus journal evidence, then run the original readiness/workload test before changing additional settings. | Continue to the next unresolved boundary while preserving the original test condition. |
Processes · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | Processes |
|---|---|
| Topic path | Processes |
| Runtime state | Processes are the running execution contexts Linux schedules and accounts for: each process has an identity, credentials, address space, open resources, scheduling attributes, parentage and observable lifecycle state that must be correlated with the workload it represents. |
| Fast checks | - Pin the workload, host/container namespace and observation timestamp before interpreting a PID. - Capture PID, PPID, start time, executable/cmdline, credentials and relevant cgroup/unit association. - Inspect scheduler/process state and resource use without substituting them for application-level readiness. - Repeat the original workload/service check after any process-control action. |
| Verification chain | workload invocation → process creation/exec → PID + start-time identity → credentials/cgroup/unit → scheduler state + resources → signals/waits/exits → service/application readiness → workload result Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary. |
| Failure boundary | Process evidence proves facts about a captured execution context; it does not by itself prove that dependencies, sockets, data paths or application-level acceptance are healthy. Boundary chain: process/context → userspace configuration → kernel subsystem/resource → device/network/filesystem dependency → effective state → original workload. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |