Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

Processes

Direct answer

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.

When to use this

Use it as the entry point when a program hangs, uses too many resources, or will not start or stop.

First 30 seconds

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.

Operational verification

parent forks → child execs the program → runs as a user with limits → exits with a status → parent reaps it

Evidence · next step

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
Platform / version applicability
linux
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformlinux
Key commandps
Scope / prerequisiteUse it as the entry point when a program hangs, uses too many resources, or will not start or stop.
Reference · 11
What next?3 suggested next steps
Child topics (this level)4
Catalog command links11
Evidence1
On this pageJump to a specific section
Linux command reference

Primary Commands

Configuration and operational commands for this Topic.

psReference
ps

Capture 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.

Linux · state
topReference
top

Interactively 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.

Linux · mixed
htopReference
htop

Interactively 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.

Linux · mixed
pgrepReference
pgrep

Return 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.

Linux · state
pkillReference
pkill

Send 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.

Linux · state
killReference
kill

Send 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.

Linux · state
killallReference
killall

Send 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.

Linux · state
niceReference
nice

Start 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.

Linux · state
reniceReference
renice

Change 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.

Linux · state
jobsReference
jobs

List 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.

Linux · state
nohupReference
nohup

Run 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.

Linux · state
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

5 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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 -9 as the first option.
  • Killing the parent but leaving children.
Evidence references

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.

observation · 1
Drill down

Subtopics

Go one level deeper into this subject.

Key points

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.

Key checks
  • ps -eo pid,ppid,user,stat,%cpu,%mem,etime,cmd --sort=-%cpu | head — processes by CPU with parent and state
  • pstree -p <pid> — process tree
  • top / htop — live CPU and memory
  • cat /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)

ColumnMeaning
pid, ppidProcess and parent process ID
statState, with BSD flags such as s (session leader), l (multi-threaded), + (foreground)
etimeElapsed time since start
rssResident memory in KiB
vszVirtual memory size in KiB
comm / argsProgram name / full command line

Common views

GoalCommand
All processes, full formatps -ef
All, with CPU and memoryps aux
Treeps -ef --forest or pstree -p
Top memory usersps -eo pid,user,rss,comm --sort=-rss | head
One programps -C nginx -o pid,ppid,stat,etime,args
Threadsps -L -p <pid>
Which unit owns a processps -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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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>
Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor doclinux current

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%
Technical changelog & impact

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.

Terminology layer

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.

Aliases that resolve here
linux processesprocess management linuxlinux process lifecycleprocess troubleshooting
Embedded reference data

Quick lookup tables

Processes operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for Processes.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateProcesses 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 verificationPin 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 chainworkload invocation → process creation/exec → PID + start-time identity → credentials/cgroup/unit → scheduler state + resources → signals/waits/exits → service/application readiness → workload resultTrace requested/configured state through effective state to the observed workload result.
Failure boundaryProcess 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 evidenceCorrelated 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 resultUse this observation only for the specific claim it actually supports.
Evidence limitIt 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 checkContinue 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 boundaryProcesses
Topic pathProcesses
Runtime stateProcesses 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 chainworkload 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 boundaryProcess 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 ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.
Confirmation

Confirm action

Continue?