0% found this document useful (0 votes)
59 views40 pages

Linux Tsmcli User Guide 201803

Uploaded by

asma merz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views40 pages

Linux Tsmcli User Guide 201803

Uploaded by

asma merz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Lenovo ThinkServer System

Manager Command Line Interface


User Guide

TSMCLI
Lenovo ThinkServer System Manager Command Line Interface User Guide

First Edition (January 2018)


© Copyright Lenovo 2014-2018.

LIMITED AND RESTRICTED RIGHTS NOTICE: If data or software is delivered pursuant a General
Services Administration "GSA" contract, use, reproduction, or disclosure is subject to restrictions set
forth in Contract No. GS-35F-05925.

© Copyright Lenovo 2014-2018 2


Lenovo ThinkServer System Manager Command Line Interface User Guide

Table of Contents

Table of Contents
..............................................................................................................................................................................................
3
..............................................................................................................................................................................................
1. Introduction 4
..............................................................................................................................................................................................
2. System Requirements 5
..............................................................................................................................................................................................
3. Install Procedure 6
..............................................................................................................................................................................................
4. Uninstall Procedure 6
..............................................................................................................................................................................................
5. Usage 7
..............................................................................................................................................................................................
6. Commands Reference 8
..............................................................................................................................................................................................
create-credential 8
..............................................................................................................................................................................................
create-user 9
..............................................................................................................................................................................................
delete-user 11
..............................................................................................................................................................................................
get-auditlog 12
..............................................................................................................................................................................................
get-commands 13
..............................................................................................................................................................................................
get-crashscreen 14
..............................................................................................................................................................................................
get-frus 15
..............................................................................................................................................................................................
get-fwversions 16
..............................................................................................................................................................................................
get-help 17
..............................................................................................................................................................................................
get-nicsettings 18
..............................................................................................................................................................................................
get-powerconsumption 19
..............................................................................................................................................................................................
get-psuredundancysettings 20
..............................................................................................................................................................................................
get-remotemediasettings 21
..............................................................................................................................................................................................
get-sel 22
..............................................................................................................................................................................................
get-sensors 23
..............................................................................................................................................................................................
get-systeminfo 24
..............................................................................................................................................................................................
get-users 25
..............................................................................................................................................................................................
reset-config 26
..............................................................................................................................................................................................
set-nicsettings 27
..............................................................................................................................................................................................
set-psuredundancysettings 29
..............................................................................................................................................................................................
set-remotemediasettings 30
..............................................................................................................................................................................................
set-user 32
..............................................................................................................................................................................................
start-remotemediaimage 34
..............................................................................................................................................................................................
stop-remotemediaimage 35
..............................................................................................................................................................................................
7. Commands permissions 36
..............................................................................................................................................................................................
8. Exceptions and Errors 37
..............................................................................................................................................................................................
9. Tips 38
..............................................................................................................................................................................................
9.1. Unsupported special characters on the TSM and TSMCLI 38

© Copyright Lenovo 2014-2018 3


Lenovo ThinkServer System Manager Command Line Interface User Guide

1. Introduction

This guide will provide instruction about how to use the features available in the Lenovo
ThinkServer System Manager Command Line Interface (TSMCLI).

The Lenovo ThinkServer System Manager (TSM) is a Baseboard Management Controller (BMC). A
BMC is an embedded hardware component present in servers to monitor and control their status.

The TSMCLI is a shell module that provides a set of tools for monitoring and controlling the TSM of
your ThinkServer. With the help of TSMCLI administrators can manage users, network settings,
platform event filters and other TSM functionalities of one or more ThinkServer units in a scriptable
way. It also provides some tools for managing ThinkServer operations like power control and remote
media images.

The next sections will present all commands and options available in the TSMCLI.

© Copyright Lenovo 2014-2018 4


Lenovo ThinkServer System Manager Command Line Interface User Guide

2. System Requirements

In order to execute the TSMCLI your system must meet the following requirements:

• Lenovo ThinkServer RD350, RD450, RD550, RD650 or TD350;


• Linux Redhat 6.8 and later version, Redhat 7 or SUSE 12, 64-bit operating system;

© Copyright Lenovo 2014-2018 5


Lenovo ThinkServer System Manager Command Line Interface User Guide

3. Install Procedure

In order to install the TSMCLI follow the instructions below:

1. Download the latest TSMCLI installer.


• To download TSMCLI, go to http://support.lenovo.com/en_US/downloads/
default.page and follow the instructions on the Web page.

2. Extract tarball release.


# tar -zxvf <TSMCLI_RELEASE_TARBALL>

3. Add TSMCLI path to PATH.


# cd <TSMCLI_LOCATION/bin>
# export PATH=$PATH:$(dirname 'pwd')
# ./tsmcli

4. Uninstall Procedure

In order to uninstall the TSMCLI, make sure you have Root Privileges and follow the instructions
below:

1. Close all running instances of the TSMCLI.


2. Then execute the follow command: rm -rf <TSMCLI_LOCATION>

© Copyright Lenovo 2014-2018 6


Lenovo ThinkServer System Manager Command Line Interface User Guide

5. Usage

The basic TSMCLI command line syntax is the following:

tsmcli --CommandName <COMMAND_NAME> [COMMAND_PARAMETERS] [--CommandArgs


"<COMMAND_ARGUMENTS>"]

Where:

• <COMMAND_NAME> is the TSMCLI command which will be executed. Examples: "get-


commands", "get-users", and "create-credential".
For the complete list of commands available check the Chapter 6, TSMCLI Commands
Reference on this document.

• [COMMAND_PARAMETERS] is one of the following parameters:

--ComputerName
Specifies the Lenovo ThinkServer System Manager IP address or network name.
--Port
Specifies the Lenovo ThinkServer System Manager port number. This value is optional
and if not specified will be set to "80" (or "443" if -UseSSL is specified).
--Authentication
Specifies the authentication type to be used upon the connection to a Lenovo
ThinkServer System Manager. This value is optional and will be set to "basic" if not
specified.
--Credential
Specifies a file or structure containing credentials. It should be created using the
"create-credential" command.
--UseSSL
Specifies that the Secure Sockets Layer (SSL) protocol should be used to establish a
connection to the specified TSM. By default, SSL is not used.
--SkipSSLCertificateCheck
Specifies that when connecting using SSL, there will be no verification if the TSM
certificate is valid. Use this option only when the remote TSM is trusted by other
means, for example, if the TSM is part of a network that is physically secure and
isolated.
--LogLevel
Specifies the maximum message level that should be logged. The supported values are:
0 - none (no log); 1 - fatal; 2 - critical; 3 - error; 4 - warning; 5 - notice; 6 -
information; and 7 - debug. If not specified the default level is 6 - information.

Note:

From version 4.10, TSM only permits SSL connection, so UseSSL parameter must be specified
when connecting TSM of 4.10 or later.

© Copyright Lenovo 2014-2018 7


Lenovo ThinkServer System Manager Command Line Interface User Guide

• [<COMMAND_ARGUMENTS>] specifies the arguments specific to each TSMCLI command. For


more information check the Chapter 6, TSMCLI Commands Reference on this document.

Based on given command, text output of TSMCLI could be various. Examples for each TSMCLI
command can be found on Chapter 6, TSMCLI Commands Reference. Moreover, exclamation mark
(!) is a special character for Linux shell, if you plan to use this character in argument value, please
use single quote (‘) to quote the arguments instead of double quote (“). For more details, please
refer to online help ‘QUOTING’ section from Linux shell.

© Copyright Lenovo 2014-2018 8


Lenovo ThinkServer System Manager Command Line Interface User Guide

6. Commands Reference

create-credential

Creates a structure containing user credentials.

SYNTAX
tsmcli --CommandName create-credential [--LogLevel <0|1|2|3|4|5|6|7>] --
CommandArgs
"password=<password>;saveToFile=<cred.xml>;username=<username>"

DESCRIPTION

The create-credential command stores user credentials in a structure that can be passed to
subsequent TSMCLI calls.

PARAMETERS

For a list of parameters applicable to all TSMCLI commands see Chapter 5, TSMCLI Usage.

COMMAND ARGUMENTS

password
Specifies the password. In the absence of this argument, an error message is shown.

saveToFile
Specifies the name of the file where to save the structure containing the username and
password.

username
Specifies the username. In the absence of this argument, an error message is shown.

EXAMPLES
tsmcli --CommandName create-credential --CommandArgs
"password=mypassword;saveToFile=file.xml;username=username1"

© Copyright Lenovo 2014-2018 9


Lenovo ThinkServer System Manager Command Line Interface User Guide

create-user

Creates a new user account on a specific TSM.

SYNTAX
tsmcli --CommandName create-user --ComputerName <computer_name> --
Credential <credential> [--Authentication <basic>] [--LogLevel <0|1|2|3|4|
5|6|7>] [--Port <port>] [--SkipSSLCertificateCheck ] [--UseSSL ] --
CommandArgs "password=<password>;role=<admin|user|
operator>;username=<username>;[authenticationProtocol=<sha|md5>;]
[email=<email>;][kvm=<0|1>;][privacyProtocol=<des|aes>;][snmp=<0|1>;]
[snmpAccess=<read-only|read-write>;][virtualMedia=<0|1>]"

DESCRIPTION

The create-user command creates a new user account on a specific Lenovo ThinkServer System
Manager.

PARAMETERS

For a list of parameters applicable to all TSMCLI commands see Chapter 5, TSMCLI Usage.

COMMAND ARGUMENTS

password
Specifies the password. It shall have a maximum of 20 characters and only printable ASCII
characters and spaces are accepted. In addition, if SNMP is enabled, the password shall have
at least 8 characters.

role
Specifies the user role. Possible values are: "admin" for Administrator, "user" for User or
"operator" for Operator.

username
Specifies the user name. It shall have a maximum of 16 characters, must start with an
alphabetical character and is case sensitive. The following special characters are allowed:
'-'(hyphen), '_'(underscore) and '@'(at sign).

authenticationProtocol
Specifies the authentication protocol for SNMP settings (required if enabling SNMP). Possible
values are: "sha" or "md5".

email
Specifies the user email (optional). The email length is limited to 63 characters and can be
defined as empty string (""). In addition, the e-mail shall be in the format
<username>@<domain>. Examples: "[email protected]" and
"[email protected]".

© Copyright Lenovo 2014-2018 10


Lenovo ThinkServer System Manager Command Line Interface User Guide

kvm
Specifies the KVM privilege (optional). Enabled by default for "admin" and "operator" roles

privacyProtocol
Specifies the encryption algorithm to use for SNMP settings (required if enabling SNMP).
Possible values are: "des" or "aes".

snmp
Specifies the SNMP enabled state (optional).

snmpAccess
Specifies the SNMP access level (required if enabling SNMP). Possible values are: "read-only"
or "read-write".

virtualMedia
Specifies the Virtual Media privilege (optional). Enabled by default for "admin" and "operator"
roles.

EXAMPLES
tsmcli --CommandName create-user --ComputerName my_computer.com --
Credential mycredential.xml --CommandArgs
"password=pass1;role=user;username=user1"

© Copyright Lenovo 2014-2018 11


Lenovo ThinkServer System Manager Command Line Interface User Guide

delete-user

Deletes an user account from a specific TSM.

SYNTAX
tsmcli --CommandName delete-user --ComputerName <computer_name> --
Credential <credential> [--Authentication <basic>] [--LogLevel <0|1|2|3|4|
5|6|7>] [--Port <port>] [--SkipSSLCertificateCheck ] [--UseSSL ] --
CommandArgs "userId=<user_id>"

DESCRIPTION

The delete-user command deletes an user account from a specific Lenovo ThinkServer System
Manager.

PARAMETERS

For a list of parameters applicable to all TSMCLI commands see Chapter 5, TSMCLI Usage.

COMMAND ARGUMENTS

userId
Specifies the user identifier. To get the list of valid user identifiers on the TSM, use the
command "get-users".

EXAMPLES
tsmcli --CommandName delete-user --ComputerName my_computer.com --
Credential mycredential.xml --CommandArgs "userId=10"

© Copyright Lenovo 2014-2018 12


Lenovo ThinkServer System Manager Command Line Interface User Guide

get-auditlog

Gets the Audit Log from a specific TSM.

SYNTAX
tsmcli --CommandName get-auditlog --ComputerName <computer_name> --
Credential <credential> [--Authentication <basic>] [--LogLevel <0|1|2|3|4|
5|6|7>] [--Port <port>] [--SkipSSLCertificateCheck ] [--UseSSL ] --
CommandArgs "destinationPath=<destinationPath>"

DESCRIPTION

The get-auditlog command gets the audit log from a specific Lenovo ThinkServer System Manager.
The logs are saved on the specified path in a text file named using the prefix "AuditLog", the host
name and a time stamp.

PARAMETERS

For a list of parameters applicable to all TSMCLI commands see Chapter 5, TSMCLI Usage.

COMMAND ARGUMENTS

destinationPath
Path to the folder where the log file will be saved.

EXAMPLES
tsmcli --CommandName get-auditlog --ComputerName my_computer.com --
Credential mycredential.xml --CommandArgs "destinationPath=path"

© Copyright Lenovo 2014-2018 13


Lenovo ThinkServer System Manager Command Line Interface User Guide

get-commands

Lists all supported commands.

SYNTAX
tsmcli --CommandName get-commands [--LogLevel <0|1|2|3|4|5|6|7>]

DESCRIPTION

The get-commands provides a list of all supported commands with a brief description.

PARAMETERS

For a list of parameters applicable to all TSMCLI commands see Chapter 5, TSMCLI Usage.

EXAMPLES
tsmcli --CommandName get-commands

© Copyright Lenovo 2014-2018 14


Lenovo ThinkServer System Manager Command Line Interface User Guide

get-crashscreen

Gets crash screen image to a local file.

SYNTAX
tsmcli --CommandName get-crashscreen --ComputerName <computer_name> --
Credential <credential> [--Authentication <basic>] [--LogLevel <0|1|2|3|4|
5|6|7>] [--Port <port>] [--SkipSSLCertificateCheck ] [--UseSSL ] --
CommandArgs "destinationPath=<destinationPath>"

DESCRIPTION

The get-crashscreen command gets blue screen of death (BSOD) of host operating system from a
specific Lenovo ThinkServer System Manager and save to a local file.

PARAMETERS

For a list of parameters applicable to all TSMCLI commands see Chapter 5, TSMCLI Usage.

COMMAND ARGUMENTS

destinationPath
Specifies the filename and path where the crash screen image will be saved (required).

EXAMPLES
tsmcli --CommandName get-crashscreen --ComputerName my_computer.com --
Credential mycredential.xml --CommandArgs "destinationPath=path"

© Copyright Lenovo 2014-2018 15


Lenovo ThinkServer System Manager Command Line Interface User Guide

get-frus

Gets the list of available Field Replaceable Units (FRUs) on a specific TSM.

SYNTAX
tsmcli --CommandName get-frus --ComputerName <computer_name> --Credential
<credential> [--Authentication <basic>] [--LogLevel <0|1|2|3|4|5|6|7>] [--
Port <port>] [--SkipSSLCertificateCheck ] [--UseSSL ]

DESCRIPTION

The get-frus command gets the list of available Field Replaceable Units (FRUs) on a specific Lenovo
ThinkServer System Manager.

PARAMETERS

For a list of parameters applicable to all TSMCLI commands see Chapter 5, TSMCLI Usage.

EXAMPLES
tsmcli --CommandName get-frus --ComputerName my_computer.com --Credential
mycredential.xml

© Copyright Lenovo 2014-2018 16


Lenovo ThinkServer System Manager Command Line Interface User Guide

get-fwversions

Gets the current and the new (if available) firmware versions for components of a specific TSM.

SYNTAX
tsmcli --CommandName get-fwversions --ComputerName <computer_name> --
Credential <credential> [--Authentication <basic>] [--LogLevel <0|1|2|3|4|
5|6|7>] [--Port <port>] [--SkipSSLCertificateCheck ] [--UseSSL ]

DESCRIPTION

The get-fwversions command gets the current and the new (if available) firmware versions of a
specific Lenovo ThinkServer System Manager.

PARAMETERS

For a list of parameters applicable to all TSMCLI commands see Chapter 5, TSMCLI Usage.

EXAMPLES
tsmcli --CommandName get-fwversions --ComputerName my_computer.com --
Credential mycredential.xml

© Copyright Lenovo 2014-2018 17


Lenovo ThinkServer System Manager Command Line Interface User Guide

get-help

Provides detailed help information for a command.

SYNTAX
tsmcli --CommandName get-help [--LogLevel <0|1|2|3|4|5|6|7>] --CommandArgs
"commandName=<command>"

DESCRIPTION

The get-help command provides a help guide for supported commands. It describes the command
functionality and its syntax.

PARAMETERS
For a list of parameters applicable to all TSMCLI commands see Chapter 5, TSMCLI Usage.

COMMAND ARGUMENTS

commandName
Specifies the command for which it is desired to obtain the help message. Examples:"create-
credential", "get-powerstate".

EXAMPLES
tsmcli --CommandName get-help --CommandArgs "commandName=get-users"

© Copyright Lenovo 2014-2018 18


Lenovo ThinkServer System Manager Command Line Interface User Guide

get-nicsettings

Gets the network configuration of the active network interface on the TSM.

SYNTAX
tsmcli --CommandName get-nicsettings --ComputerName <computer_name> --
Credential <credential> [--Authentication <basic>] [--LogLevel <0|1|2|3|4|
5|6|7>] [--Port <port>] [--SkipSSLCertificateCheck ] [--UseSSL ]

DESCRIPTION

The get-nicsettings command gets the network configuration of a specific Lenovo ThinkServer
System Manager.

PARAMETERS

For a list of parameters applicable to all TSMCLI commands see Chapter 5, TSMCLI Usage.

EXAMPLES
tsmcli --CommandName get-nicsettings --ComputerName my_computer.com --
Credential mycredential.xml

© Copyright Lenovo 2014-2018 19


Lenovo ThinkServer System Manager Command Line Interface User Guide

get-powerconsumption

Retrieves information about a ThinkServer power consumption. It provides the current power
consumption, the average power consumption (based on values recorded by TSM), the date and
time of the most recent peak of consumption and also the power consumption history.

SYNTAX
tsmcli --CommandName get-powerconsumption --ComputerName <computer_name>
--Credential <credential> [--Authentication <basic>] [--LogLevel <0|1|2|3|
4|5|6|7>] [--Port <port>] [--SkipSSLCertificateCheck ] [--UseSSL ] [--
CommandArgs "[getHistory=<0|1>;][saveToFile=<file>]"]

DESCRIPTION

The get-powerconsumption command retrieves the information about power consumption (in watts)
from a specific ThinkServer. It provides the current power consumption, the average power
consumption (based on values recorded by TSM), the date and time of the most recent peak of
consumption and also the power consumption history.

PARAMETERS

For a list of parameters applicable to all TSMCLI commands see Chapter 5, TSMCLI Usage.

COMMAND ARGUMENTS

getHistory
Indicates if the user desires to get the history of all power consumption information obtained
from the ThinkServer (optional). Valid values: 0 (default) for no history or 1 to get the history.

saveToFile
Allows the definition of filename and path where the power consumption history of the
ThinkServer will be saved (applicable only if getHistory is "1"). It will be saved in a CSV format
with index, date and time (in ISO 8601 format) and the power consumption value. The path
shall exist, and if there is already a file with the same name on that path, it will be
overwritten. The filename must have an extension.

EXAMPLES
tsmcli --CommandName get-powerconsumption --ComputerName my_computer.com
--Credential mycredential.xml

© Copyright Lenovo 2014-2018 20


Lenovo ThinkServer System Manager Command Line Interface User Guide

get-psuredundancysettings

Gets the PSU redundancy settings of a specific ThinkServer.

SYNTAX
tsmcli --CommandName get-psuredundancysettings --ComputerName
<computer_name> --Credential <credential> [--Authentication <basic>] [--
LogLevel <0|1|2|3|4|5|6|7>] [--Port <port>] [--SkipSSLCertificateCheck ]
[--UseSSL ]

DESCRIPTION

The get-psuredundancysettings command gets the power supply redundancy settings of a specific
ThinkServer.

PARAMETERS

For a list of parameters applicable to all TSMCLI commands see Chapter 5, TSMCLI Usage.

EXAMPLES
tsmcli --CommandName get-psuredundancysettings --ComputerName
my_computer.com --Credential mycredential.xml

© Copyright Lenovo 2014-2018 21


Lenovo ThinkServer System Manager Command Line Interface User Guide

get-remotemediasettings

Gets the remote media settings and the list of available remote media images on a specific TSM.

SYNTAX
tsmcli --CommandName get-remotemediasettings --ComputerName
<computer_name> --Credential <credential> [--Authentication <basic>] [--
LogLevel <0|1|2|3|4|5|6|7>] [--Port <port>] [--SkipSSLCertificateCheck ]
[--UseSSL ]

DESCRIPTION

The get-remotemediasettings command gets the remote media settings and the list of available
remote media images on a specific Lenovo ThinkServer System Manager.

PARAMETERS

For a list of parameters applicable to all TSMCLI commands see Chapter 5, TSMCLI Usage.

EXAMPLES
tsmcli --CommandName get-remotemediasettings --ComputerName
my_computer.com --Credential mycredential.xml

© Copyright Lenovo 2014-2018 22


Lenovo ThinkServer System Manager Command Line Interface User Guide

get-sel

Gets the SEL (System Event Log) of a specific TSM.

SYNTAX
tsmcli --CommandName get-sel --ComputerName <computer_name> --Credential
<credential> [--Authentication <basic>] [--LogLevel <0|1|2|3|4|5|6|7>] [--
Port <port>] [--SkipSSLCertificateCheck ] [--UseSSL ]

DESCRIPTION

The get-sel command gets the SEL of the specified Lenovo ThinkServer System Manager.

PARAMETERS
For a list of parameters applicable to all TSMCLI commands see Chapter 5, TSMCLI Usage.

EXAMPLES
tsmcli --CommandName get-sel --ComputerName my_computer.com --Credential
mycredential.xml

© Copyright Lenovo 2014-2018 23


Lenovo ThinkServer System Manager Command Line Interface User Guide

get-sensors

Gets current sensor readings from a specific TSM.

SYNTAX
tsmcli --CommandName get-sensors --ComputerName <computer_name> --
Credential <credential> [--Authentication <basic>] [--LogLevel <0|1|2|3|4|
5|6|7>] [--Port <port>] [--SkipSSLCertificateCheck ] [--UseSSL ] [--
CommandArgs "sensorName=<sensor_name>"]

DESCRIPTION

The get-sensors command gets the current sensor readings from a specific Lenovo ThinkServer
System Manager. The list is ordered by name and contains name, type, unit, current reading and
thresholds of each sensor. The type and unit codes are defined by the IPMI specification. If a sensor
name is passed in, only information about that specific sensor is returned.

PARAMETERS

For a list of parameters applicable to all TSMCLI commands see Chapter 5, TSMCLI Usage.

COMMAND ARGUMENTS

sensorName
Optional argument that specifies the name of a sensor to get information from. If this
argument is not specified, information about all sensors is returned.

EXAMPLES
tsmcli --CommandName get-sensors --ComputerName my_computer.com --
Credential mycredential.xml

© Copyright Lenovo 2014-2018 24


Lenovo ThinkServer System Manager Command Line Interface User Guide

get-systeminfo

Gets the system information of a specific TSM.

SYNTAX
tsmcli --CommandName get-systeminfo --ComputerName <computer_name> --
Credential <credential> [--Authentication <basic>] [--LogLevel <0|1|2|3|4|
5|6|7>] [--Port <port>] [--SkipSSLCertificateCheck ] [--UseSSL ]

DESCRIPTION

The get-systeminfo command gets the system information of a specific Lenovo ThinkServer System
Manager.

PARAMETERS

For a list of parameters applicable to all TSMCLI commands see Chapter 5, TSMCLI Usage.

EXAMPLES
tsmcli --CommandName get-systeminfo --ComputerName my_computer.com --
Credential mycredential.xml

© Copyright Lenovo 2014-2018 25


Lenovo ThinkServer System Manager Command Line Interface User Guide

get-users

Gets the list of local users on a specific TSM.

SYNTAX
tsmcli --CommandName get-users --ComputerName <computer_name> --Credential
<credential> [--Authentication <basic>] [--LogLevel <0|1|2|3|4|5|6|7>] [--
Port <port>] [--SkipSSLCertificateCheck ] [--UseSSL ]

DESCRIPTION

The get-users command gets the list of local users on a specific Lenovo ThinkServer System
Manager. The list contains the id, username, e-mail address, role, KVM, virtual media, SNMP status,
SNMP access, authentication protocol and privacy protocol for each user.

PARAMETERS

For a list of parameters applicable to all TSMCLI commands see Chapter 5, TSMCLI Usage.

EXAMPLES
tsmcli --CommandName get-users --ComputerName my_computer.com --Credential
mycredential.xml

© Copyright Lenovo 2014-2018 26


Lenovo ThinkServer System Manager Command Line Interface User Guide

reset-config

Restores a TSM to its factory configuration.

SYNTAX
tsmcli --CommandName reset-config --ComputerName <computer_name> --
Credential <credential> [--Authentication <basic>] [--LogLevel <0|1|2|3|4|
5|6|7>] [--Port <port>] [--SkipSSLCertificateCheck ] [--UseSSL ] --
CommandArgs "force=<1>"

DESCRIPTION

The reset-config command restores a Lenovo ThinkServer System Manager to its factory
configuration.

PARAMETERS

For a list of parameters applicable to all TSMCLI commands see Chapter 5, TSMCLI Usage.

COMMAND ARGUMENTS

force
The reset-config command will reset the TSM settings to their factory defaults, erasing any
customizations already made. As a security measure, the "force" argument is required and
must be specified as "1".

EXAMPLES
tsmcli --CommandName reset-config --ComputerName my_computer.com --
Credential mycredential.xml --CommandArgs "force=1"

© Copyright Lenovo 2014-2018 27


Lenovo ThinkServer System Manager Command Line Interface User Guide

set-nicsettings

Sets the network configuration of a specific network interface on the TSM.

SYNTAX
tsmcli --CommandName set-nicsettings --ComputerName <computer_name> --
Credential <credential> [--Authentication <basic>] [--LogLevel <0|1|2|3|4|
5|6|7>] [--Port <port>] [--SkipSSLCertificateCheck ] [--UseSSL ] [--
CommandArgs "[ipv4Address=<ipv4 address>;][ipv4DefaultGateway=<ipv4
address>;][ipv4Mode=<dhcp|static>;][ipv4SubnetMask=<ipv4 address>;]
[ipv6Address=<ipv6 address>;][ipv6DefaultGateway=<ipv6 address>;]
[ipv6Enabled=<0|1>;][ipv6Mode=<dhcp|static>;][ipv6SubnetPrefixLength=<ipv6
address>;][nicMode=<shared|dedicated>;][vlanEnabled=<0|1>;][vlanId=<2 to
4094>;][vlanPriority=<0 to 7>]"]

DESCRIPTION

The set-nicsettings command sets the network configuration on the Lenovo ThinkServer System
Manager. When switching between the NIC modes (shared/dedicated) this operation can take some
minutes. During this time, network connectivity to the TSM can be lost.

PARAMETERS

For a list of parameters applicable to all TSMCLI commands see Chapter 5, TSMCLI Usage.

COMMAND ARGUMENTS

ipv4Address
Specifies the new IPv4 address for the network interface.

ipv4DefaultGateway
Specifies the new default IPv4 gateway for the network interface. This argument is required if
IPv4 mode is changed from "dhcp" to "static".

ipv4Mode
Specifies the IPv4 assignment mode. The possible values are "dhcp" if the configuration will
be retrieved from a DHCP server or "static" if the new settings will be defined manually.

ipv4SubnetMask
Specifies the new network subnet mask for the network interface. This argument is required if
IPv4 mode is changed from "dhcp" to "static".

ipv6Address
Specifies the new IPv6 address for the network interface. This argument is required if IPv6
mode is changed from "dhcp" to "static".

ipv6DefaultGateway

© Copyright Lenovo 2014-2018 28


Lenovo ThinkServer System Manager Command Line Interface User Guide

Specifies the new default IPv6 gateway for the network interface. This argument is required if
IPv6 mode is changed from "dhcp" to "static".

ipv6Enabled
Specifies whether the IPv6 settings should be enabled (1) or not (0). When changing the NIC
mode the IPv6 settings will be disabled by default.

ipv6Mode
Specifies the IPv6 assignment mode. The possible values are "dhcp" if the configuration will
be retrieved from a DHCP server or "static" if the new settings will be defined manually.

ipv6SubnetPrefixLength
Specifies the new network subnet prefix length for the network interface. This value must be a
number between 0 and 128. This argument is required if IPv6 mode is changed from "dhcp"
to "static"

nicMode
Specifies the mode for network interface. The available modes are "shared" or "dedicated"
(optional). When changing the NIC mode the IPv4 arguments are required.

vlanEnabled
Specifies whether the VLAN should be enabled (1) or not (0) for this NIC. When changing the
NIC mode the VLAN will be disabled by default.

vlanId
Specifies the id of the VLAN (2 to 4094). This argument is required if vlanEnabled is "1".

vlanPriority
Specifies the priority of the VLAN (0 to 7). This argument isrequired if vlanEnabled is "1".

EXAMPLES
tsmcli --CommandName set-nicsettings --ComputerName myserver --Port 80 --
Authentication basic --Credential credential.xml --CommandArgs
"ipv4Mode=static;ipv4Address=192.168.1.12;ipv4SubnetMask=255.255.255.0;ipv
4DefaultGateway=192.168.1.1"

tsmcli --CommandName set-nicsettings --ComputerName myserver --Port 80 --


Authentication basic --Credential credential.xml --CommandArgs
"ipv6Mode=static;ipv6Address=2001:0db8:85a3::8a2e:370:7334;ipv6SubnetPrefi
xLength=64;ipv6DefaultGateway=2001:db8:85a3::8a2e:370:ffff"

© Copyright Lenovo 2014-2018 29


Lenovo ThinkServer System Manager Command Line Interface User Guide

set-psuredundancysettings

Configures the power supply redundancy on a specific ThinkServer.

SYNTAX
tsmcli --CommandName set-psuredundancysettings --ComputerName
<computer_name> --Credential <credential> [--Authentication <basic>] [--
LogLevel <0|1|2|3|4|5|6|7>] [--Port <port>] [--SkipSSLCertificateCheck ]
[--UseSSL ] [--CommandArgs "[powerCappingEnabled=<0|1>;]
[redundancyMode=<normal|cold>]"]

DESCRIPTION

The set-psuredundancysettings command configures the power supply redundancy on a specific


ThinkServer.

PARAMETERS

For a list of parameters applicable to all TSMCLI commands see Chapter 5, TSMCLI Usage.

COMMAND ARGUMENTS

powerCappingEnabled
Specifies the power capping enable state (optional and the new configuration will be active
only when there is two PSUs active on the server).

redundancyMode
The redundancy mode. Possible values are: "normal" or "cold" (optional and the new
configuration will be active only when there is two PSUs active on the server). For more
information about PSU redundancy modes please verify the ThinkServer documentation.

EXAMPLES
tsmcli --CommandName set-psuredundancysettings --ComputerName
my_computer.com --Credential mycredential.xml --CommandArgs
"redundancyMode=normal"

© Copyright Lenovo 2014-2018 30


Lenovo ThinkServer System Manager Command Line Interface User Guide

set-remotemediasettings

Sets the remote media settings on a specific TSM.

SYNTAX
tsmcli --CommandName set-remotemediasettings --ComputerName
<computer_name> --Credential <credential> [--Authentication <basic>] [--
LogLevel <0|1|2|3|4|5|6|7>] [--Port <port>] [--SkipSSLCertificateCheck ]
[--UseSSL ] --CommandArgs "enabled=<0|1>;[domainName=<domain>;]
[password=<password>;][serverAddress=<ip>;][shareType=<nfs|cifs>;]
[sourcePath=<source_path>;][username=<username>]"

DESCRIPTION

The set-remotemediasettings command sets the remote media settings on a specific Lenovo
ThinkServer System Manager. This command allows enabling or disabling the remote media support
and also configuring a server where remote images will be placed.

PARAMETERS

For a list of parameters applicable to all TSMCLI commands see Chapter 5, TSMCLI Usage.

COMMAND ARGUMENTS

enabled
Indicates if remote media support should be enabled (1) or not (0).

domainName
If the share type is "cifs", then the domain name must be provided.

password
If the share type is "cifs", then the user's password for the server must be provided. It shall
have a maximum of 31 characters. The password cannot contain ';'(semicolon).

serverAddress
The remote media server address. It can be an IPv4 address or an IPv6 address.

shareType
The type of share used on the specified server. Either "nfs" or "cifs".

sourcePath
Path where the image files are located on the specified server.

username
If the share type is "cifs", then a username for the server must be provided. It shall have a
maximum of 255 characters. Blank spaces at the beginning and the end of the username are
discarded. The username cannot contain only blank spaces. The following special characters
are not allowed: '#'(pound sign), ';'(semicolon), '\'(backslash) and '''(single quote).

© Copyright Lenovo 2014-2018 31


Lenovo ThinkServer System Manager Command Line Interface User Guide

EXAMPLES
tsmcli --CommandName set-remotemediasettings --ComputerName myserver --
Credential credential.xml --CommandArgs
"enabled=1;serverAddress=192.168.1.12;sourcePath=cifs;shareType=cifs;usern
ame=test;password=test;domainName=lenovo.com"

© Copyright Lenovo 2014-2018 32


Lenovo ThinkServer System Manager Command Line Interface User Guide

set-user

Modifies an user account on a specific TSM.

SYNTAX
tsmcli --CommandName set-user --ComputerName <computer_name> --Credential
<credential> [--Authentication <basic>] [--LogLevel <0|1|2|3|4|5|6|7>] [--
Port <port>] [--SkipSSLCertificateCheck ] [--UseSSL ] --CommandArgs
"userId=<id>;[authenticationProtocol=<sha|md5>;][email=<email>;][kvm=<0|
1>;][password=<password>;][privacyProtocol=<des|aes>;][role=<admin|user|
operator>;][snmp=<0|1>;][snmpAccess=<read-only|read-write>;]
[virtualMedia=<0|1>]"

DESCRIPTION

The set-user command modifies an user account on a specific Lenovo ThinkServer System Manager.

PARAMETERS

For a list of parameters applicable to all TSMCLI commands see Chapter 5, TSMCLI Usage.

COMMAND ARGUMENTS

userId
Specifies the user id.

authenticationProtocol
Specifies the authentication protocol for SNMP settings (required if SNMP is changed from "0"
to "1"). Possible values are: "sha" or "md5". The "password" argument is required if
authentication protocol is specified.

email
Specifies the user email (optional). The email length is limited to 63 characters and can be
defined as empty string ("") to clear the former value. In addition, the e-mail shall be in the
format <username>@<domain>. Examples: "[email protected]" and
"[email protected]".

kvm
Specifies the KVM privilege (optional).

password
Specifies the password (required if "authenticationProtocol" argument is specified). It shall
have a maximum of 20 characters and only printable ASCII characters and spaces are
accepted. In addition, if SNMP is enabled, the password shall have at least 8 characters.

privacyProtocol
Specifies the encryption algorithm to use for SNMP settings (required if SNMP is changed from
"0" to "1"). Possible values are: "des" or "aes".

© Copyright Lenovo 2014-2018 33


Lenovo ThinkServer System Manager Command Line Interface User Guide

role
Specifies the user role (optional). Possible values are: "admin" for Administrator, "user" for
User or "operator" for Operator.

snmp
Specifies the SNMP enabled state (optional).

snmpAccess
Specifies the SNMP access level (required if SNMP is changed from "0" to "1"). Possible values
are: "read-only" or "read-write".

virtualMedia
Specifies the Virtual Media privilege (optional).

EXAMPLES
tsmcli --CommandName set-user --ComputerName my_computer.com --Credential
mycredential.xml --CommandArgs "userId=id;[email protected]"

© Copyright Lenovo 2014-2018 34


Lenovo ThinkServer System Manager Command Line Interface User Guide

start-remotemediaimage

Starts a remote media image redirection on a specific TSM.

SYNTAX
tsmcli --CommandName start-remotemediaimage --ComputerName <computer_name>
--Credential <credential> [--Authentication <basic>] [--LogLevel <0|1|2|3|
4|5|6|7>] [--Port <port>] [--SkipSSLCertificateCheck ] [--UseSSL ] --
CommandArgs "imageName=<imagename>;imageType=<cddvd|hd>"

DESCRIPTION

The start-remotemediaimage command starts a remote media image redirection on a specific


Lenovo ThinkServer System Manager. This operation can be executed only when remote media is
enabled.

PARAMETERS

For a list of parameters applicable to all TSMCLI commands see Chapter 5, TSMCLI Usage.

COMMAND ARGUMENTS

imageName
The name and format of the image file that will be accessed remotely from the TSM. The
image file format must always be .img for Harddisk and .iso for CD/DVD. The image name is
case sensitive.

imageType
Specifies the type of the remote image redirection to be started on the specified TSM. The
possible values are "cddvd" for CD/DVD or "hd" for Harddisk image.

EXAMPLES
tsmcli --CommandName start-remotemediaimage --ComputerName my_computer.com
--Credential mycredential.xml --CommandArgs
"imageName=image.img;imageType=hd"

© Copyright Lenovo 2014-2018 35


Lenovo ThinkServer System Manager Command Line Interface User Guide

stop-remotemediaimage

Stops a remote media image redirection on a specific TSM.

SYNTAX
tsmcli --CommandName stop-remotemediaimage --ComputerName <computer_name>
--Credential <credential> [--Authentication <basic>] [--LogLevel <0|1|2|3|
4|5|6|7>] [--Port <port>] [--SkipSSLCertificateCheck ] [--UseSSL ] --
CommandArgs "imageType=<cddvd|hd>"

DESCRIPTION

The stop-remotemediaimage command stops a remote media image redirection on a specific Lenovo
ThinkServer System Manager. This operation can be executed only when remote media is enabled.

PARAMETERS

For a list of parameters applicable to all TSMCLI commands see Chapter 5, TSMCLI Usage.

COMMAND ARGUMENTS

imageType
Specifies the type of the remote image redirection to be stopped on the specified TSM. The
possible values are "cddvd" for CD/DVD or "hd" for hard disk image.

EXAMPLES
tsmcli --CommandName stop-remotemediaimage --ComputerName my_computer.com
--Credential mycredential.xml --CommandArgs "imageType=cddvd"

© Copyright Lenovo 2014-2018 36


Lenovo ThinkServer System Manager Command Line Interface User Guide

7. Commands permissions

The table below shows the minimum permission for a TSM user required to successfully run each
TSMCLI command:

create-credential User
create-user Administrator
delete-user Administrator
get-auditlog Operator
get-commands -
get-crashscreen User
get-frus User
get-fwversions Administrator
get-help -
get-nicsettings Operator
get-powerconsumption User
get-psuredundancysettings User
get-remotemediasettings User
get-sel User
get-sensors User
get-systeminfo User
get-users Operator
reset-config Administrator
set-nicsettings Administrator
set-psuredundancysettings Administrator
set-remotemediasettings Administrator
set-user Administrator
start-remotemediaimage User
stop-remotemediaimage User

© Copyright Lenovo 2014-2018 37


Lenovo ThinkServer System Manager Command Line Interface User Guide

8. TSMCLI Exceptions and Errors

Below is the list of common errors and exceptions that can be thrown by the TSMCLI:

Authentication Exceptions
Thrown when the some authentication problem is found, like invalid or missing
credentials.
Memory Allocation Exceptions
Thrown in case of exceptions when allocating memory for internal TSMCLI
operations.
Missing Parameters
Thrown when a required parameter for a TSMCLI command is missing.
Missing Arguments
Thrown when a required argument specific to a TSMCLI command is missing.
Invalid Arguments
Thrown when an invalid argument is informed on a TSMCLI command.
Invalid Argument Values
Thrown when invalid values are informed on a TSMCLI command specific
argument.
Invalid Commands
Thrown when an invalid TSMCLI command is informed.
Server Communication Problems
Thrown when the TSM is not reachable or takes too long to respond and similar
situations.

© Copyright Lenovo 2014-2018 38


Lenovo ThinkServer System Manager Command Line Interface User Guide

9. Tips

9.1. Unsupported special characters on the TSM and TSMCLI

• All ASCII control characters are not supported. See the table below:

DEC OCT HEX Symbol Description DEC OCT HEX Symbol Description
0 000 00 NUL Null character 16 020 10 DLE Data Line Escape
1 001 01 SOH Start of Heading 17 021 11 DC1 Device Control 1 (oft. XON)
2 002 02 STX Start of Text 18 022 12 DC2 Device Control 2
3 003 03 ETX End of Text 19 023 13 DC3 Device Control 3 (oft. XOFF)
4 004 04 EOT End of Transmission 20 024 14 DC4 Device Control 4
5 005 05 ENQ Enquiry 21 025 15 NAK Negative Acknowledgement
6 006 06 ACK Acknowledgment 22 026 16 SYN Synchronous Idle
7 007 07 BEL Bell 23 027 17 ETB End of Transmit Block
8 010 08 BS Back Space 24 030 18 CAN Cancel
9 011 09 HT Horizontal Tab 25 031 19 EM End of Medium
10 012 0A LF Line Feed 26 032 1A SUB Substitute
11 013 0B VT Vertical Tab 27 033 1B ESC Escape
12 014 0C FF Form Feed 28 034 1C FS File Separator
13 015 0D CR Carriage Return 29 035 1D GS Group Separator
14 016 0E SO Shift Out / X-On 30 036 1E RS Record Separator
15 017 0F SI Shift In / X-Off 31 037 1F US Unit Separator

• For TSM Users, the following rules applies to "usernames":

1. The username shall not start with a digit.


2. The username shall not start with any of the following characters:
DEC OCT HEX Symbol Description
45 055 2D - Hyphen
64 100 40 @ At symbol
95 137 5F _ Underscore

3. The username shall not contain the following characters:


DEC OCT HEX Symbol Description DEC OCT HEX Symbol Description
32 040 20 Space 59 073 3B ; Semicolon
33 041 21 ! Exclamation mark 60 074 3C Less than
34 042 22 " Double quotes 61 075 3D = Equals
35 043 23 # Hash 62 076 3E > Greater than
36 044 24 $ Dollar sign 63 077 3F ? Question mark
37 045 25 % Percent 91 133 5B [ Opening bracket
38 046 26 & Ampersand 92 134 5C \ Backslash
39 047 27 ' Single quote 93 135 5D ] Closing Bracket
40 050 28 ( Opening parenthesis 94 136 5E ^ Caret
41 051 29 ) Closing parenthesis 96 140 60 ` Grave accent
42 052 2A * Asterisk 123 173 7B { Opening braces
43 053 2B + Plus 124 174 7C | Vertical bar
44 054 2C , Comma 125 175 7D } Closing braces
46 056 2E . Period 126 176 7E ~ Tilde
47 057 2F / Slash 127 177 7F Delete
58 072 3A : Colon

4. For TSM Users, the following characters are not allowed in "password":

© Copyright Lenovo 2014-2018 39


Lenovo ThinkServer System Manager Command Line Interface User Guide

DEC OCT HEX Symbol Description


59 073 3B ; Semicolon
127 177 7F Delete

© Copyright Lenovo 2014-2018 40

You might also like