initctl2dot
Visualize Upstart jobs as a graph
SYNOPSIS
initctl2dot [OPTIONS]
PARAMETERS
-a, --all
Include all Upstart jobs in the graph, even those without explicit 'start on' or 'stop on' event dependencies recorded by the tool. By default, it only includes jobs directly involved in events.
-n, --no-sessions
Exclude session jobs (jobs located in /usr/share/upstart/sessions) from the generated graph. These jobs are typically user-specific or desktop environment-related.
-o FILE, --output FILE
Write the generated DOT graph to the specified FILE instead of printing it to standard output (stdout). This is useful for saving the graph description directly.
-d DIRECTORY, --directory DIRECTORY
Specify an additional DIRECTORY to scan for Upstart job configuration files. This option can be used multiple times to include jobs from various custom locations.
DESCRIPTION
The initctl2dot command is a utility for generating a graphical representation of Upstart job dependencies. It parses Upstart job configuration files (typically found in /etc/init, /etc/init.d, and /usr/share/upstart/sessions) to identify 'start on' and 'stop on' conditions and construct a directed graph showing how jobs relate to each other.
The output is in the DOT language, a plain text graph description language, which can then be processed by graph visualization software like Graphviz (specifically the dot command) to render various image formats (e.g., PNG, SVG). This tool is invaluable for system administrators and developers to understand, analyze, and troubleshoot the boot sequence and service interdependencies on systems using the Upstart init system.
CAVEATS
initctl2dot is part of the Upstart init system, which has largely been superseded by systemd in most modern Linux distributions (e.g., Debian, Ubuntu from 15.04 onwards, Fedora, CentOS, RHEL). Consequently, this command is primarily useful on older systems or distributions that still utilize Upstart. It only generates the graph description; external tools like Graphviz (specifically the dot command) are required to render the visual graph.
TYPICAL USAGE
The most common way to use initctl2dot is to pipe its output directly to the dot command from the Graphviz package to generate an image file:initctl2dot | dot -Tpng -o upstart_dependencies.png
This command will generate a PNG image named upstart_dependencies.png showing the job dependencies. You can replace 'png' with 'svg' for a scalable vector graphics output.
HISTORY
initctl2dot was developed as a diagnostic and visualization tool within the Upstart project by Canonical Ltd. Upstart served as the default init system for Ubuntu from version 6.10 (Edgy Eft) until 14.10 (Utopic Unicorn). During this period, initctl2dot was a valuable utility for understanding the complex boot processes and service dependencies. Its prominence declined as Linux distributions, including Ubuntu, transitioned to systemd as their primary init system, rendering Upstart-specific tools less relevant on newer installations.