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.
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.
Function | What it does | Command | Target (see paths in Command targets) |
---|---|---|---|
Set Lenovo Flex System chassis as command target | Sets 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 target | Sets 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
where x is the CMM bay number. |
Set primary CMM as command target | Sets 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
|
Set standby CMM as command target | Sets 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
|
Set compute node as command target | Sets 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
where x is the node bay that identifies the compute node. |
Set logical node grouping as command target | Sets 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 target | Sets 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: |
where:
| The env command can be directed to any installed device, in this case
where:
|
Set compute node sub-component as command target | Sets the specified sub-component on the specified compute node as the persistent target for commands during the current session. Valid sub-components are:
| 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:
(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:
(continued on next page) |
Set compute node sub-component as command target (continued) |
|
| |
Set I/O module as command target | Sets 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
where x is the I/O bay where the I/O module is installed. |
Set power supply as command target | Sets 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
where x is the power supply bay where the power supply is installed. |
Set fan logic module as command target | Sets 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
where x is the bay where the fan logic module is installed. |
Set fan module as command target | Sets 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
where x is the fan module bay where the fan module is installed. |
Set rear LED card as command target | Sets 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 target | Sets 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]