Product SiteDocumentation Site

Chapter 5. Using Pacemaker Command-Line Tools

Table of Contents

5.1. Controlling Command Line Output
5.2. Monitor a Cluster with crm_mon
5.2.1. Styling crm_mon output
5.3. Edit the CIB XML with cibadmin
5.4. Batch Configuration Changes with crm_shadow
5.5. Simulate Cluster Activity with crm_simulate
5.5.1. Replaying cluster decision-making logic
5.5.2. Why decisions were made
5.5.3. Visualizing the action sequence
5.5.4. What-if scenarios
5.6. Manage Node Attributes, Cluster Options and Defaults with crm_attribute and attrd_updater
5.7. Other Commonly Used Tools

5.1. Controlling Command Line Output

Some of the pacemaker command line utilities have been converted to a new output system. Among these tools are crm_mon and stonith_admin. This is an ongoing project, and more tools will be converted over time. This system lets you control the formatting of output with --output-as= and the destination of output with --output-to=.
The available formats vary by tool, but at least plain text, HTML, and XML are supported by all tools. The default format is plain text. The default destination is stdout but can be redirected to any file. Some formats support command line options for changing the style of the output. For instance:
# crm_mon --help-output
Usage:
  crm_mon [OPTION?]

Provides a summary of cluster's current state.

Outputs varying levels of detail in a number of different formats.

Output Options:
  --output-as=FORMAT                Specify output format as one of: console (default), html, text, xml
  --output-to=DEST                  Specify file name for output (or "-" for stdout)
  --html-cgi                        Add text needed to use output in a CGI program
  --html-stylesheet=URI             Link to an external CSS stylesheet
  --html-title=TITLE                Page title
  --text-fancy                      Use more highly formatted output