PACEMAKER(8)

๐Ÿ’– PACEMAKER(8) โ€” like, the whole cluster resource manager vibe ๐Ÿ’–

Manual name: System Administration Utilities โ€” yes bestie, this is one of those pages, the big system-admin ones ๐Ÿซถ


โœจ NAME โœจ

Pacemaker โ€” she's part of the Pacemaker cluster resource manager, and honestly? She's the whole personality of it ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

crm_simulate <data source> <operation> [options]

That's the shape of it, ok? data source, operation, options. Simple as. ๐Ÿ’–


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

crm_simulate โ€” simulate a Pacemaker cluster's response to events. That's the whole gig: you feed it a scenario, it tells you what the cluster would do. Iconic, no cap ๐Ÿ”ฅ


๐ŸŽ€ OPTIONS ๐ŸŽ€

๐Ÿ’œ Help Options:

  • -h, --help โ€” show help options. The classic. The "wait what does this do again" button ๐Ÿ™ˆ
  • --help-all โ€” show all help options. Every last one, go off ๐Ÿ‘‘
  • --help-output โ€” show output help
  • --help-operations โ€” show operations options
  • --help-synthetic โ€” show synthetic cluster event options
  • --help-artifact โ€” show artifact options
  • --help-source โ€” show data source options

๐ŸŽ€ Output Options:

  • --output-as=FORMAT โ€” specify output format as one of: text (default), xml. Pick your fighter ๐Ÿ’…
  • --output-to=DEST โ€” specify file name for output (or - for stdout). Yes, dash means stdout, she's that girl โœจ

โš™๏ธ Operations:

  • -R, --run โ€” process the supplied input and show what actions the cluster will take in response. Forecaster energy ๐Ÿ”ฎ
  • -S, --simulate โ€” like --run, but also simulate taking those actions and show the resulting new status. Now we're actually doing it ๐Ÿ’ซ
  • -X, --in-place โ€” like --simulate, but also store the results back to the input file. Careful bestie, she writes back to your input ๐Ÿ˜ญ
  • -A, --show-attrs โ€” show node attributes
  • -c, --show-failcounts โ€” show resource fail counts. The receipts ๐Ÿ’€
  • -s, --show-scores โ€” show allocation scores
  • -U, --show-utilization โ€” show utilization information
  • -P, --profile=DIR โ€” process all the XML files in the named directory to create profiling data
  • -N, --repeat=N โ€” with --profile, repeat each test N times and print timings. Numbers go brrr โฑ๏ธ

๐Ÿ‘พ Synthetic Cluster Events:

  • -u, --node-up=NODE โ€” simulate bringing a node online. Rise and shine bb ๐ŸŒž
  • -d, --node-down=NODE โ€” simulate taking a node offline
  • -f, --node-fail=NODE โ€” simulate a node failing. We're in the drama arc now ๐Ÿ’€
  • -i, --op-inject=OPSPEC โ€” generate a failure for the cluster to react to in the simulation. See `Operation Specification` help for more information.
  • -F, --op-fail=OPSPEC โ€” if the specified task occurs during the simulation, have it fail with return code ${rc}. The transition will normally stop at the failed action. Save the result with --save-output and re-run with --xml-file. See `Operation Specification` help for more information.
  • -t, --set-datetime=DATETIME โ€” set date/time (ISO 8601 format, see https://en.wikipedia.org/wiki/ISO_8601)
  • -q, --quorum=QUORUM โ€” set to '1' (or 'true') to indicate cluster has quorum. Yes literally the string, don't come at me ๐Ÿซถ
  • -w, --watchdog=DEVICE โ€” set to '1' (or 'true') to indicate cluster has an active watchdog device
  • -g, --ticket-grant=TICKET โ€” simulate granting a ticket. Slay, ticket granted ๐ŸŽŸ๏ธ
  • -r, --ticket-revoke=TICKET โ€” simulate revoking a ticket
  • -b, --ticket-standby=TICKET โ€” simulate making a ticket standby
  • -e, --ticket-activate=TICKET โ€” simulate activating a ticket

๐Ÿ“ Artifact Options:

  • -I, --save-input=FILE โ€” save the input configuration to the named file
  • -O, --save-output=FILE โ€” save the output configuration to the named file
  • -G, --save-graph=FILE โ€” save the transition graph (XML format) to the named file
  • -D, --save-dotfile=FILE โ€” save the transition graph (DOT format) to the named file
  • -a, --all-actions โ€” display all possible actions in DOT graph (even if not part of transition). Show everything, main character energy ๐Ÿ‘‘

๐Ÿ” Data Source:

  • -L, --live-check โ€” connect to CIB manager and use the current CIB contents as input. Live, not memorex ๐Ÿ’…
  • -x, --xml-file=FILE โ€” retrieve XML from the named file
  • -p, --xml-pipe โ€” retrieve XML from stdin

๐Ÿงš Application Options:

  • -$, --version โ€” display software version and exit. Yes the option is literally a dollar sign, iykyk ๐Ÿ’ธ
  • -V, --verbose โ€” increase debug output (may be specified multiple times). Stack her, she loves it โœจ
  • -Q, --quiet โ€” display only essential output. Minimalist queen ๐ŸŒฟ

๐ŸŒˆ OPERATION SPECIFICATION ๐ŸŒˆ

ok so the OPSPEC in any command line option is of the form:

${resource}_${task}_${interval_in_ms}@${node}=${rc}

like, for example: memcached_monitor_20000@bart.example.com=7 ๐Ÿ“

${rc} is an OCF return code. For more information on these return codes, refer to https://clusterlabs.org/pacemaker/doc/2.1/Pacemaker_Administration/html/agents.html#ocf-return-codes


๐Ÿ’ซ EXAMPLES ๐Ÿ’ซ

Pretend a recurring monitor action found memcached stopped on node fred.example.com and, during recovery, that the memcached stop action failed:

crm_simulate -LS --op-inject
memcached:0_monitor_20000@bart.example.com=7 --op-fail
memcached:0_stop_0@fred.example.com=1 --save-output
/tmp/memcached-test.xml

Now see what the reaction to the stop failed would be:

crm_simulate -S --xml-file /tmp/memcached-test.xml

Literal chef's kiss scenario construction ๐ŸคŒ


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Written by Andrew Beekhof and the Pacemaker project contributors ๐Ÿซถ


ngl bestie, if you're messing with -X/--in-place, remember she stores the results back to the input file โ€” back that thing up first, fr fr ๐Ÿ˜ญ

okay that's the whole page!! this one's from Pacemaker version 3.0.3+20260728.7052..., dated September 2026, and it lives as the PACEMAKER(8) page under System Administration Utilities โ€” mwah, go simulate something gorgeous ๐Ÿ’–โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from