ps

package
v0.0.24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package ps implements the ps builtin command.

ps — report process status

Usage: ps [-e|-A] [-f] [-p PIDLIST] [-o FORMAT] [--sort SPEC] [--help]

Display information about running processes. By default shows processes in the current session (ancestor chain from the current process). The CMD column reports only the process comm/executable name; ps does not read or expose process argv.

Accepted flags:

-e, -A
    Select all processes.

-f
    Full-format listing: UID PID PPID C STIME TTY TIME CMD

-p PIDLIST
    Select processes by comma- or space-separated PID list.

-o FORMAT, --format FORMAT
    Select output columns from a fixed safe field set. FORMAT is a comma-
    or space-separated list and the option may be repeated.

--sort SPEC
    Sort by comma- or space-separated fields. Prefix a field with - for
    descending order or + for ascending order.

--help
    Print usage to stdout and exit 0.

Output columns (default):

PID TTY TIME CMD

Output columns (-f):

UID PID PPID C STIME TTY TIME CMD

Exit codes:

0  Success (even if 0 processes match).
1  Invalid PID value or OS error fetching process list.

Index

Constants

This section is empty.

Variables

View Source
var Cmd = builtins.Command{
	Name:        "ps",
	Description: "report process status",
	MakeFlags:   registerFlags,
}

Cmd is the ps builtin command descriptor.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL