rc-status
Show status of services (runlevels)
TLDR
Show a summary of services and their status
Include services in all runlevels in the summary
List services that have crashed
List manually started services
List supervised services
Display the current runlevel
List all runlevels
SYNOPSIS
rc-status [-a|--all] [-c|--crashed] [-f <format>|--format=<format>] [-l|--list-runlevels] [-r <runlevel>|--runlevel=<runlevel>] [-s|--services-only] [-v|--verbose]
PARAMETERS
-a, --all
Displays the status of services across all defined runlevels on the system, not just the currently active ones.
-c, --crashed
Filters the output to show only services that are currently in a crashed state, indicating an unexpected termination.
-f <format>, --format=<format>
Specifies the output format for the status information. Common formats include 'json', 'xml', 'csv', or 'bare' for scripting purposes.
-l, --list-runlevels
Lists all available runlevels configured on the system, which define different sets of services for various operating modes.
-r <runlevel>, --runlevel=<runlevel>
Displays the status of services only within the specified <runlevel>, such as 'boot', 'sysinit', or 'default'.
-s, --services-only
Suppresses the display of runlevel headers, showing only the services and their respective statuses in a more compact list.
-v, --verbose
Provides more detailed information about each service, often including its process ID (PID) if it's running.
DESCRIPTION
The rc-status command is a fundamental utility within the OpenRC init system, designed to provide a comprehensive overview of the current state of services managed by OpenRC. It helps system administrators monitor which services are running, stopped, or in various other states such as crashed, inactive, or hotplugged. By default, it categorizes services by their respective runlevels (e.g., boot, sysinit, default), offering a structured view of the system's operational services. The output is typically color-coded to visually distinguish service states, making it an indispensable tool for quick health checks and initial troubleshooting on OpenRC-based Linux distributions like Gentoo or Alpine Linux. It offers various options to filter the display, such as showing only crashed services, all runlevels, or a specific runlevel.
CAVEATS
The rc-status command is specific to systems utilizing the OpenRC init system. It will not function on distributions that use other init systems like systemd (e.g., Ubuntu, Fedora, Debian) or SysVinit (older distributions). Compatibility with specific format options (e.g., 'json') might vary depending on the OpenRC version installed.
OUTPUT COLOR CODING
The default output of rc-status employs color coding for rapid visual assessment:
Green: Service is running/started.
Red: Service is stopped or crashed.
Yellow: Service is inactive, hotplugged, or in an otherwise non-running but not errored state.
White/Gray: Service is undefined or unknown.
HISTORY
rc-status is an integral part of OpenRC, an init system initially developed for Gentoo Linux as an alternative to the traditional SysVinit scripts. OpenRC aimed to provide a more modular, parallel, and dependency-aware service management framework. rc-status has been a core component since OpenRC's inception, providing users and administrators with a clear, real-time snapshot of the system's running services, embodying OpenRC's philosophy of transparency and control over system processes.
SEE ALSO
rc-service(8), rc-update(8), rc-manager(8), openrc(8), init(8)