Skip to main content

env command

This command sets the persistent environment for commands that are entered during the remainder of the current session.

The persistent command environment is indicated by the command prompt. When you start the command-line interface, the persistent command environment is the Lenovo Flex System chassis, denoted as system by the command prompt. You can target a single command to an environment other than the one that is set as the default by adding a -T option to the command that includes a valid target destination (see Command targets for information). Target environments can be specified using the full path name, or using a partial path name based on the persistent command environment. Full path names always begin with system. The levels in a path name are divided by using a colon ( : ).

See Command targets for a list of Lenovo Flex System components, command targets, command target paths, and the command targeting hierarchy that is supported by the env command. Target names have been selected to maintain scripting compatibility with other Lenovo systems.

Note
To see installed targets for your Lenovo Flex System chassis, use the list command.

If command syntax is not correctly entered, or if a command fails to run, an error message is returned. See Common errors for a list of error messages that apply to all commands or env command errors for a list of error messages that are specific to the env command.

Table 1. env command.

The command table is a multi-row, four-column table where each row describes a CMM CLI command option: column one lists command function, column two provides a detailed command description, column three shows command-option syntax, and column four lists valid command targets.

FunctionWhat it doesCommandTarget (see paths in Command targets)
Set Lenovo Flex System chassis as command targetSets the Lenovo Flex System chassis as the persistent target for commands during the current session. This is the persistent command environment you are in at the beginning of each command-line interface session, indicated by the system> prompt.env

env -T system

The env command can be directed to any installed device.
Set CMM as command targetSets the CMM as the persistent target for commands during the current session.env -T system:mm [x]

where x is the bay (1 or 2) that identifies the CMM.

The env command can be directed to any installed device, in this case
mm[<em className="ph i">x</em>]

where x is the CMM bay number.

Set primary CMM as command targetSets the primary CMM as the persistent target for commands during the current session.env -T system:mm[p]

env -T system:mm[P]

The env command can be directed to any installed device, in this case
  • mm[p]
  • mm[P]
Set standby CMM as command targetSets the standby CMM as the persistent target for commands during the current session.env -T system:mm[s]

env -T system:mm[S]

The env command can be directed to any installed device, in this case
  • mm[s]
  • mm[S]
Set compute node as command targetSets the specified compute node as the persistent target for commands during the current session.env -T system:blade [x]

where x is the node bay that identifies the compute node. A compute node that occupies more than one node bay is identified by the lowest bay number that it occupies.

The env command can be directed to any installed device, in this case
blade[<em className="ph i">x</em>]

where x is the node bay that identifies the compute node.

Set logical node grouping as command targetSets the logical node grouping as the persistent target for commands during the current session.env -T system:bladegroup [x]

where x is the node bay that identifies the logical node grouping. A logical node grouping that occupies more than one node bay is identified by the lowest bay number that it occupies.

The env command can be directed to any installed device, in this case

bladegroup[x]

where x is the node bay that identifies the logical node grouping.

Set compute node in logical node grouping as command targetSets the specified compute node in a logical node grouping as the persistent target for commands during the current session.
Note
When a compute node is part of a logical node grouping, syntax for compute node sub-components is of the form: env -T system: bladegroup[x]: blade[y]:comp, as discussed in Set compute node sub-component as command target
env -T system:
bladegroup[<em className="ph i">x</em>]:
blade[<em className="ph i">y</em>]
where:
  • x is the node bay that identifies the logical node grouping. A logical node grouping that occupies more than one node bay is identified by the lowest bay number that it occupies.
  • y is the identifier for the compute node in the logical node grouping.
The env command can be directed to any installed device, in this case
bladegroup[<em className="ph i">x</em>]:
blade[<em className="ph i">y</em>]
where:
  • x is the node bay that identifies the logical node grouping. A logical node grouping that occupies more than one node bay is identified by the lowest bay number that it occupies.
  • y is the identifier for the compute node in the logical node grouping.
Set compute node sub-component as command targetSets the specified sub-component on the specified compute node as the persistent target for commands during the current session. Valid sub-components are:
  • Node system-management processor
  • Expansion adapter
  • Add-in card
  • Add-in card PCI-Express module
  • Microprocessor
  • Expansion node
  • High-speed expansion card
  • Memory
  • Flash DIMM storage (Lenovo eXFlash Storage DIMM)
  • Storage backplane
  • Alarm panel
env -T system:blade [x]:comp

where x is the node bay that identifies the compute node on which the sub-component is installed. A compute node that occupies more than one node bay is identified by the lowest bay number that it occupies.

where comp is the sub-component:

  • sp for node system-management processor
  • exp [x] for expansion adapter (where x identifies the expansion adapter)
  • cpu [x] for microprocessor (where x identifies the microprocessor)
  • addin [x] for add-in card (where x identifies the add-in card)
  • pciexpress [x] for add-in card PCI-Express module (where x identifies the PCI-Express module)
  • stgbkplane [x] for storage backplane card (where x identifies the storage backplane)
  • be [x] for expansion node (where x identifies the expansion node)
  • hsec [x] for high-speed expansion card (where x identifies the high-speed expansion card)
  • memory [x] for memory (where x identifies the memory module)
  • flashdimm [x] for flash DIMM (where x identifies the flash DIMM storage module)

(continued on next page)

The env command can be directed to any installed device, in this case

blade[x]:comp

where x is the node bay that identifies the compute node on which the sub-component is installed.

where comp is the sub-component:

  • sp for node system-management processor
  • exp [x] for expansion adapter (where x identifies the expansion adapter)
  • cpu [x] for microprocessor (where x identifies the microprocessor)
  • addin [x] for add-in card (where x identifies the add-in card)
  • pciexpress [x] for add-in card PCI-Express module (where x identifies the PCI-Express module)
  • be [x] for expansion node (where x identifies the expansion node)
  • stgbkplane [x] for add-in card (where x identifies the storage backplane)
  • hsec [x] for high-speed expansion card (where x identifies the high-speed expansion card)
  • memory [x] for memory (where x identifies the memory module)

(continued on next page)

Set compute node sub-component as command target

(continued)

 
  • mgmtcrd [x] for management card (where x identifies the management card)
  • tap [x] for alarm panel (where x identifies the alarm panel)
  • flashdimm [x] for flash DIMM (where x identifies the flash DIMM storage module)
  • mgmtcrd [x] for management card (where x identifies the management card)
  • tap [x] for alarm panel (where x identifies the alarm panel)
Set I/O module as command targetSets the specified I/O module as the persistent target for commands during the current session.env -T system:switch [x]

where x is the I/O bay where the I/O module is installed.

The env command can be directed to any installed device, in this case
switch[<em className="ph i">x</em>]

where x is the I/O bay where the I/O module is installed.

Set power supply as command targetSets the specified power supply as the persistent target for commands during the current session.env -T system:power [x]

where x is the power supply bay where the power supply is installed.

The env command can be directed to any installed device, in this case
power[<em className="ph i">x</em>]

where x is the power supply bay where the power supply is installed.

Set fan logic module as command targetSets the specified fan logic module as the persistent target for commands during the current session.env -T system:fanmux [x]

where x is the bay where the fan logic module is installed.

The env command can be directed to any installed device, in this case
fanmux[<em className="ph i">x</em>]

where x is the bay where the fan logic module is installed.

Set fan module as command targetSets the specified fan module module as the persistent target for commands during the current session.env -T system:blower [x]

where x is the fan module bay where the fan module is installed.

The env command can be directed to any installed device, in this case
blower[<em className="ph i">x</em>]

where x is the fan module bay where the fan module is installed.

Set rear LED card as command targetSets the rear LED card as the persistent target for commands during the current session. env -T system:mt [x]

where x is the rear LED card.

The env command can be directed to any installed device, in this case

mt[x]

where x is the rear LED card.

Set storage expansion enclosure as command targetSets the storage expansion enclosure as the persistent target for commands during the current session.env -T system:bladeenclosure [x]

where x is the storage-expansion-enclosure bay that identifies the storage expansion enclosure. A storage expansion enclosure that occupies more than one node bay is identified by the lowest bay number that it occupies.

The env command can be directed to any installed device, in this case

bladeenclosure[x]

where x is the node bay that identifies the storage expansion enclosure.

Example: To set the persistent target of commands to the system-management processor on the compute node in node bay 5, while the Lenovo Flex System chassis is set as the default command target, at the system> prompt, type

env -T system:blade[5]:sp

The following example shows the information that is returned:

system> env -T system:blade[5]:sp
OK
system:blade[5]:sp>

To set the persistent target of commands to the system-management processor on the compute node in node bay 5, while the Lenovo Flex System chassis is set as the default command target, at the system> prompt, you can also type

env -T blade[5]:sp

The following example shows the information that is returned:

system> env -T blade[5]:sp
OK
system:blade[5]:sp>

To issue the reset command on the compute node in node bay 5, while the CMM is set as the default command target, at the system:mm[x]> prompt, type

reset -T system:blade[5]