LinuxCommandLibrary

initctl2dot

Visualize Upstart jobs as a graph

SYNOPSIS

initctl2dot [-h] [-V] [--debug] [-o FILE] [job ...]

PARAMETERS

-h, --help
    Display usage summary and exit

-V, --version
    Print version information and exit

--debug
    Enable verbose debug logging to stderr

-o FILE, --output FILE
    Write DOT output to FILE (default: stdout)

job ...
    Optional list of job names to include; defaults to all jobs

DESCRIPTION

initctl2dot is a specialized utility for systems using Upstart, the event-based init replacement for SysV init, primarily in Ubuntu 10.04-15.04. It analyzes initctl output to generate Graphviz DOT files representing job dependencies, start/stop conditions, and event relationships.

This enables administrators to create visual diagrams of service interactions, aiding troubleshooting of boot sequences, dependency cycles, or ordering issues. The tool queries the running Upstart daemon via initctl show-config and parses job stanzas like start on, stop on, and task to build directed graphs.

Output DOT files can be processed with dot(1) or other Graphviz tools to produce PNG, SVG, or PDF images. For example, filtering to specific jobs simplifies large graphs. While powerful for legacy systems, it's limited to Upstart environments and requires root or appropriate permissions for full initctl access.

Key benefits include identifying hidden dependencies invisible in initctl list, supporting complex event-driven setups like cloud-init or plymouth. Deprecated with systemd's rise, it remains useful for maintaining old deployments or historical analysis. (187 words)

CAVEATS

Requires Upstart init system and initctl access (often root). Upstart deprecated post-Ubuntu 15.10; use systemd-analyze(1) plot on modern systems.
Large graphs may be unwieldy; filter with job args.

EXAMPLE USAGE

View all jobs:
initctl2dot | dot -Tpng > deps.png

Filter apache2:
initctl2dot apache2 | dot -Tsvg > apache.svg

PERMISSIONS

Non-root users see only emitted jobs; run as root for full graph.
May need sudo on restricted systems.

HISTORY

Introduced in Upstart 1.6.1 (2012) by Scott James Remnant (Keybuk) for Ubuntu. Enhanced in later versions for better event parsing. Archived post-Upstart deprecation in 2015.

SEE ALSO

initctl(8), upstart(8), dot(1), graphviz(1)

Copied to clipboard