powerman(1)

πŸ“¦
version 2.4.4 Β· 3 versions
, in debian trixie, epel 10, epel 9, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– powerman β€” power on/off nodes πŸ’–

okay bestie, gather round, because we're talking about powerman(1), aka pm, and honestly? it's giving infrastructure queen πŸ‘‘


✨ SYNOPSIS ✨

pm [OPTIONS] [ACTION [TARGETS ...]]

like. that's it. that's the whole vibe. options, then an action, then who you're doing it to. slay πŸ’…


🌸 DESCRIPTION 🌸

so powerman does power management in a data center or compute cluster environment. think: turning stuff on, turning stuff off, power cycling β€” all of it done remotely through power controller devices, because nobody is walking to a rack in 2026, no cap. 🫢

here's the cute part: target hostnames get mapped to plugs on devices in powerman.conf(5). so you say "foo01" and powerman is like "say less, that's plug 3 on rack 12." iconic behavior fr fr.


πŸ‘‘ ACTIONS πŸ‘‘

these are the things you can do. pick one, bestie, and go off.

  • -1, --on β€” Power ON targets. wake up babes, we're computing ⚑
  • -0, --off β€” Power OFF targets. night night 😴
  • -c, --cycle β€” Power cycle targets. the classic "have you tried turning it off and on again" but automated πŸ’«
  • -q, --query β€” Query plug status of targets, if specified, or all targets if not. and listen: status is not cached. every single time you use this option, powermand goes and queries the appropriate devices. fresh info only, we don't do leftovers πŸ™…β€β™€οΈ Targets connected to devices that could not be contacted (e.g. due to network failure) or had some other type of error or are reported as status "unknown". If possible, output will be compressed into host ranges. cute AND efficient.
  • -l, --list β€” List available targets. If possible, output will be compressed into a host range (peep TARGET SPECIFICATION below πŸ‘‡).
  • -r, --reset β€” Assert hardware reset for targets. hard reset energy, no soft launch πŸ₯Š
  • -f, --flash β€” Turn beacon ON for targets. the light goes on so you can physically find the thing. main character spotlight behavior πŸ”¦
  • -u, --unflash β€” Turn beacon OFF for targets. spotlight off, we're done here ✨
  • -B, --beacon β€” Query beacon status of targets, if specified, or all targets if not. "is the little light on or not" β€” the question πŸ’‘
  • -t, --temp β€” Query node temperature of targets, if specified, or all targets if not. Temperature information is not interpreted by powerman and is reported as received from the device, on one line per target, prefixed by target name. we're just the messenger, we do not read the tea leaves 🍡

πŸŽ€ OPTIONS πŸŽ€

the little modifiers that make everything hit different.

  • -h, --server-host host[:port] β€” Connect to a powerman daemon on non-default host and optionally port. basically "bestie, they're over there" πŸ“
  • -x, --exprange β€” Expand host ranges in query responses. no compression, give me every single name, i want the full list πŸ’…
  • -V, --version β€” Display the powerman version number and exit. quick lil flex πŸ†
  • -L, --license β€” Show powerman license information. the legal paperwork moment πŸ“œ
  • -H, --help β€” Show command usage. when you forgot how anything works (real) 😭
  • -g, --genders β€” Interpret targets as genders attributes rather than node names. Each attribute is expanded to the list of nodes that have that attribute, then those lists are combined to make a list of target node names. group-chat logic: "everyone in this category, you're up" 🌈

πŸ”₯ TEST/DEBUG OPTIONS πŸ”₯

these ones are for the test environment or when you're debugging device scripts. nerd mode: activated πŸ§ͺ

  • -T, --telemetry β€” Causes device telemetry information to be displayed as commands are processed. Useful for debugging device scripts. it's like subtitles for what powerman is doing πŸ‘€
  • -R, --retry-connect N β€” Retry connect to server up to N times with a 100ms delay after each failure. persistent queen behavior, we try again πŸ”
  • -d, --device β€” Displays device status information for the device(s) that control the targets, if specified, or all devices if not. peek behind the curtain 🫣

πŸ¦‹ TARGET SPECIFICATION πŸ¦‹

okay this is the part where people get confused, so let's lock in πŸ”’

powerman target hostnames may be specified as comma separated or space separated hostnames or host ranges. Host ranges are of the general form: prefix[n-m,l-k,...], where n < m and l < k, etc.

⚠️ do NOT confuse this with regular expression character classes (also denoted by []). For example, foo[19] does not represent foo1 or foo9 β€” it represents a degenerate range: foo19. read that twice bestie, it's a trap πŸ’€

This range syntax is meant only as a convenience on clusters with a prefixNN naming convention, and specification of ranges should not be considered necessary β€” the list foo1,foo9 could be specified as such, or by the range foo[1,9]. both are valid, we don't gatekeep 🫢

Some examples of powerman targets follows:

Power on hosts bar,baz,foo01,foo02,...,foo05

powerman --on bar baz foo[01-05]

Power on hosts bar,foo7,foo9,foo10

powerman --on bar,foo[7,9-10]

Power on foo0,foo4,foo5

powerman --on foo[0,4-5]

As a reminder to the reader, some shells will interpret brackets ([ and ]) for pattern matching. Depending on your shell, it may be necessary to enclose ranged lists within quotes. For example, in tcsh, the last example above should be executed as:

powerman --on "foo[0,4-5]"
🚨 quote your brackets or your shell will eat them, and then powerman will be confused, and then you will be confused. protect your ranges πŸ’–

πŸ“ FILES πŸ“

  • /usr/bin/powerman
  • /usr/bin/pm

🌟 ORIGIN 🌟

PowerMan was originally developed by Andrew Uselton on LLNL's Linux clusters. This software is open source and distributed under the terms of the GNU GPL. shoutout to the originator, absolute legend πŸ‘‘


🌈 SEE ALSO 🌈

http://github.com/chaos/powerman


and that's the whole page, bestie πŸŽ€ this was powerman-2.4.4, dated 1 December 2008 β€” old but still absolutely eating, no crumbs left. go power cycle something responsibly, ily πŸ’œβœ¨