229
Chapter 15: Advanced Configuration
15.9 Power Strip Control
TheConsoleServersupportsagrowinglistofremotepower-controldevices(RPCs)whichcanbeconguredusingthe
ManagementConsoleasdescribedinChapter8.TheseRPCsarecontrolledusingtheopensourceNUT and PowerMan tools
and the pmpower utility.
15.9.1 PowerMan
PowerMan provides power management in a data center or compute cluster environment. It performs operations such as
poweron,poweroff,andpowercycleviaremotepowercontroller(RPC)devices.Targethostnamesaremappedtoplugson
RPC devices in powerman.conf
powerman-poweron/offnodes
Synopsis
powerman[-option][targets]
pm[-option][targets]
Options
-1, --on PowerONtargets.
-0, --off PowerOFFtargets.
-c, --cycle Power cycle targets.
-r, --reset Asserthardwareresetfortargets(ifimplementedbyRPC).
-f, --flash TurnbeaconONfortargets(ifimplementedbyRPC).
-u, --unflash TurnbeaconOFFfortargets(ifimplementedbyRPC).
-l, --list Listavailabletargets.Ifpossible,outputwillbecompressedintoahostrange(seeTARGET
SPECIFICATIONbelow).
-q, --query Queryplugstatusoftargets.Ifnonespecied,queryalltargets.Statusisnotcached;each
timethisoptionisused,powermandqueriestheappropriateRPC's.TargetsconnectedtoRPC's
thatcouldnotbecontacted(e.g.duetonetworkfailure)arereportedasstatus"unknown".If
possible,outputwillbecompressedintohostranges.
-n, --node Querynodepowerstatusoftargets(ifimplementedbyRPC).Ifnotargetsarespecied,queryall
targets.Inthiscontext,anodeintheOFFstatecouldbeONattheplugbutoperatinginstandby
power mode.
-b, --beacon Querybeaconstatus(ifimplementedbyRPC).Ifnotargetsarespecied,queryalltargets.
-t, --temp Querynodetemperature(ifimplementedbyRPC).Ifnotargetsarespecied,queryalltargets.
Temperature information is not interpreted by powerman and is reported as received from the
RPCononelinepertarget,prexedbytargetname.
-h, --help Displayoptionsummary.
-L, --license Show powerman license information.
-d, --destination host[:port] Connecttoapowermandaemononnon-defaulthostandoptionallyport.
-V, --version Displaythepowermanversionnumberandexit.
-D, --device DisplaysRPCstatusinformation.Iftargetsarespecied,onlyRPC'smatchingthetargetlistare
displayed.
-T, --telemetry CausesRPCtelemetryinformationtobedisplayedascommandsareprocessed.Usefulfor
debugging device scripts.
-x, --exprange Expand host ranges in query responses.
For more details refer http://linux.die.net/man/1/powerman.Alsoreferpowermand(http://linux.die.net/man/1/powermand)
documentationandpowerman.conf(http://linux.die.net/man/5/powerman.conf)
Target Specification
powermantargethostnamesmaybespeciedascomma-separatedorspace-separatedhostnamesorhostranges.Host
rangesareofthegeneralform:prex[n-m,l-k,...],wheren<mandl<k,etc.,Thisformshouldnotbeconfusedwith
regularexpressioncharacterclasses(alsodenotedby''[]'').Forexample,foo[19]doesnotrepresentfoo1orfoo9,butrather
represents a degenerate range: foo19.
ThisrangesyntaxismeantonlyasaconvenienceonclusterswithaprexNNnamingconventionandspecicationofranges
shouldnotbeconsiderednecessary--thelistfoo1,foo9couldbespeciedassuch,orbytherangefoo[1,9].