LangStop
ps
Ready
Editor

Configuration

Report a snapshot of current processes

Flags & Options

Add flags from the picker below...

Tests

-e
All processes

Select all processes, identical to -A (-e).

-A
All processes (alt)

Select all processes (-A). Equivalent to -e.

a
All with tty (BSD)

Lift the 'only yourself' restriction — show processes of all users that have a terminal (BSD style).

x
Include no-tty (BSD)

Include processes without a controlling terminal (BSD style). Combine with a for all processes.

-u
Select by user

Select processes by effective user name or UID. Comma-separated list accepted (-u userlist).

-U
Select by real user

Select processes by real user name or UID (-U userlist).

-g
Select by session / group

Select by session leader or effective group name (-g grplist).

-G
Select by real group

Select processes whose real group name or GID matches (-G grplist).

-p
Select by PID

Select by process ID. Comma-separated list accepted (-p pidlist).

--ppid
Select by parent PID

Select processes whose parent PID matches (--ppid pidlist).

-t
Select by terminal

Select by terminal (tty). Use - to select processes without a tty (-t ttylist).

-C
Select by command name

Select by the executable name (not command line) (-C cmdlist).

--sid
Select by session ID

Select processes by session ID (--sid sidlist).

-f
Full-format listing

Full-format listing: UID, PID, PPID, C, STIME, TTY, TIME, CMD (-f).

-F
Extra full-format

Extra full-format: like -f plus SZ, RSS, PSR, STIME (-F).

-l
Long format

Long format: adds flags, state, priority, nice, wchan (-l).

u
User-oriented format (BSD)

Display user-oriented format with %CPU, %MEM, VSZ, RSS (BSD style: u).

v
Virtual memory format (BSD)

Display virtual memory format (BSD style: v).

j
Jobs format (BSD)

BSD jobs format: includes PGID and SID (j).

-j
Jobs format (POSIX)

POSIX jobs format (-j).

-o
Custom output columns

User-defined format. Comma or space-separated list of column names (-o format). Common fields: pid, ppid, uid, user, group, comm, cmd, args, %cpu, %mem, vsz, rss, stat, start, etime, tty, wchan, ni, pri, psr.

o
Custom output columns (BSD)

BSD-style user-defined format (o format).

--format
Custom format (long opt)

Same as -o but using the long option form (--format=format).

-H
Show process hierarchy

Show process hierarchy (forest) by indenting command names (-H).

--forest
ASCII art tree

Display process tree using ASCII art (--forest).

-w
Wide output

Wide output — do not truncate long lines. Use twice (-ww) for unlimited width (-w).

--no-headers
No column headers

Do not print column headers (--no-headers).

--headers
Repeat headers

Repeat column headers on each page of output (--headers).

-c
Show true command name

Show the true command name (from kernel) rather than the full command line with args (-c).

--sort
Sort by column

Sort output by the specified column. Prefix with - for descending, + for ascending (--sort=spec). Examples: -%cpu, +pid, -rss.

k
Sort key (BSD)

BSD-style sort specification (k sort-key).

-L
Show threads

Show threads, with LWP (light-weight process) and NLWP columns (-L).

-T
Show threads (SPID)

Show threads with SPID column (-T).

H
Show threads as processes (BSD)

Show threads as if they were processes (BSD style: H).

m
Show threads after process (BSD)

Show threads after the process they belong to (BSD style: m).

-M
Security data (SELinux)

Add a column of security data (SELinux context) (-M / Z).

--pid
Select PIDs (long opt)

Same as -p but using the long option form (--pid=pidlist).

-q
Quick PID selection

Select by PID quickly without additional checks or sorting — useful for scripts (-q pidlist / --quick-pid).

r
Running processes only (BSD)

Restrict output to running processes (BSD style: r).

--cumulative
Include dead child CPU time

Include some dead child process data (--cumulative).

-y
No flags, RSS instead of ADDR

Do not show flags; show rss in place of addr. Only used with -l (-y).

Live Output

Command
ps

PRO TIP:ps aux and ps -ef are the two most common invocations — aux is BSD style, -ef is POSIX style.

UTF-8
LangStop DevTools v1.0.0
;

PS Command Builder - Interactive Linux Process Monitor Tool

Meta Information

Title Tag: PS Command Builder | Interactive Linux Process Status Generator Meta Description: Build ps commands visually with our interactive generator. Monitor processes, sort by CPU/memory, filter by user, and customize output formats without memorizing syntax. Free Linux tool. Keywords: ps command generator, ps aux explained, linux process monitor, ps command builder, process status tool, sort processes by cpu, sort processes by memory, linux pid finder


Structured Data (JSON-LD)

{
  "@context": "https://schema.org",
  "@type": "WebApplication",
  "name": "PS Command Builder",
  "description": "Interactive visual builder for Linux ps process monitoring commands",
  "applicationCategory": "DeveloperApplication",
  "operatingSystem": "Linux, macOS, Unix",
  "offers": {
    "@type": "Offer",
    "price": "0",
    "priceCurrency": "USD"
  },
  "featureList": [
    "Visual ps command generation",
    "Process filtering by user/PID/command",
    "CPU and memory sorting options",
    "Custom output column formatting",
    "Process tree/hierarchy views",
    "Process state code reference"
  ]
}

Main Content

What is the PS Command?

The ps (process status) command displays information about currently running processes on Linux and Unix-like systems [^20^]. It provides a static snapshot of processes at the moment the command executes, unlike interactive monitors like top [^18^].

Common Use Cases:

  • Identify process IDs (PIDs) for management tasks
  • Monitor CPU and memory usage by process
  • Find specific processes by name or user
  • Display process hierarchies and parent-child relationships
  • Troubleshoot system performance issues
  • Generate reports for system administration

Why Use This PS Command Builder?

Building ps commands requires understanding complex option combinations. Our visual builder helps you:

  • ✅ Generate commands without syntax errors
  • ✅ Understand BSD vs POSIX option styles
  • ✅ Copy production-ready commands instantly
  • ✅ Learn process monitoring through interactive examples

Core Features

1. Process Selection Filters

Control which processes appear in output:

  • All processes (-e/-A): Show every process on the system [^20^]
  • By user (-u): Filter processes by specific username [^20^]
  • By PID (-p): Select specific process IDs [^21^]
  • By command (-C): Find processes by executable name [^20^]
  • By terminal (-t): Show processes attached to specific TTY [^21^]

2. Output Format Control

Customize how process information displays:

  • Full format (-f): Show detailed process information including PPID [^20^]
  • Long format (-l): Display scheduler and priority details [^21^]
  • User-oriented (u): Show CPU/memory percentages [^21^]
  • Custom columns (-o): Select specific output fields [^18^]
  • Forest view (--forest): Display process hierarchy as ASCII tree [^20^]

3. Sorting Options

Organize output by resource usage:

  • By CPU (--sort=-%cpu): Show highest CPU consumers first [^18^]
  • By memory (--sort=-%mem): Display highest memory usage first [^18^]
  • By PID (--sort=pid): Order by process ID [^21^]
  • By time (--sort=start_time): Sort by process start time [^19^]

4. Process State Reference

Understand process states in output:

  • R (Running): Currently executing or in run queue
  • S (Sleeping): Waiting for an event to complete
  • D (Disk sleep): Uninterruptible sleep, usually IO
  • Z (Zombie): Terminated but not reaped by parent [^18^]
  • T (Stopped): Suspended by job control signal

Common PS Command Patterns

Basic Process Monitoring

# Show all processes (BSD style)
ps aux
 
# Show all processes (POSIX style)
ps -ef
 
# Show your current terminal processes
ps
 
# Show detailed process info with extra columns
ps -eF

Resource Usage Analysis

# Sort by CPU usage (highest first)
ps aux --sort=-%cpu | head -10
 
# Sort by memory usage
ps aux --sort=-%mem | head -10
 
# Show processes consuming >50% CPU
ps aux | awk '$3 > 50 {print $0}'
 
# Display memory details for specific process
ps -p 1234 -o pid,rss,vsz,pmem,cmd

Process Filtering

# Find processes by name
ps -C nginx
 
# Show processes for specific user
ps -u username
 
# Show process by PID with full details
ps -fp 1234
 
# Find processes excluding specific pattern
ps aux | grep -v grep | grep python
 
# Show children of specific process
ps --ppid 1234

Process Tree Views

# ASCII art process tree
ps axjf
 
# Forest view with custom columns
ps -ef --forest
 
# Show process hierarchy
ps -ejH
 
# Tree with specific info
ps -eo pid,ppid,cmd --forest

Custom Output Formats

# Show specific columns only
ps -eo pid,ppid,user,cmd,%cpu,%mem
 
# Include start time and elapsed time
ps -eo pid,lstart,etime,cmd
 
# Show thread information
ps -eLf
 
# Security context (SELinux)
ps -eo pid,context,cmd

Understanding PS Output Columns

Standard Columns (ps aux)

Column Description
USER Username of process owner
PID Process ID (unique identifier)
%CPU CPU usage percentage
%MEM Physical memory usage percentage
VSZ Virtual memory size (KB)
RSS Resident Set Size - actual RAM used (KB)
TTY Terminal device (? = none)
STAT Process state code (R, S, D, Z, T)
START Process start time or date
TIME Cumulative CPU time consumed
COMMAND Command that started the process

Full Format Columns (ps -ef)

Column Description
UID User ID number
PID Process ID
PPID Parent Process ID
C CPU utilization
STIME Start time
TTY Terminal
TIME CPU time
CMD Command with arguments

PS Command Options Reference

Process Selection

Option Description
-e, -A Select all processes
-a Select all except session leaders
-d Select all except session leaders
-N, --deselect Negate selection
-C cmd Select by command name [^20^]
-G group Select by real group ID/name
-g group Select by session or group ID
-p pid Select by process ID [^21^]
--ppid pid Select by parent PID
-s sid Select by session ID
-t tty Select by terminal
-U user Select by real user ID
-u user Select by effective user ID
x Include processes without TTY

Output Format

Option Description
-f Full format listing
-F Extra full format
-l Long format
-j Jobs format
u User-oriented format
s Signal format
v Virtual memory format
-o format User-defined format
-O format Preloaded default + custom

Output Modifiers

Option Description
--forest ASCII art process tree
-H Show process hierarchy
-w Wide output
--no-headers Suppress header line
--sort key Sort by column [^18^]
c Show true command name
e Show environment variables

Process State Codes Explained

Understanding the STAT column is crucial for troubleshooting [^18^]:

State Meaning Description
R Running Currently executing or runnable
S Sleeping Interruptible sleep (waiting for event)
D Disk sleep Uninterruptible sleep (usually IO)
Z Zombie Terminated but parent hasn't reaped
T Stopped Suspended by signal or debugging
W Paging Swapped out (deprecated)
X Dead Should never be seen
< High priority Nice value < 0
N Low priority Nice value > 0
L Locked pages Has pages locked in memory
s Session leader Process is session leader
l Multi-threaded Multi-threaded process
+ Foreground Running in foreground

FAQ

What is the difference between ps aux and ps -ef?

Both list all processes but use different option styles. ps aux uses BSD style (no dashes) and shows CPU/memory percentages [^19^]. ps -ef uses POSIX style (with dashes) and includes the PPID column [^18^]. Choose one format consistently for scripting.

How do I sort ps output by CPU usage?

Use ps aux --sort=-%cpu to sort by CPU percentage in descending order (highest first). Remove the minus sign for ascending order [^18^].

How do I find the PID of a specific process?

Use ps -C processname to find by command name, or ps aux | grep pattern for partial matches. For known PIDs, use ps -p PID [^18^].

What does zombie process mean?

A zombie process (state Z) has terminated but its parent process hasn't read its exit status. Zombies consume minimal resources but indicate potential issues with parent processes [^18^].

Can I use ps inside Docker containers?

Yes, but ps only sees processes within the container's PID namespace. PID 1 in a container is your entrypoint, not the host init system. Install procps package if ps is missing [^18^].

How do I show process trees?

Use ps axjf or ps -ef --forest to display hierarchical parent-child relationships. This helps visualize process relationships and service dependencies [^20^].

How can I monitor processes continuously?

While ps shows a static snapshot, you can wrap it in a loop: watch -n 1 'ps aux --sort=-%cpu | head' or use top for interactive monitoring [^19^].

What is RSS vs VSZ in ps output?

RSS (Resident Set Size) is actual physical RAM used. VSZ (Virtual Memory Size) is the total virtual address space allocated, including swapped-out pages and shared libraries [^19^].


Technical Specifications

  • Zero dependencies: Runs entirely in browser
  • No backend required: Static hosting compatible
  • Offline capable: Works without internet after initial load
  • Privacy focused: No data leaves your browser
  • Keyboard shortcuts: Full keyboard navigation support

Related Tools

  • top Command Reference
  • htop Interactive Monitor
  • pgrep Process Finder
  • pkill Process Killer
  • kill Command Builder
  • Systemctl Service Manager

Resources


Last Updated: 2025 License: Free to use Platform: Web-based, works on all modern browsers