Sunteți pe pagina 1din 540

IBM Systems

IBM Systems Director Commands Reference


Version 6.1.2
GC30-4170-04

IBM Systems

IBM Systems Director Commands Reference


Version 6.1.2
GC30-4170-04

Note Before using this information and the product it supports, read the information in Notices on page 523.

Copyright IBM Corporation 1999, 2009. US Government Users Restricted Rights Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

Contents
About this publication . . . . . . . . v
. v . v . . . . . . vi . . . . . . ix . . . . . . x . . . . . . . . . . Conventions and terminology . . How to read syntax diagrams . . Publications and related information Web resources. . . . . . . . How to send your comments . . . dsh command . . . . . . . . Tasks and scheduled jobs commands . lstask command . . . . . . . runtask command . . . . . . . lsjob command . . . . . . . . lsjobhistory command . . . . . rmjob command . . . . . . . rmjobhistory command . . . . . runjob command . . . . . . . Update commands . . . . . . . checkupd command . . . . . . cleanupd command . . . . . . lsupd command . . . . . . . lsver command . . . . . . . . importupd command . . . . . . installupd command . . . . . . uninstallupd command . . . . . Security commands . . . . . . . authusergp command . . . . . cfgcred command . . . . . . . chaudit command . . . . . . . chcred command . . . . . . . chusergp command . . . . . . lsaudit command . . . . . . . lsauditlogs command . . . . . . lscred command . . . . . . . lsuser command . . . . . . . lsusergp command . . . . . . rmauditlogs command . . . . . rmcred command . . . . . . . rmusergp command . . . . . . Users . . . . . . . . . . . chuser command . . . . . . . lsuser command . . . . . . . Roles . . . . . . . . . . . chrole command . . . . . . . lsperm command . . . . . . . lsrole command . . . . . . . mkrole command . . . . . . . rmrole command . . . . . . . SNMP device commands . . . . . SNMP get command . . . . . . SNMP getbulk command . . . . SNMP getnext command . . . . SNMP inform command. . . . . SNMP set command . . . . . . SNMP trap command . . . . . SNMP walk command . . . . . Storage commands . . . . . . . Storage-configuration settings . . . Network storage hosts commands . Network storage path commands. . Network storage systems commands Network storage volumes commands Virtualization commands . . . . . chvrtauth command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 257 259 267 272 279 283 285 288 291 292 297 300 306 307 310 317 322 323 325 328 329 331 335 336 338 340 345 349 351 353 356 356 360 365 365 369 372 377 379 382 384 386 387 389 391 393 395 397 398 401 409 429 435 452 455

Chapter 1. smcli - Systems management command-line interface . . . . . . . . 1


Language specifications for smcli commands . . . 5 Port configuration for smcli . . . . . . . . . 6 CLILEGACY environment variable . . . . . . . 6 Alphabetical listing of all smcli commands . . . . 6 lsbundle command . . . . . . . . . . . . 14 System commands . . . . . . . . . . . . 15 accesssys command. . . . . . . . . . . 17 chsys command . . . . . . . . . . . . 22 lssys command . . . . . . . . . . . . 27 pingsys command . . . . . . . . . . . 33 rmsys command . . . . . . . . . . . . 38 rpower command . . . . . . . . . . . 42 Web interface commands . . . . . . . . . . 47 endSession command . . . . . . . . . . 47 Group commands . . . . . . . . . . . . 49 chgp command . . . . . . . . . . . . 50 lsgp command . . . . . . . . . . . . 55 mkgp command . . . . . . . . . . . . 62 rmgp command . . . . . . . . . . . . 67 Discovery and inventory commands . . . . . . 70 discover command . . . . . . . . . . . 71 collectinv command . . . . . . . . . . 74 lsinv command . . . . . . . . . . . . 79 Configuration plans and templates commands. . . 85 Configuration plan commands . . . . . . . 85 Configuration template commands . . . . . 93 Status commands . . . . . . . . . . . . 102 chled command . . . . . . . . . . . 103 lsled command . . . . . . . . . . . . 107 lsstatus command . . . . . . . . . . . 110 Resource monitor commands . . . . . . . . 116 Resource monitor commands . . . . . . . 117 Resource-monitor threshold commands. . . . 126 Resource-monitor recording commands. . . . 146 Process monitor commands. . . . . . . . . 165 lsps command . . . . . . . . . . . . 165 mkpmtask command . . . . . . . . . . 169 rmpmtask command . . . . . . . . . . 172 Event and event automation plan commands . . . 174 Event, event log and event action history commands . . . . . . . . . . . . . 177 Event automation plan commands . . . . . 200 Event action commands . . . . . . . . . 222 Event filter commands . . . . . . . . . 239 Remote access commands . . . . . . . . . 249 dconsole command . . . . . . . . . . 249
Copyright IBM Corp. 1999, 2009

iii

chvrthost command . . chfarm command . . . chvs command . . . . lsvrtsys command . . . lsvrtcap command. . . mkfarm command. . . mkrelocatetask command mkvs command . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

459 464 467 471 477 482 484 487

smimport command . . . . . . . smreset command . . . . . . . . smrestore command . . . . . . . smsave command . . . . . . . . smstart command . . . . . . . . smstatus command . . . . . . . smstop command . . . . . . . . Supported IBM Director v5.20 commands

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

505 507 509 511 513 514 515 515

Chapter 2. Management server and agent commands . . . . . . . . . . 491


cfgdbcmd command . . . changePassword command . cimsubscribe command . . configAgtMgr command . dirinstall.server command . getfru command . . . . smexport command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491 495 495 500 502 503 503

Appendix. Discontinued commands


Discontinued dircli commands . . Discontinued dircmd commands . . Discontinued management-server and commands . . . . . . . . . . . . . . . agent . . . . . .

517
. 517 . 519 . 522

Notices . . . . . . . . . . . . . . 523
Trademarks . . . . . . . . . . . . . . 524

iv

IBM Systems Director Commands Reference

About this publication


This book provides reference information for commands available in IBM Systems Director 6.10. These commands fall into two broad categories: v Commands used to configure, start, or stop IBM Systems Director. These commands are entered directly on the command line when the action should be performed. v Commands used to perform IBM Systems Director tasks. These commands are implemented using the IBM Systems Director command-line interface, smcli.

Conventions and terminology


These notices are designed to highlight key information: Note: These notices provide important tips, guidance, or advice. Important: These notices provide information or advice that might help you avoid inconvenient or difficult situations. Attention: These notices indicate possible damage to programs, devices, or data. An attention notice appears before the instruction or situation in which damage can occur.

How to read syntax diagrams


Review the conventions used in syntax diagrams to understand the command descriptions. Syntax diagrams consists of options, option arguments, and operands. Options Options indicate input that affects the behavior of the base command (for example, -l specifies long output) or required input that you can specify in different ways (for example, you can target objects using either -n name OR -N groupname OR -ac objectclass). Options consist of either a hyphen and single letter (for example, -h) or two hyphens and multiple letters (for example, --help). The single letter format is the short form of the multiple letter format, and the two formats are functionally interchangeable when issuing a command. Option arguments Some options are followed by one or more option arguments that specify a value for the option. For example, with -file file_name, file_name specifies the name of the file on or with which to take action. Operands Operands are parameters at the end of a command that specify required user input. Syntax diagrams adhere to the following conventions: v Options and operands that are enclosed in brackets ([]) are optional. Do not include these brackets in the command.

Copyright IBM Corp. 1999, 2009

v Options and operands that are enclosed in braces ({}) are required. Do not include these braces in the command. v Options and operands that are not enclosed in either brackets or braces are required. v Operands and option arguments that are italicized must be replaced with actual values. v The names of options are case sensitive and must be typed exactly as shown. v Options preceded by two dashes (--) must be specified in their entirety. v A pipe (|) character signifies that you can or must, depending on the enclosing characters, choose one option or the other. For example, [a | b] indicates that you can choose either a or b, but not both. Similarly, {a | b} indicates that you must choose either a or b. v An ellipsis (...) signifies that you can repeat the operand and option argument on the command line. v A dash (-) represents standard output.

Publications and related information


You can view the same content in the IBM Systems Director Information Center as PDF documents. To view a PDF file, you need Adobe Acrobat Reader, which can be downloaded for free from the Adobe Web site at www.adobe.com/products/ acrobat/readstep.html.

Information centers and topic collections


v IBM Systems publib.boulder.ibm.com/infocenter/systems/index.jsp View the IBM Systems information center which provides integrated information for multiple IBM Systems products, including operating systems, hardware, storage, and software. This information center also contains scenarios to help you use multiple IBM Systems products in the same environment. v IBM Systems Director publib.boulder.ibm.com/infocenter/systems/topic/director_6.1/fqm0_main.html Updated periodically, the IBM Systems Director topic collection contains the most up-to-date documentation available for IBM Systems Director. v IBM Systems Director plug-ins publib.boulder.ibm.com/infocenter/systems/index.jsp View the IBM Systems information center for information about to install and use plug-ins that extend the functionality of IBM Systems Director. v IBM Systems Director Upward Integration Modules (UIMs) publib.boulder.ibm.com/infocenter/systems/topic/uims/fqs0_main.html Read the IBM Systems Director Upward Integration Modules (UIM) topic collection to learn about how to install and use upward integration modules and management packs that enable non-IBM workgroup and enterprisemanagement products to interpret and display data that is provided by Common Agent and Platform Agent. v IBM Systems Director API Licensing http://www.ibm.com/vrm/4api1

vi

IBM Systems Director Commands Reference

View the license information regarding use of IBM Systems Director APIs and their associated documentation. Fill out the form to request API access. After your information is reviewed, you will be contacted with additional information regarding access to and use of the APIs.

Publications
Release Notes 6.1, Release Notes 6.1.1, and Release Notes 6.1.2 Provides information about hardware requirements for running IBM Systems Director components, supported IBM Systems Director hardware, operating systems, databases, and workgroup and enterprise systems-management software. Hardware and Software Support Guide Provides information about hardware requirements for running IBM Systems Director components, supported IBM Systems Director hardware, operating systems, databases, and workgroup and enterprise systems-management software. Planning, Installation, and Configuration Guide for AIX Provides detailed instructions to install and configure each component of IBM Systems Director on system running AIX using the standard installation option. Planning, Installation, and Configuration Guide for IBM i Provides detailed instructions to install and configure each component of IBM Systems Director on system running IBM i using the Standard installation option. Planning, Installation, and Configuration Guide for Linux on Power Systems Provides detailed instructions to install and configure each component of IBM Systems Director on system running Linux for Power Systems using the Standard installation option. Planning, Installation, and Configuration Guide for Linux on x86 Provides detailed instructions to install and configure each component of IBM Systems Director on system running Linux for System x using the Standard installation option. Planning, Installation, and Configuration Guide for Linux on System z Provides detailed instructions to install and configure each component of IBM Systems Director on system running Linux for System z using the Standard installation option. Planning, Installation, and Configuration Guide for Windows Provides detailed instructions to install and configure each component of IBM Systems Director on system running Windows using the Standard installation option. Systems Management Guide Provides detailed instructions for using the Web interface and managing systems and resources in your environment. Troubleshooting Guide Provides information about problems and how to solve them, and strategies for troubleshooting common problems. Events Reference Provides information about IBM Systems Director events, including the event type, description, severity, and extended attributes.

About this publication

vii

Commands Reference Provides detailed information about the systems management command-line interface (smcli) commands, and other commands that can be run directly from the command line, including configuring the database, and starting and stopping IBM Systems Director. Hardware Command Line User's Guide Provides information about installing and using the Hardware Command Line (formerly known as the IBM Management Processor Command-Line Interface). Command output in this release might vary from command output in previous releases.

White papers and briefs


v IBM Systems Director ftp://ftp.software.ibm.com/common/ssi/sa/wh/n/xbw03006usen/ XBW03006USEN.PDF This paper provides a detailed overview of the changes in IBM Systems Director V6.1, including the new Web interface, security features, operating system agents, integrated plug-ins and additional plug-ins that can be separately installed. v Value Proposition for IBM Systems Director ftp://ftp.software.ibm.com/common/ssi/sa/wh/n/xbw03007usen/ XBW03007USEN.PDF This paper describes the challenges of operational management for enterprise server installations and the value provided IBM Systems Director. v Managing IBM Power Servers with IBM Systems Director 6.1 www.ibm.com/common/ssi/fcgi-bin/ssialias?infotype=SA&subtype=WH &appname=STGE_PO_PO_USEN&htmlfid=POW03011USEN &attachment=POW03011USEN.PDF Provides information about managing the virtualization and consolidation on Power systems using IBM Systems Director. v IBM Systems Director 6.1 Migration Tips www.ibm.com/common/ssi/fcgi-bin/ssialias?infotype=SA&subtype=WH &appname=STGE_XB_XB_USEN_&htmlfid=XBW03009USEN &attachment=XBW03009USEN.PDF Provides information about migrating data when upgrading your environment from IBM Director V5.20 to IBM Systems Director V6.1.

IBM Redbooks publications


www.ibm.com/redbooks/ You can also search this Web page for documents that focus on IBM Systems Director and specific IBM hardware; such documents often contain systems-management material. The following book is available for IBM Systems Director V6.1: Implementing IBM Systems Director 6.1 Tip: Be sure to note the date of publication and to determine the version of IBM Systems Director software to which the Redbooks publication refers.

viii

IBM Systems Director Commands Reference

Web resources
Listed here are the Web sites and information center topics that relate to IBM Systems Director.

Web sites
v IBM Systems Director www.ibm.com/systems/management/director/ View the IBM Systems Director Web site on ibm.com which provides links to downloads and documentation for all currently supported versions of IBM Systems Director. v IBM Systems Director Downloads www.ibm.com/systems/management/director/downloads/ View the IBM Systems Director Downloads Web site on ibm.com which provides links to download code IBM Systems Director, IBM Systems Director plug-ins, and IBM Systems Director upward integration modules. v IBM Systems Director Documentation and Resources www.ibm.com/systems/management/director/resources/ View the IBM Systems Director Documentation and Resources Web site on ibm.com which provides links to product documentation, redbooks, redpapers, white papers, and learning modules related to IBM Systems Director, IBM Systems Director plug-ins, and IBM Systems Director upward integration modules. v IBM Systems Director Upward Integration www.ibm.com/systems/management/director/upward/ View the IBM Systems Director Upward Integration Web site on ibm.com which provides more information about IBM Systems Director upward integration modules created by IBM and other companies. IBM Systems Director UIMs enable third-party workgroup and enterprise systems-management products to interpret and display data that is provided by IBM Systems Director Platform-Agent managed system. v IBM Servers www.ibm.com/servers/ View the IBM Servers Web site to learn about IBM Systems server and storage products. v IBM ServerProven www.ibm.com/servers/eserver/serverproven/compat/us/ View the IBM ServerProven Web site to learn about hardware compatibility of IBM System x and BladeCenter systems with IBM applications and middleware, including IBM Systems Director.

Forums
v IBM Systems Director www.ibm.com/developerworks/forums/forum.jspa?forumID=759 View the IBM Systems Director forum Web site on ibm.com to discuss product-related issues pertaining to IBM Systems Director, IBM Systems Director UIMs, and IBM Systems Director extensions. This Web site includes a link for obtaining the forum using a Rich Site Summary (RSS) feed. v IBM Systems Director SDK www.ibm.com/developerworks/forums/dw_esforums.jspa
About this publication

ix

View the IBM Systems Director SDK forum Web site to discuss issues pertaining to the IBM Systems Director Software Development Kit (SDK). This Web site includes a link for obtaining the forum using a Rich Site Summary (RSS) feed. v IBM Systems www.ibm.com/developerworks/forums/dw_esforums.jsp View the IBM Systems forums Web site on ibm.com to learn about various forums that are available to discuss technology-related and product-related issues pertaining to IBM Systems hardware and software products. This Web site includes a link for obtaining the forum using a Rich Site Summary (RSS) feed.

How to send your comments


Your feedback is important in helping to provide the most accurate and highest quality information. If you have any comments about this book or any other IBM Systems Director publication, go to the IBM Systems Director information center Web site at publib.boulder.ibm.com/infocenter/systems/topic/director_6.1/fqm0_main.html. There you will find the feedback page where you can enter and submit comments.

IBM Systems Director Commands Reference

Chapter 1. smcli - Systems management command-line interface


From the systems management command-line interface (called smcli), you can specify options that are not associated with any command.

Syntax
smcli [-h | -? | --help] smcli [-c] [-prompt] [-user user_name] [-pw password] command_string smcli -d

Description
Prerequisite: Management servers running Windows XP, Windows 2000, or Windows 2003 require msvcr80.dll to run smcli. You can obtain the dynamic link library (DLL) by installing vcredist_x86.exe. For information about downloading and installing this file, see https://www.microsoft.com/downloads. You can run smcli commands locally from the management server or remotely by accessing the management server using a remote-access utility, such as secure shell (SSH) or Telnet. Starting with IBM Systems Director 6.1.1, you can execute up to 17 concurrent smcli or dircli threads simultaneously. The 17 concurrent threads are executed in the sequence in which you issue them as 17 independent commands. Obtaining a thread for final execution is dependent on the availability and priority of the thread. Notes: v Ensure that logging is set to capture sufficient data for future debugging. v Thread scheduling is handled in the thread pool and is based on the assigned priority of the thread. v With the exception of CSM, you must manually execute concurrent commands that require the completion of or data from previously-launched threads. This will ensure that the first command completes execution before the command that depends on it starts execution. v To initialize the commands, a security check is done at the launch of each command. v If you ran multiple CLI commands with success in the past, your sequencing might be modified. v Authorization for each thread is not passed from one thread to another. The authorization of the command execution is done at the initial level, so there is no security check at the pool level. The role-based access levels that are defined for each type of user are passed along when a user executes a command. If the management server runs on AIX or Linux and you do not specify the -prompt, -user, and -pw options, specifying smcli is optional. If you do specify one

Copyright IBM Corp. 1999, 2009

or more of those options, you must also specify smcli. If the management server runs on Windows, specifying smcli is required. IBM Systems Director authenticates and authorizes command requests using a Lightweight Directory Access Protocol (LDAP) server. You must specify user credentials (user name and password) for authentication and authorization every time that you run a command. You can specify the user credentials in one of these ways: v Include the user credentials with the command using the -user and -pw options. v Set up a prompt, using the -prompt option or the CLIPROMPT environment variable. v Create a persistent copy of the user name and encrypted password, using the smcli -c command. After the user name and password are saved, the saved credentials are used each time you run a command; you do not need to specify user credentials with the smcli commands until you delete the persistent copy, using the smcli -d command. If you do not specify the -prompt, -user, and -pw options, IBM Systems Director uses the value of the CLIPROMPT environment variable (if set) to determine whether to prompt for the user name and password. You can set this variable to true (prompt) or false (no prompt). If the CLIPROMPT environment variable is not set or is set to false, and you do not specify the -prompt, -user and -pw options with the command, IBM Systems Director uses the persistent copy of the user name and encrypted password; it then authorizes and authenticates using the operating-system authentication mechanisms. Important: v The password is protected from being displayed only when you are prompted for the password or when IBM Systems Director uses the persistent copy of the encrypted password. When you specify the password using the -pw option, the characters for the password are displayed as plain text. v When you specify user credentials from the command line using the -user and -pw options, there is a fraction of a second during which the command (including the user name and password) can be seen by listing the processes on the system. v In previous releases of IBM Systems Director, the CLI was called dircli. The dircli command is supported in this release for compatibility with earlier versions. You can run all smcli commands using dircli. Using the latest smcli commands is recommended; however, dircli commands are supported in this release for compatibility with IBM Systems Director version 5.20 and earlier. To use a dircli command with the same name as an smcli command, you must define the CLILEGACY environment variable and set it to a value of 1.

Operands
None

Flags
-c Creates a persistent copy of the specified user name and password. The password in the persistent copy is encrypted.

IBM Systems Director Commands Reference

If the CLIPROMPT environment variable is not set or is set to false, and you do not specify the -prompt, -user and -pw options with the command, IBM Systems Director uses the persistent copy of the user name and encrypted password; it then authorizes and authenticates using the operating-system authentication mechanisms. If you do not specify the -user or -pw options, IBM Systems Director prompts you for the user name or password. Tips: v After you create a persistent copy of the user name and password, you no longer have to provide the user name and password for subsequent commands. v If you specify this option, you must also specify a valid command. -d Deletes the persistent copy of the user name and encrypted password. Important: For security reasons, you should always run the smcli -d command when you finish using the CLI. -h | -? Displays the syntax and a brief description of smcli. Tips: v If you specify additional options, the options are ignored. v If you want to display the syntax and brief description of a specific command, specify the command name before the -h | -? option. --help Displays detailed information about smcli, including the syntax, a description of smcli, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options, the options are ignored. v If you want to display the detailed information about a specific command, specify the command name before the --help option. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -prompt Prompts you for a user name and password. Tips: v This option protects the display of the password. When you are prompted for the password, no characters are displayed. v Specifying the -prompt option overrides all other mechanisms for prompting, including the CLIPROMPT environment variable. v If you specify this option with the -user and -pw options, the -prompt option is ignored. -pw password Specifies the password for the user name. Important: The password is displayed as plain text when you specify the -pw option. Using this form of authentication could cause a security exposure.

Chapter 1. smcli

Tip: If you specify this option without the -prompt or -user options, you will be prompted for the user name. -user user_name Specifies a valid user name with administrative privileges to be authenticated by the IBM Systems Director Server. Tip: If you specify this option without the -prompt or -pw options, you will be prompted for the password. command_string Runs the specified command and options.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 2: The command or bundle was not found. v 3: The command was not performed because either authentication failed or you are not authorized to perform the action. v 8: The exit code is out of range (0 to 255). v 29: The specified locale is not valid or not supported. v 10: A file-processing error occurred. v 125: An internal error occurred.

Examples
1. Create a user session This example illustrates how to create a user session that uses the persistent copy of the user name and password. The PROMPT environment variable is set to yes, so the user is prompted for the password.
smcli -c -user Admin1 password:

Tip: No characters are displayed when you type the password. 2. Authenticate using the specified user name and password This example illustrates how to list the IBM Systems Director users using the specified user name and password for authentication.
smcli -user Admin1 -pw passw0rd lsuser mysystem\Admin1 mysystem\Admin2

3. Authenticate by prompting for user name and password This example illustrates how to list the IBM Systems Director users and prompt for the user name and password to use for authentication.
smcli -prompt lsuser user: Admin1 password: mysystem\Admin1 mysystem\Admin2

4. Display help for the smcli command This example displays help for the smcli command. The information displayed is identical to the content of this topic.
smcli -?

5. Create a credentials file

IBM Systems Director Commands Reference

This example illustrates how to create a persistent copy of the user name and encrypted password that can be used to authenticate the user when running future commands. The PROMPT environment variable is set to yes, so the user is prompted for the password. This example also lists all smcli commands and bundles.
smcli -c -user Administrator lsbundle password:

6. Delete the credentials file This example illustrates how to delete the credentials file.
smcli -d

Language specifications for smcli commands


IBM Systems Director provides various language-specification methods that can be used with smcli commands. Although you can use the -L | --lang option in the command syntax to specify the language for commands that run in smcli, you can also define the default language by setting the DIR_LANG environment variable or by retrieving language information from the operating-system language settings. The language-specification methods are applied in the following order: v -L | --lang language option in the smcli command syntax Specifying the language explicitly for a smcli command using the -L | --lang language option overrides all other mechanisms for specifying the language, including the DIR_LANG environment variable and operating-system settings. v DIR_LANG environment variable If the smcli command does not specify the language explicitly using the -L | --lang language option, the value of the environment variable DIR_LANG (if set) is used to specify the language. v Operating-system language settings For Windows, the language is specified using the Regional and Language Options setting. For AIX and Linux, the values of these variables are used in the following order: LC_ALL LANG LC_LANG Tip: For messages returned by the smcli command itself, the language is taken from the System language setting for Windows and or the LANG variable for AIX and Linux. These languages can be specified for the -L | --lang option and DIR_LANG environment variable: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese
Chapter 1. smcli

Tips: v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed.

Port configuration for smcli


By default, smcli uses port 2044 to communicate with the IBM Systems Director Server. You can optionally configure the port. To configure the port, create in the home directory on the management server a file named smcliconfig.prop with the necessary level of access protection. This file contains the port attribute, using the following format:
port=port_number

Create smcliconfig.prop in the appropriate home directory location for your operating system: v On Windows, create smcliconfig.prop in My Documents. v On AIX or Linux, create smcliconfig.prop in /root/.

CLILEGACY environment variable


You must set the CLILEGACY environment variable to run the IBM Director v5.20 dircli commands from smcli. Using the latest smcli commands is recommended; however, dircli commands are supported in this release for compatibility with IBM Systems Director version 5.20 and earlier. To use a dircli command with the same name as an smcli command, you must define the CLILEGACY environment variable and set it to a value of 1. Tips: v Setting the CLILEGACY environment variable to 1 is useful if you have scripts must run commands using the dircli syntax. v The smcli command syntax is displayed when you use the help options (-?, -h, or --help) even when the CLILEGACY environment variable to 1. For information about the dircli commands, see the commands reference in the IBM Director v5.20 information center at publib.boulder.ibm.com/infocenter/eserver/ v1r2/topic/diricinfo_5.20/fqm0_r_dircli_table_toc.html. If you do not define CLILEGACY or if you set it to a value of 0, the current command syntax is used.

Alphabetical listing of all smcli commands


The IBM Systems Director smcli commands are grouped in the documentation by function; use this alphabetical listing for quick access to a specific command.

A
accesssys Use the accesssys command to request secured access to systems.

IBM Systems Director Commands Reference

authusergp Use the authusergp command to authorize an existing user group to access the IBM Systems Director Server.

C
cfgcred Use the cfgcred command to configure credentials for systems managed by IBM Systems Director. chaudit Use the chaudit command to modify audit settings. chcred Use the chcred command to change credentials for systems managed by IBM Systems Director. checkupd Use the checkupd command to check for new, changed, and superseding updates. chevtautopln Use the chevtautopln command to change an existing event-automation plan. chfarm Use the chfarm command to add a host to or remove a host from a virtual farm or change a virtual farm's attributes. chgp Use the chgp command to modify groups, including changing membership, modifying attributes, and processing change-specification files. Use the chled command to modify the light-path-diagnostic LED attributes on one or more systems. You can change the status and polling interval.

chled

chnshost Use the chnshost command to change the Storage Area Network (SAN) configuration of one or more system hosts, or detach one or more system hosts from the SAN and optionally remove the volumes. chnspath Use the chnspath command to set the zoning configuration such that only one path exists between the specified system hosts and the specified storage volumes. You can also use this command to unisolate the system hosts. chnssys Use the chnssys command to change the host-type identifier and auto-logical drive transfer (ADT) status on a network-storage system. chnsvol Use the chnsvol command to change the name of a logical volume on a network-storage system. chresmonthresh Use the chresmonthresh command to change the settings of one or more resource monitor thresholds. You can also use this command to activate or deactivate thresholds using this command. chrole Use the chrole command to change the properties of a role. chsys Use the chsys command to change the attributes of a system.

Chapter 1. smcli

chuser Use the chuser command to change the attributes and access settings for a specific user. chusergp Use the chusergp command to change attributes and access privileges for a user group. chvrtauth Use the chvrtauth command to authorize one or more platform managers or host systems by setting or revoking authorization credentials. chvrthost Use the chvrthost command to change the attributes of one or more virtual-server host. chvs Use the chvs command to change the attributes of one or more virtual servers.

cleanupd Use the cleanupd command to clean (that is, delete) update files and information in the update library. collectinv Use the collectinv command to collect data about hardware and software resources that are currently installed on specified systems and to update the database.

D
dconsole Use the dconsole command to run a remote serial console from the IBM Systems Director Server CLI with the purpose of opening the serial console to IBM Power managed systems. This command runs on IBM Systems Director Server for AIX V6.1F or later. discover Use the discover command to discover resources on networks that are connected to the management server. dsh Use the dsh command to run Distributed Shell from the IBM Systems Director Server CLI with the purpose of running commands on remote systems. This command applies to IBM Systems Director Server for AIX only.

E
endSession Use the endSession command to end the IBM Systems Director Web interface session for the selected user. evtacthist Use the evtacthist command to manage the event-action history, including activating or deactivating the history collection and clearing the log. evtautopln Use the evtautopln command to apply one or more systems and groups to or remove one or more systems and groups from one or more event-automation plans. You can also activate or deactivate an event-automation plan. evtlog Use the evtlog command to manage the size of the event log.

IBM Systems Director Commands Reference

G
genevent Use the genevent command to send a custom event to the event router on the management server for testing purposes. get getbulk Use the getbulk command to perform multiple get requests. getnext Use the getnext command to perform an SNMP GETNEXT request on the SNMP device. Use the get command to perform an SNMP GET request to display information about an SNMP device.

I
importupd Use the importupd command to import update information and installable files into the update library on the management server. inform Use the inform command to perform an SNMP Inform request on the SNMP device. installupd Use the installupd command to install one or more updates on one or more systems.

L
lsaudit Use the lsaudit command to list audit settings and categories. lsauditlogs Use the lsauditlogs command to list a specific number of audit log messages for one or more audit categories. lsbundle Use the lsbundle command to list the smcli commands and bundles. lscfgplan Use the lscfgplan command to list configuration plans for systems. lscfgtmpl Use the lscfgtmpl command to list configuration templates for systems in XML format. lscred Use the lscred command to list credentials for systems managed by IBM Systems Director. lsevtact Use the lsevtact command to display information about available event actions or event-action types. lsevtacthist Use the lsevtacthist command to display entries in the event-action history log that are associated with a specific event action or system. lsevtautopln Use the lsevtautopln command to list information about event-automation plans. You can also export one or more event-automation plans to a file.

Chapter 1. smcli

lsevtfltr Use the lsevtfltr command to display information about the event filters. If you do not specify any display options, this command lists the names of all event filters. lsevtlog Use the lsevtlog command to list the contents of the event log (the events that have occurred). lsevttype Use the lsevttype command to list all event types. lsgp lsinv lsjob Use the lsgp command to list the groups that are currently defined in IBM Systems Director. Use the lsinv command to list inventory data for systems or groups. Use the lsjob command to list information about scheduled tasks (called jobs).

lsjobhistory Use the lsjobhistory command to list information about job instances and history data. lsled Use the lsled command to list light path diagnostic LED status on one or more systems.

lsnshost Use the lsnshost command to list in XML format the Storage Area Network (SAN) configuration for system hosts. You can also export the configuration to a file. lsnspath Use the lsnspath command to list in XML format information about the network-storage path. You can also export the information to a file. lsnssys Use the lsnssys command to list the network-storage systems discovered by IBM Systems Director. lsnsvol Use the lsnsvol command to list storage volume properties for the specified network-storage system. lsperm Use the lsperm command to list the permissions. lsps Use the lsps command to list the processes that are available on the specified system.

lsresmon Use the lsresmon command to list resource monitors that are available for monitoring systems. lsresmonrec Use the lsresmonrec command to list information about previously configured resource-monitor recordings. lsresmonthresh Use the lsresmonthresh command to list the resource-monitor thresholds. lsrole Use the lsrole command to list the roles in IBM Systems Director.

10

IBM Systems Director Commands Reference

lsstatus Use the lsstatus command to list the status information for a specified category of systems. lssys Use the lssys command to retrieve system attribute information.

lstask Use the lstask command to list information about one or more tasks. lsupd Use the lsupd command to list updates and their attributes. lsuser Use the lsuser command to list IBM Systems Director users. lsusergp Use the lsusergp command to list the IBM Systems Director user groups. lsver Use the lsver command to list the current version and, if you have updated the product, the previous version of IBM Systems Director that is or was installed on the system.

lsvrtcap Use the lsvrtcap command to list virtualization capabilities of a virtual server or host system. lsvrtsys Use the lsvrtsys command to list the name and ID for virtual systems.

M
mkcfgplan Use the mkcfgplan command to create a configuration plan for a system. This command acquires the configuration information only from an XML input file. mkcfgtmpl Use the mkcfgtmpl command to create a configuration template for a system. This command acquires the configuration-template information only from an XML input file. mkevtactemail Use the mkevtactemail command to create a customized event action that sends an e-mail over the Internet (SMTP) or to a mobile phone. mkevtactstpgm Use the mkevtactstpgm command to create a customized event action that starts a program. mkevtactsttask Use the mkevtactsttask command to create a customized event action that starts a noninteractive task. mkevtautopln Use the mkevtautopln command to create a new event-automation plan or import one or more existing event-automation plans. mkfarm Use the mkfarm command to create a virtual farm. mkgp Use the mkgp command to create static and dynamic groups. mknspath Use the mknspath command to create a connection (a network-storage path) from a system host to a logical volume. mknsvol Use the mknsvol command to create a storage volume by allocating a
Chapter 1. smcli

11

logical volume and setting the Redundant Array of Independent Disks (RAID) level for later attachment to a system host. mkpmtask Use the mkpmtask command to create a new process-monitor task. mkrelocatetask Use the mkrelocatetask command to create a task to relocate (or migrate) virtual servers. mkresmonrec Use the mkresmonrec command to record resource-monitor values. mkresmonthresh Use the mkresmonthresh command to create a new resource-monitor threshold for a system or group. mkrole Use the mkrole command to create roles that contain a list of permissions for authorization to access IBM Systems Director. mkvs Use the mkvs command to create a virtual server.

P
pingsys Use the pingsys command to perform a presence check (ping) on the targeted systems. When the presence check is completed, the results are reflected in the OperatingState and CommunicationState attributes. This command performs an IBM Systems Director presence check and not an Internet Control Message Protocol (ICMP) ping.

R
rmauditlogs Use the rmauditlogs command to remove the audit log for one or more audit categories. rmcfgplan Use the rmcfgplan command to delete configuration plans. rmcfgtmpl Use the rmcfgtmpl command to delete configuration templates. rmcred Use the rmcred command to remove credentials for systems managed by IBM Systems Director. rmevtact Use the rmevtact command to remove customized event actions. rmevtautopln Use the rmevtautopln command to delete one or more event-automation plans. rmevtfltr Use the rmevtfltr command to remove event filters. rmevtlog Use the rmevtlog command to remove entries from the event log. rmgp Use the rmgp command to delete one or more system groups.

rmjob Use the rmjob command to delete one or more jobs.

12

IBM Systems Director Commands Reference

rmjobhistory Use the rmjobhistory command to delete job instances or history. rmnspath Use the rmnspath command to remove a connection (that is, a network-storage path) from a system host to one or more volumes, and optionally remove the volumes if there are no other connections. rmnsvol The rmnsvol command removes one or more volumes on a network-storage system if the volume is not connected to a network-storage system. rmpmtask Use the rmpmtask command to delete a process-monitor task. rmresmonrec Use the rmresmonrec command to delete one or more resource-monitor recordings. rmresmonthresh Use the rmresmonthresh command to remove one or more resource-monitor thresholds. rmrole Use the rmrole command to delete roles. rmsys Use the rmsys command to remove systems and all associated data. rmusergp Use the rmusergp command to remove a user group's authorization to access IBM Systems Director Server. rpower Use the rpower command to perform power-management operations on remote systems. runjob Use the runjob command to run one or more jobs immediately or schedule jobs to run at a specific date and time. You can also schedule a job to repeat automatically at a specified interval. runresmon Use the runresmon command to start monitoring one or more resources on systems and display the monitored values. runtask Use the runtask command to run a non-interactive IBM Systems Director task on a specific system.

S
set Use the set command to perform an SNMP Set request on the SNMP device.

stopresmonrec Use the stopresmonrec command to stop recording resource-monitor values.

T
testevtact Use the testevtact command to test customized event actions.
Chapter 1. smcli

13

trap

Use the trap command to send an SNMP trap to the SNMP device.

U
uninstallupd Use the uninstallupd command to uninstall (roll back) an update on specified systems.

W
walk Use the walk command to traverse a branch of the Management Information Base (MIB) tree of the SNMP device.

lsbundle command
Use the lsbundle command to list the smcli commands and bundles.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsbundle options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsbundle [-h | -? | --help] [-L language]

Description
The lsbundle command lists the bundles and commands currently defined in IBM Systems Director. Use this command to determine which functions are available from the command line. Each line of the output displays the name of a bundle and command belonging to the bundle, separated by a slash:
bundleName/commandName

IBM Systems Director commands available in this release are listed first, followed by a blank line. The bundles commands listed after the blank line are supported commands that were introduced in IBM Systems Director 5.20. or earlier.

Operands
None.

Flags
-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips:

14

IBM Systems Director Commands Reference

v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 29: The specified locale is not valid or not supported.

Example
List the smcli commands This command illustrates how to list all the bundles and commands defined for smcli.
smcli lsbundle

System commands
The smcli system commands perform administrative operations on the IBM Systems Director system, including discovering, adding, removing, and listing information.
Chapter 1. smcli

15

smcli commands
These smcli system commands are available: accesssys Use the accesssys command to request secured access to systems. chsys lssys pingsys Use the pingsys command to perform a presence check (ping) on the targeted systems. When the presence check is completed, the results are reflected in the OperatingState and CommunicationState attributes. This command performs an IBM Systems Director presence check and not an Internet Control Message Protocol (ICMP) ping. rmsys Use the rmsys command to remove systems and all associated data. rpower Use the rpower command to perform power-management operations on remote systems. Use the chsys command to change the attributes of a system. Use the lssys command to retrieve system attribute information.

dircli commands
Using the new smcli system commands is recommended; however, the dircli managed-object commands listed in the following table are supported in this release for compatibility with IBM Director version 5.20. For information about the dircli commands, see the commands reference in the IBM Director v5.20 information center at publib.boulder.ibm.com/infocenter/ eserver/v1r2/topic/diricinfo_5.20/fqm0_r_dircli_managed_object_commands.html. Important: v Storage systems are supported only by the current system commands. They are not supported by the dircli commands listed in the following table. v You must enter the dircli commands in lower case. v To use a dircli command with the same name as an smcli command, you must define the CLILEGACY environment variable and set it to a value of 1.
Table 1. Supported dircli commands dircli command accessmo Description and supported syntax Requests access to secured systems Syntax: accessmo [-t system_type] [-u user] [-p password] {-a | -f file_name | -w query | -i ip_address_list | -N group_list | [-n] system_list} chmo Changes attributes for systems Syntax: chmo {[-a | -f file_name | -w query | -N group_list | [-n] system_list] | key=} chsys Equivalent smcli command accesssys

16

IBM Systems Director Commands Reference

Table 1. Supported dircli commands (continued) dircli command lsmo Description and supported syntax Lists system attribute information Syntax: lsmo [-t system_type] [-d symbol] [-o | -p] [-T] [-A attribute_list [-s] | -F | -l] {-f file_name | -w query | -N group_list | [-n] system_list} mkmo Creates a system Syntax: mkmo[-f file_name | key=value[,{key=value}...]] pingmo Performs a presence check on the targeted systems Syntax: pingmo [-t system_type] [-r [-d seconds]] {-a | -f file_name | -w query | -N group_list | [-n] system_list} rmmo Removes systems Syntax: rmmo [-t system_type] {-f file_name | -w query | -N group_list | [-n] system_list} rpower Performs power-management operations on systems Syntax: rpower [-t system_type] {-a | -f file_name | -w query | -N group_list | [-n] system_list} power_operation rpower rmsys pingsys discover Equivalent smcli command lssys

accesssys command
Use the accesssys command to request secured access to systems.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] accesssys options For information about the options listed above that are specific to smcli, enter smcli -?. smcli accesssys [-h | -? | --help] [-L language] smcli accesssys [-L language] [-v] [-t type] [-m | [-u user_name] [-p password]] {-a | -f file_name | -w query | -i ip_address_list | -N group_list | [-n] system_list}

Description
You can run this command on multiple systems at one time. The same user ID and password is used to access all specified systems.

Chapter 1. smcli

17

Tip: This command sets only the user ID and password that IBM Systems Director uses for connectivity. It does not set or change the user ID and password on the system itself.

Operands
This command uses a system list as an operand. The list can optionally be preceded by the -n | --names option.

Flags
-a | --all Targets all systems. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of system names and IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more systems, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS)

18

IBM Systems Director Commands Reference

suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -m | --multiprotocol Employs user-identity associations to grant access to users across multiple security domains. Tips: v Use the IBM Systems Director Web interface to manage users across multiple security domains. v This option cannot be used with the -u | --user or -p | --password options. v If you specify this option, the accesssys command does not prompt for user ID and password. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more systems specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. If the -n option is not specified, then a customized event action that starts a noninteractive task on the system on which the event occurred is created. If the
Chapter 1. smcli

19

-n option is specified, then a customized event action that starts a noninteractive task on a specified system is created. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all systems in one or more specified groups that are identified by name or ID. The list can be a mixture of group names and IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -p | --password password The password for the specified user ID. If you do not specify this option, IBM Systems Director prompts you for the password. Attention: Using this option presents a potential security risk. The password might be recorded in the shell or other operating-system areas.

20

IBM Systems Director Commands Reference

Tips: v The value for password will be used for all systems targeted by the command. v This option cannot be used with the -m | --multiprotocol option. -t | --type system_type Narrows the specified targeted systems to all systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -u | --user user_name Specifies a valid user login name with administrative privileges on the targeted systems. If you do not specify this option, IBM Systems Director prompts you for the user name. Tips: v The value for user_name is used for all systems targeted by the command. v This option cannot be used with the -m | --multiprotocol option. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Chapter 1. smcli

21

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 26: A specified system type is not valid. v 27: A specified attribute is not valid. v 29: The specified locale is not valid or not supported. v 32: A specified system ID is not valid. v 51: A system was not locked. v 65: A request for access is not supported. The system cannot be locked or unlocked. v 66: A system is not available. v 67: A system can not be accessed. v 68: The action was not permitted by the target system. v 69: The request-access operation failed. v 70: An encrypted system was not accessed. v 71: The access request is not finished. v 72: The access request completed successfully with errors.

Examples
1. Request access to a system This example illustrates how to request access to a system named websvr. The command prompts for the user ID and password.
smcli accesssys websvr

2. Request access to a system specifying user ID and password This example illustrates how to request access to a system named websvr using the user ID userA and the password passwordA.
smcli accesssys -u userA -p passwordA websvr

3. Request access to all systems of a specific type This example illustrates how to request access to all systems of type Server.
smcli accesssys -t "Server" -a

chsys command
Use the chsys command to change the attributes of a system.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] chsys options For information about the options listed above that are specific to smcli, enter smcli -?. smcli chsys [-h | -? | --help] [-L language] smcli chsys [-L language] [-v] [-t system_type] {-A attribute_list} {[-a | -f file_name | -w query | -i ip_address_list | -N group_list | [-n] system_list]}

22

IBM Systems Director Commands Reference

Description
This command changes the attributes of the targeted systems. You can change attribute values by specifying attribute and value pairs in the form attribute_key=value.

Operands
This command uses a list of systems as an operand. The list can optionally be preceded by the -n | --names option.

Flags
-A | --attribute key[,key ... ] Changes values for one or more specified system attributes, where key is the attribute key and value is the attribute value. The key-value pairs are separated by a comma. Tips: v The attributes and attribute values are not locale specific. v If value is a string that contains spaces or other special characters, enclose the string in quotation marks. v Use the lssys -l command to list the current attribute values. You can specify any of the following attribute keys:
Key Data type Description System name Ping interval, in milliseconds. Description of the system

DisplayName string Ping Description integer string

-a | --all Targets all systems. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of system names and IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples.

Chapter 1. smcli

23

Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more systems, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed.

24

IBM Systems Director Commands Reference

v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more systems specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. If the -n option is not specified, then a customized event action that starts a noninteractive task on the system on which the event occurred is created. If the -n option is specified, then a customized event action that starts a noninteractive task on a specified system is created. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all systems in one or more specified groups that are identified by name or ID. The list can be a mixture of group names and IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names.
Chapter 1. smcli

25

v The group names are not locale specific. -t | --type system_type Narrows the specified targeted systems to all systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table lists the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 26: A specified system type is not valid. v 27: A specified attribute is not valid. v 29: The specified locale is not valid or not supported. v 60: The attribute is not supported. v 61: The attribute is read-only. v 62: No attribute was specified.

26

IBM Systems Director Commands Reference

v 63: The system cannot be renamed.

Examples
1. Change the name This example illustrates how to target a single system named websvr and change its name to SMTPsvr.
smcli chsys -n websvr -A DisplayName=SMTPsvr

2. Increase the ping interval This example illustrates how to increase the ping interval to 30 minutes (1 800 000 ms) on all systems with a current ping interval of 15 minutes (9 000 000 ms).
smcli chsys -w Ping=900000 -A Ping=1800000

3. Changes the ping interval for systems listed in a file This example illustrates how to target all systems listed in the /tmp/modef file and changes the ping interval to 30 minutes.
smcli chsys -f /tmp/modef -A Ping=1800000

lssys command
Use the lssys command to retrieve system attribute information.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lssys options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lssys [-h | -? | --help] [-L language] smcli lssys [-L language] [-v] [-I] smcli lssys [-L language] [-v] [-t system_type] [-d symbol] [-o | -p] [-T] [-A attribute_list [-s] | -F | -l [-e]] {-f file_name | -w query | -i ip_address_list | -N group_list | [-n] system_list}

Description
If you do not specify any targeting options, this command lists all systems. If you do not specify any display options, this command lists only system names. Note that system names might not be unique. Important: The -i | --listtype option used in IBM Systems Director v5.20 to list all available types of systems has been replaced with to -I | --listtype in this release. The -i | --listtype option is now used to target systems by IP address or host name. Tip: Use the lsvrtsys command to list information about virtual systems, including platform managers, virtual servers, and hosts.

Operands
This command uses a list of systems as an operand. The list can optionally be preceded by the -n | --names option.
Chapter 1. smcli

27

Flags
-A | --attribute key[,key ... ] Displays values for one or more specified attributes, where key is the attribute key. Tips: v Separate the keys with commas. v The attributes and attribute values are not locale specific. v You can use the lssys -l command to list all attributes associated with the targeted systems. -d | --delimiter symbol Specifies the character or set of characters that separates output data, where symbol is a string of one or more characters. Tip: If the delimiter contains spaces, enclose it in quotation marks. The behavior of this option depends on the use of other options in the command, as shown below. v If you specify this option without the -A | --attribute option, this command separates data fields in a record by a comma followed by a space. Data records are separated by the specified delimiter symbol. v If you specify this option with the -A | --attribute option, this command separates data fields in a record by the specified delimiter symbol. Data records are separated by a line break. v If you specify this option with the -F | --format or -l | --long option, the delimiter option is ignored. -e | --expand Expands the long listing to also display a description of the attribute keys. Note: If you specify this option, you must also specify the -l | --long option. The information is displayed in this format:
key1 (key_string) : value1 key2 (key_string) : value2 ...

-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of system names and IDs, separated by commas or line breaks. -F | --format Displays the output in a format that can be saved as a system definition file or used as input for the mkmo -f command. Although the actual attributes displayed varies with different system types, the format might resemble the following lines:

28

IBM Systems Director Commands Reference

type = value ip = value name = value network = value

Tip: v If you specify either the --oid or --pipe options, they are ignored. v You can use this option to save the definition of one or more systems, so that they can be restored at a later time. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more systems, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -I | --listtype Lists all system types. All additional options are ignored.

Chapter 1. smcli

29

-l | --long Displays all attributes for the targeted systems. This option lists values for each system in this format:
system_name attribute_key: value attribute_key: value ...

Tips: v The attributes and attribute values are in English only. They are not locale specific. v Using this option does not display hidden properties, such as ImageSet. To display hidden attributes, use the lssys -A key command (for example, lssys -A ImageSet). -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more systems specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. If the -n option is not specified, then a customized event action that starts a noninteractive task on the system on which the event occurred is created. If the -n option is specified, then a customized event action that starts a noninteractive task on a specified system is created. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs.

30

IBM Systems Director Commands Reference

system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all systems in one or more specified groups that are identified by name or ID. The list can be a mixture of group names and IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -o | --oid Displays the unique IDs associated with the targeted systems in addition to other information. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x3e). Tips: v This option cannot be used with the -p | --pipe option. v You can combine this option with the -l | --long and -A | --attribute options. -p | --pipe Displays only the unique IDs for the targeted systems instead of the name. Tips:
Chapter 1. smcli

31

v IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x37). v When used alone, this option enables the output to be piped to other smcli commands. v This option cannot be used with the -o | --oid options. v You can combine this option with the -l | --long and -A | --attribute options. -s | --sort Sorts the output by the first specified attribute. Tip: If you specify this option, you must also specify the -A | --attribute option. Otherwise, this option is ignored. -t | --type system_type Narrows the specified targeted systems to all systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -T | --showtype Lists the system type after the system name. By default, the system name and type are separated by a comma followed by a space. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

32

IBM Systems Director Commands Reference

Exit status
The following table lists the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 26: A specified system type is not valid. v 27: A specified attribute is not valid. v 29: The specified locale is not valid or not supported.

Examples
1. List the names and IDs of all systems This example illustrates how to list the names and IDs of all systems.
smcli lssys -o aixServer, 0x291 webServer, 0x292 mailServer, 0x295

2. List all attributes for multiple systems This example illustrates how to list the attributes for systems with IP addresses 9.182.149.105 and 9.182.149.115, and host name myusmibox.raleigh.ibm.com.
smcli lssys -l -i 9.182.149.105, 9.182.149.115, myusmibox.raleigh.ibm.com

3. List systems with specific attributes This example illustrates how to list all systems that do not have a license for IBM Systems Director.
smcli lssys -w "HasLicense=False"

This example illustrates how to list all systems that are based on POWER or IA32 architecture.
smcli lssys -w "Architecture=POWER OR Architecture=IA32"

This example illustrates how to list all systems that have Windows NT or Windows 2000 installed.
smcli lssys -w "OSType=Windows NT OR OSType=Windows 2000"

4. Sort systems by a specific attribute This example illustrates how to list the display name and resource-type attributes for all systems, and sorted by display name.
smcli lssys -sA DisplayName,ResourceType aixServer, Server mailServer, Server webServer, Server

pingsys command
Use the pingsys command to perform a presence check (ping) on the targeted systems. When the presence check is completed, the results are reflected in the OperatingState and CommunicationState attributes. This command performs an IBM Systems Director presence check and not an Internet Control Message Protocol (ICMP) ping.

Chapter 1. smcli

33

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] pingsys options For information about the options listed above that are specific to smcli, enter smcli -?. smcli pingsys [-h | -? | --help] [-L language] smcli pingsys [-L language] [-v] [-l level] [-t system_type][-r [-W seconds] ] {-a | -f file_name | -w query | -i ip_address_list | -N group_list | [-n] system_list}

Description
This command immediately initiates a presence check (ping) on the targeted systems. When the ping is completed, the results are reflected in the system state attribute (state). The results are not displayed on the command line.

Operands
This command uses a list of systems as an operand. The list can optionally be preceded by the -n | --names option.

Flags
-a | --all Targets all systems. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of system names and IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more systems, specified by IP address or host name.

34

IBM Systems Director Commands Reference

The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -l | --level level Queries data at the specified ping level. Valid values are 1, 2 or 3. If you do not specify this option, level 1 is the default value. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more systems specified by name or ID.
Chapter 1. smcli

35

The list can be a mixture of system names and IDs, separated by a comma. If the -n option is not specified, then a customized event action that starts a noninteractive task on the system on which the event occurred is created. If the -n option is specified, then a customized event action that starts a noninteractive task on a specified system is created. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all systems in one or more specified groups that are identified by name or ID. The list can be a mixture of group names and IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -r | --return Returns the value of the communication state attribute (CommunicationState)

36

IBM Systems Director Commands Reference

for all target systems after a ten-second delay. To change the time IBM Systems Director waits before returning the CommunicationState value, use the -W | --wait option. -t | --type system_type Narrows the specified targeted systems to all systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes. -W | --wait seconds Displays the results of the command after waiting the specified number of seconds, regardless of whether or not the task has been completed. Tip: If you specify this option, you must also specify the -r | --return option. Possible values for seconds are: v -1: Waits indefinitely for the task to finish before exiting and displaying the results. This value is the default if this option is not specified. v 0: Exits immediately, and the task continues to run in the background. Use the lsjob or lsjobhistory command to check the status.

Chapter 1. smcli

37

v 1 or greater: Exits after the specified number of seconds. If the task is completed before the specified wait period, this command displays the results. If the task is not completed before the specified wait period, the command exits and the task continues to run in the background. Use the lsjob or lsjobhistory command to check the status.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 26: A specified system type is not valid. v 27: A specified attribute is not valid. v 29: The specified locale is not valid or not supported.

Examples
1. Ping a system This example illustrates how to ping the system named websvr.
smcli pingsys websvr

2. Ping multiple systems using a data file This example illustrates how to ping the systems listed in the /tmp/systems.txt file.
smcli pingsys -f /tmp/systems.txt

rmsys command
Use the rmsys command to remove systems and all associated data.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] rmsys options For information about the options listed above that are specific to smcli, enter smcli -?. smcli rmsys [-h | -? | --help] [-L language] smcli rmsys [-L language] [-v] [-t system_type] {-f file_name | -w query | -i ip_address_list | -N group_list | [-n] system_list}

Description
None

Operands
This command uses a list of systems as an operand. The list can optionally be preceded by the -n | --names option.

38

IBM Systems Director Commands Reference

Flags
-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of system names and IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more systems, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely.
Chapter 1. smcli

39

-L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more systems specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. If the -n option is not specified, then a customized event action that starts a noninteractive task on the system on which the event occurred is created. If the -n option is specified, then a customized event action that starts a noninteractive task on a specified system is created. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific.

40

IBM Systems Director Commands Reference

-N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all systems in one or more specified groups that are identified by name or ID. The list can be a mixture of group names and IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -t | --type system_type Narrows the specified targeted systems to all systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified.

Chapter 1. smcli

41

Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 26: A specified system type is not valid. v 27: A specified attribute is not valid. v 29: The specified locale is not valid or not supported. v 50: The specified system cannot be removed. v 51: The operation failed.

Examples
1. Remove multiple systems This example illustrates how to remove systems named websvr and with ID 0x9A5.
smcli rmsys -n websvr,0x9A5

2. Remove systems using a data file This example illustrates how to remove the systems that are specified in the /tmp/systems.txt file.
smcli rmsys -f /tmp/systems.txt

rpower command
Use the rpower command to perform power-management operations on remote systems.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] rpower options For information about the options listed above that are specific to smcli, enter smcli -?. rpower [-h | -? | --help] [-L language] rpower [-L language] [-v] [-t system_type] {-a | -f file_name | -w query | -i ip_address_list | -N group_list | [-n] system_list} power_operation

Description
Important: The syntax or output for this command has changed since IBM Director v5.20. You can use the IBM Director v5.20 command syntax and output by

42

IBM Systems Director Commands Reference

setting the CLILEGACY environment variable to 1. For more information about the v5.20 commands, see the commands reference in the IBM Director v5.20 information center at publib.boulder.ibm.com/infocenter/eserver/v1r2/topic/ diricinfo_5.20/fqm0_r_dircli_managed_object_group_commands.html. The command returns the names and IDs for the targeted systems, the power operation performed, and the results of the operation.

Operands
This command takes a power operation as an operand. This operand is a string that specifies the power-management operation to be performed. Possible values for power_operation are: v PowerOffNow: Powers off the system immediately v PowerOn: Powers on the system gracefully v PowerOnHold: Powers on the system but does not continue with boot operations v PowerOnRelease: Resumes boot operations after a PowerOnHold operation v Restart: Restarts the operating system after a Suspend operation v RestartNow: Forces a restart of the operating system v Resume: Resumes operating system activity for a suspended system v ShutDown: Shuts down the operating system v ShutDownAndPowerOff: Shuts down the operating system and then powers off the system v Support: Lists the power operations supported for the targeted systems v Suspend: Suspends the operating system Tips: v The power-option values are not case sensitive. v Not all operations are supported on all systems. v Systems must be unlocked.

Flags
-a | --all Targets all systems. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of system names and IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples.

Chapter 1. smcli

43

Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more systems, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed.

44

IBM Systems Director Commands Reference

v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more systems specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. If the -n option is not specified, then a customized event action that starts a noninteractive task on the system on which the event occurred is created. If the -n option is specified, then a customized event action that starts a noninteractive task on a specified system is created. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all systems in one or more specified groups that are identified by name or ID. The list can be a mixture of group names and IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names.
Chapter 1. smcli

45

v The group names are not locale specific. -t | --type system_type Narrows the specified targeted systems to all systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 26: A specified system type is not valid. v 29: The specified locale is not valid or not supported. v 50: A specified power-management operation is not valid. v 51: The power-management operation failed. v 52: One or more managed systems were locked.

46

IBM Systems Director Commands Reference

Examples
1. List power operations supported on a system This example illustrates how to list all power operations that are supported on the system named system1.:
smcli rpower -n system1 support

2. Restart a group of systems This example illustrates how to restart all the systems in the group named bladecenter1.
smcli rpower -N bladecenter1 restart

Web interface commands


Use the commands in this section to manage the IBM Systems Director Web interface and its users.

smcli commands
The following IBM Systems Director Web interface smcli commands are available: endSession Use the endSession command to end the IBM Systems Director Web interface session for the selected user.

endSession command
Use the endSession command to end the IBM Systems Director Web interface session for the selected user.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] endSession options For information about the options listed above that are specific to smcli, enter smcli -?. smcli endSession [-h | -? | --help] [-L language] smcli endSession [-v] {-f file_name | [-u] user_list}

Description
The endSession command ends the IBM Systems Director Web interface session for the selected user. After the session has been terminated, the user must log back in. Note: Tasks started during the terminated session will continue to run.

Operands
This command takes a user name as a required operand. The list can optionally be preceded by the -u | --users option.

Flags
-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command.
Chapter 1. smcli

47

To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of user names, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -u | --user user_list Specifies, by name or ID, one or more valid IBM Systems Director users. Note: Use the smcli lsuser command to see a full list of authorized IBM Systems Director users. -v | --verbose Writes verbose messages to standard output.

48

IBM Systems Director Commands Reference

If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 50: A specified user is not valid. v 70: A specified user is not active.

Examples
1. Log off a user This example illustrates how to end the IBM Systems Director Web interface session for user UserA.
smcli endSession -u UserA

Group commands
Use the commands in this section to work with IBM Systems Director system groups.

smcli commands
These smcli group commands are available: chgp Use the chgp command to modify groups, including changing membership, modifying attributes, and processing change-specification files. Use the lsgp command to list the groups that are currently defined in IBM Systems Director.

lsgp

mkgp Use the mkgp command to create static and dynamic groups. rmgp Use the rmgp command to delete one or more system groups.

dircli commands
Using the new smcli group commands is recommended; however, the dircli group commands listed in the following table are supported in this release for compatibility with IBM Director version 5.20. For information about the dircli commands, see the commands reference in the IBM Director v5.20 information center at publib.boulder.ibm.com/infocenter/ eserver/v1r2/topic/diricinfo_5.20/ fqm0_r_dircli_managed_object_group_commands.html. Important: v The dircli commands must be entered in lower case. v To use a dircli command with the same name as an smcli command, you must define the CLILEGACY environment variable and set it to a value of 1.

Chapter 1. smcli

49

Table 2. Supported dircli commands dircli command chgp Description and supported syntax Changes group attributes Syntax: chgp {-e member_list group | -r member_list group | -m new_group_name group | -f file_name} lsgp Lists group attributes information Syntax: lsgp [-d delimiter] [-o | -p] [-A attribute_list [-s] | -F | -l] [-f file_name | -n system_list | [-N] group_list] mkgp Creates a dynamic or static group Syntax: mkgp {-f file_name} mkgp [-T task_list | -D group_criteria | -n system_list | -N group_list]new_group_name rmgp Deletes a group Syntax: mkmo [-f file_name | -N group_list] rmgp mkgp lsgp Equivalent smcli command chgp

chgp command
Use the chgp command to modify groups, including changing membership, modifying attributes, and processing change-specification files.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] chgp options For information about the options listed above that are specific to smcli, enter smcli -?. smcli chgp [-h | -? | --help] [-L language] smcli chgp [-L language] [-v] {-f file_name} smcli chgp [-L language] [-v] {-e extend_list | -r remove_list | -m new_name | -D "new_criteria"} {group_name | group_oid}

Description
Important: The syntax or output for this command has changed since IBM Director v5.20. You can use the IBM Director v5.20 command syntax and output by setting the CLILEGACY environment variable to 1. For more information about the v5.20 commands, see the commands reference in the IBM Director v5.20 information center at publib.boulder.ibm.com/infocenter/eserver/v1r2/topic/ diricinfo_5.20/fqm0_r_dircli_managed_object_group_commands.html.

50

IBM Systems Director Commands Reference

Operands
This command uses a group name or ID as an operand. This operand is required if you do not specify a group-definition file using the -f | --file option. The group name (group_name) or ID (group_oid) identifies the group being modified. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific.

Flags
-D | --dynamic "group_criteria" Changes the criteria of a dynamic group to the specified criteria. The group_criteria statement uses the form of one or more inventory-value comparison statements joined by Boolean operators. Use parentheses to specify the order of comparison operations and to combine logical operations. You can specify these comparison operators: v = v == v != v > v < v >= v <= You can specify these Boolean operators: AND to indicate that all group criteria are met OR to indicate that any of the group criteria are met Tip: Use the lsinv command with no options to list the inventory values that can be used for comparison. -e | --extend {group_member}[,{group_member}... ] Adds one or more resources (including systems, groups, updates, or tasks) as members of the group. The group members can be specified by name, ID, or ID string. This list can be a mixture of names, IDs, and ID strings, separated by a comma. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123).

Chapter 1. smcli

51

Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. task_oid The unique ID of the task, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lstask -o -r command to list all task IDs that are valid for the targeted system. task_id_string The unique ID string of the task, prefixed with a percent sign (%) (for example, %BladeServerCfgTask). If the string ID contains a comma, prefix the comma with a backslash (\). Tip: You can use the lstask -I command to list all task ID strings that are valid for the targeted system. task_title The title of the task. The task title must be fully qualified with the parent task (for example, grandparent_task_title/parent_task_title/task_title). If the task name contains a comma, prefix the comma with a backslash (\). Enclose the task title in quotation marks if it contains a space character. Tips: v Task names might not be unique. This command acts on all tasks with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple tasks with the same name. To

52

IBM Systems Director Commands Reference

target a task that has a name that is not unique, identify the task by specifying its unique, hexadecimal task ID, or use additional target options to refine the selection. v Locale-specific task names might not exist for every noninteractive task. The name specified must match the locale being used by the command line interface. v Use the lstask -r command to list all tasks that are valid for the targeted system. update_oid Specifies the unique ID of an update, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: Use the lsupd -o command to list all update IDs. update_fix_id Specifies the unique fix ID of an update (for example, SF99001G-47). Tip: Use lsupd -A DisplayName,UpdateId to list the current fix IDs. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of groups to modify. There can be one group definition per line. Each group definition in the input file must be separated by a line break. The group definition must use one of these formats, depending on the type of group being created:
{group_name|group_oid}:criteria:"group_criteria" {group_name|group_oid}:extend:{member_oid|member_name}[,{member_oid|member_name}...] {group_name|group_oid}:remove:{member_oid|member_name}[,{member_oid|member_name}...] {group_name|group_oid}:move:new_name

For a description of the arguments, see the -D | --dynamic, -e | --extend, -m | --move, and -r | --remove options. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command.
Chapter 1. smcli

53

The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -m | --move new_group_name {group_oid | group_name} Renames the group specified by group_oid or group_name to a new name specified by new_group_name. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -r | --remove {group_member}[,group_member}...] Removes one or more resources (including systems, groups, updates or tasks), specified by name, ID, or ID string, from the group. For a description of the arguments, see the -e | --extend option. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully.

54

IBM Systems Director Commands Reference

v 1: A usage error occurred. v 23: A specified resource (for example, a system, group, update or task) is not valid. v 25: A number-formatting error occurred. v 27: A specified attribute is not valid. v 29: The specified locale is not valid or not supported. v 50: A specified group is read-only. v 52: The inventory criteria for the dynamic group were not valid.

Examples
1. Remove a system from a group This example illustrates how to remove a single system named WebServer1 from the static group named WebSystems.
smcli chgp -r WebServer1 WebSystems

2. Rename a group This example illustrates how to rename RemoteGroup to RemoteTaskGroup.


smcli chgp -m RemoteTaskGroup RemoteGroup

3. Change criteria of a dynamic group This example illustrates how to set the criteria for group dynamicgroup1 to all servers that have a license.
smcli chgp -D "Server.HasLicense == true" dynamicgroup1

4. Use an input file to modify several groups This example illustrates how to modify four groups using the data contained in the file c:\temp\modify_groups.txt.
smcli chgp -f c:\temp\modify_groups.txt

The modify_groups.txt file contains the following text:


group1:extend:system_1,system_2 0x300A:extend:group_1,group_2 group2:remove:system_1,system_5 group3:criteria:"Server.HasLicense == false" OldName:move:NewName

5. Add tasks and groups to an existing group This example illustrates how to add a task named RemoteControl and group named ServerGroup to the static group named RemoteGroup.
smcli chgp -e "RemoteControl","ServerGroup" RemoteGroup

lsgp command
Use the lsgp command to list the groups that are currently defined in IBM Systems Director.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsgp options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsgp [-h | -? | --help] [-L language] smcli lsgp [-L language] [-v] [-d delimiter] [-o | -p] [-A attribute_list [-s] | -F | -l] [-m member_type] [-f file_name | -i ip_address_list | -n system_list | [-N] group_list]

Chapter 1. smcli

55

Description
Important: The syntax or output for this command has changed since IBM Director v5.20. You can use the IBM Director v5.20 command syntax and output by setting the CLILEGACY environment variable to 1. For more information about the v5.20 commands, see the commands reference in the IBM Director v5.20 information center at publib.boulder.ibm.com/infocenter/eserver/v1r2/topic/ diricinfo_5.20/fqm0_r_dircli_managed_object_group_commands.html. If no groups are specified using the command line option or operand, then the lsgp command lists all defined groups. If no display options are specified, then only the group name is displayed. Note: The group attribute description and value strings are available only in English. They are not locale specific.

Operands
This command uses a list of groups as an operand. The list can optionally be preceded by the -N | --groups option.

Flags
-A | --attribute key[,key ... ] Displays values for one or more specified attributes, where key is the attribute key. Tips: v Separate the keys with commas. v The attributes and attribute values are not locale specific. v You can use the lssys -l command to list all attributes associated with the targeted groups. You can specify any of the following keys.
Key DisplayName Description ObjectType ReadOnly Data type string string string boolean Description Name of the group. Descriptive information about the group. Type of resource. For example, the value is Group for group resources. Flag identifying whether the group is read-only. Valid values are true (read-only) or false (can be edited). Flag identifying whether the group is hidden from the user. Valid values are true (not visible to the user) or false (visible to the user). Flag identifying whether the group is temporary. Valid values are true (temporary) or false (persistent). Flag identifying whether the group is a dynamic group (based on a criteria). Valid values are true (dynamic group) or false (static group). Flag identifying whether the group is a root group. Valid values are true (root group) or false (not a root group).

Hidden

boolean

Temporary

boolean

Dynamic

boolean

Root

boolean

56

IBM Systems Director Commands Reference

Key ParentCount GroupMembers Definition

Data type integer string string

Description Number of parents that the specified group has. Members of the group. For dynamic groups, this value is a list of criteria for the targeted group. For static groups, this value is a list of all systems that belong to the group, which is the same as the GroupMembers attribute.

-d | --delimiter symbol Specifies the character or set of characters that separates output data, where symbol is a string of one or more characters. Tip: If the delimiter contains spaces, enclose it in quotation marks. The behavior of this option depends on the use of other options in the command, as shown below. v If you specify this option without the -A | --attribute option, this command separates data fields in a record by a comma followed by a space. Data records are separated by the specified delimiter symbol. v If you specify this option with the -A | --attribute option, this command separates data fields in a record by the specified delimiter symbol. Data records are separated by a line break. v If you specify this option with the -F | --format or -l | --long option, the delimiter option is ignored. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of groups to be listed. Specify the groups using either group names or group IDs, separated by commas or line breaks. -F | --format Displays the output in a format suitable for redirecting into a group-definition file, which can be used as input to the mkgp -f command. You can use this option to save the definition of one or more groups so they can be restored at a later time. The file format is
name:type:definition

Where: name type The group name. The type of group. Valid values are dynamic or static.

definition For static groups, this value is a list of all systems that belong to the group. For dynamic groups, this value is criteria for the targeted group.

Chapter 1. smcli

57

-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more groups that contain the specified systems, identified by IP address or host name. This list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -l | --long Displays detailed information about the listed groups, including all of the group attributes. For a list and description of these attributes, see the -A | --attribute option. Tips: v The attributes and attribute values are only in English. They are not locale specific. v Using this option does not display hidden properties. To display hidden attributes, use the lsgp -A command.

58

IBM Systems Director Commands Reference

-L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -m | --membertype member_type Filters the groups based on the specified member type. Tip: Use the lsgp -l command to list all member types in the existing groups. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more groups that contain the specified systems, identified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific.

Chapter 1. smcli

59

-N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets one or more specified groups, identified name or ID. The list can be a mixture of group names and IDs, separated by a comma. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. Tip: To display the group unique ID, use the lsgp -o command. -o | --oid Displays the unique IDs associated with the targeted groups in addition to other information. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x3e). Tips: Tips: v This option cannot be used with the -p | --pipe option. v You can combine this option with the -l | --long and -A | --attribute options. -p | --pipe Displays only the unique IDs for the targeted groups instead of the name. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x37). Tips: v When used alone, this option enables the output to be piped to other smcli commands. v This option cannot be used with the -o | --oid options. v You can combine this option with the -l | --long and -A | --attribute options. -s | --sort Sorts the output by the first specified attribute. Tip: If you specify this option, you must also specify the -A | --attribute option. Otherwise, this option is ignored. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

60

IBM Systems Director Commands Reference

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported.

Examples
1. List the names of all groups This example illustrates how to list the names of all IBM Systems Director groups.
smcli lsgp All Groups All systems Chassis and Chassis Members Clusters and Cluster Members Group Categories Hardware Status Critical Hardware Status Information Hardware Status Warning IBM Director Systems Platforms and Platform Members Racks with Members Scalable Systems and Members Systems with Windows XP

2. List the names and IDs of all groups This example illustrates how to list the names and IDs of all system groups defined in IBM Systems Director.
smcli lsgp -o

3. List the attributes for groups specified by name This example illustrates how to list the all attributes for the Racks with Members and MyRackGroup groups.
smcli lsgp -l -N "Racks with Members",MyRackGroup

4. List the attributes for groups specified in a file This example illustrates how to list the all attributes of system groups in the /tmp/groups file.
smcli lsgp -lf /tmp/groups

5. List the groups to which a system belongs This example illustrates how to list the groups to which the system mySystem belongs.
smcli lsgp -n mySystem

6. List the groups that contain systems with specific IP addresses This example illustrates how to list the union of groups that contain system with IP address 9.182.149.115 and 9.182.149.134.
smcli lsgp -i 9.182.149.115, 9.182.149.134

7. List members of a group This example illustrates how to lists the members of group MyRackGroup.
smcli lsgp -N MyRackGroup -A GroupMembers

Chapter 1. smcli

61

mkgp command
Use the mkgp command to create static and dynamic groups.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] mkgp options For information about the options listed above that are specific to smcli, enter smcli -?. smcli mkgp [-h | -? | --help] [-L language] smcli mkgp [-L language] [-v] [-m member_type] [-d description] {-f file_name | {-s member_list | -D "criteria" {-r resource_type}} new_group_name

Description
Important: The syntax or output for this command has changed since IBM Director v5.20. You can use the IBM Director v5.20 command syntax and output by setting the CLILEGACY environment variable to 1. For more information about the v5.20 commands, see the commands reference in the IBM Director v5.20 information center at publib.boulder.ibm.com/infocenter/eserver/v1r2/topic/ diricinfo_5.20/fqm0_r_dircli_managed_object_group_commands.html. Static groups are comprised of a specific set of resources, such as systems, other groups, tasks, and updates. Dynamic groups are comprised of resources that match specific criteria. Resources can be members of one or more groups. By default, you can delete and rename groups that are created using mkgp command. The IsDeleteable and IsRenameable group attributes are set to true. After the group is created, you cannot change these attributes. These options are supported only for compatibility with IBM Director 5.20 and earlier. Using these option is not recommended. v -n | --names system_list v -N | --groups group_list v -T | --tasks task_list

Operands
This command uses a new group name as an operand. The new_group_name specifies the name of the group being created. This operand is required if you do not specify a group-definition file using the -f | --file option. Tips: v Group names must be unique. v Group names are not locale specific.

Flags
-d | --description "description" Specifies descriptive text for the group that is created. If the description contains spaces, enclose the description in quotation marks.

62

IBM Systems Director Commands Reference

-D | --dynamic "group_criteria" Creates a dynamic group that is comprised of systems, groups or tasks that match the specified criteria. The group_criteria statement uses the form of one or more inventory-value comparison statements joined by Boolean operators. Use parentheses to specify the order of comparison operations and to combine logical operations. You can specify these comparison operators: v = v == v != v > v < v >= v <= You can specify these Boolean operators: AND to indicate that all group criteria are met OR to indicate that any of the group criteria are met Tips: v Use the lsinv command with no options to list the inventory values that can be used for comparison. v If you specify this option, you must also specify the -r | --resourcetype option. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of group members or criteria. There can be one group definition per line. Each group definition in the input file must be separated by a line break. The group definition must use one of these formats, depending on the type of group being created:
new_group_name:static:{system_oid|system_name}[,{system_oid|system_name}...]:member_type new_group_name:dynamic:"group_criteria":member_type:resource_type

where the operands are as follows: member_type The type of members in the group. This operand is optional for both static and dynamic group types. resource_type The type of resource for the criteria that is used to create a dynamic group. This operand should be used only with option -D. Tips: v For a description of the operands, see the -D | --dynamic and -s | --static options. v For static groups, specifying the member type is optional.

Chapter 1. smcli

63

v For dynamic groups, specifying the member type is optional. Specifying the resource type is required. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -m | --membertype member_type Filters the groups based on the specified member type. Tip: Use the lsgp -l command to list all member types in the existing groups. -r | --resourcetype resource_type Specifies the type of resource to use for the criteria for creating dynamic groups. Tip: You must specify this option when you create dynamic groups using the -D | --dynamic option.

64

IBM Systems Director Commands Reference

You can specify one of these resource types: v System v ComputerSystem v OperatingSystem v Group v SoftwareModule v SoftwarePatch -s | --static {group_member}[,{group_member}...] Creates a static group comprised of one or more resources (such as systems, groups, tasks, or updates). This list can be a mixture of names or ID separated by a comma. The group_member can be any of these names and IDs: system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. task_oid The unique ID of the task, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lstask -o -r command to list all task IDs that are valid for the targeted system.
Chapter 1. smcli

65

task_id_string The unique ID string of the task, prefixed with a percent sign (%) (for example, %BladeServerCfgTask). If the string ID contains a comma, prefix the comma with a backslash (\). Tip: You can use the lstask -I command to list all task ID strings that are valid for the targeted system. task_title The title of the task. The task title must be fully qualified with the parent task (for example, grandparent_task_title/parent_task_title/task_title). If the task name contains a comma, prefix the comma with a backslash (\). Enclose the task title in quotation marks if it contains a space character. Tips: v Task names might not be unique. This command acts on all tasks with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple tasks with the same name. To target a task that has a name that is not unique, identify the task by specifying its unique, hexadecimal task ID, or use additional target options to refine the selection. v Locale-specific task names might not exist for every noninteractive task. The name specified must match the locale being used by the command line interface. v Use the lstask -r command to list all tasks that are valid for the targeted system. update_oid Specifies the unique ID of an update, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: Use the lsupd -o command to list all update IDs. update_fix_id Specifies the unique fix ID of an update (for example, SF99001G-47). Tip: Use lsupd -A DisplayName,UpdateId to list the current fix IDs. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 23: A specified resource (for example, a system, group, update or task) is not valid. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 50: The format of the specified group-definition is not valid. v 51: No valid group definitions were specified. v 52: The inventory criteria for the dynamic group were not valid.

66

IBM Systems Director Commands Reference

Examples
1. Create a static group of systems specified by ID This example illustrates how to create a static group (NewGroup) that contains two systems.
smcli mkgp -s node1,node2 NewGroup

2. Create a static group of tasks specified by name This example illustrates how to create a static group named CIM that supports the CIM Browser task.
smcli mkgp -s "CIM Browser" CIM

3. Create an dynamic group of updates This example illustrates how to create a dynamic update group, named updategrp, of all critical updates on systems.
smcli mkgp -D "SoftwarePatch.Severity=0" -r System updategrp

4. Create multiple groups using a file for input This example illustrates how to use data in the c:\temp\MyNewGroup.txt file to create two groups, one static and one dynamic.
smcli mkgp -f c:\temp\MyNewGroup.txt

The c:\temp\MyNewGroup.txt file contains the following definitions:


group1:static: me_1,me_2,me_3 group2:dynamic:" Server.HasLicense ==true OR System.Name ==mysystem"::System

5. Create a dynamic group This example illustrates how to create a dynamic group using a criteria list.
smcli mkgp -D "(HasLicense==true) OR (Name==mypc)" -r System dynamicgp1

rmgp command
Use the rmgp command to delete one or more system groups. Note: You cannot delete groups that have been predefined by IBM Systems Director. These predefined groups have the IsDeleteable attribute set to false. You can use the lsgp -A IsDeleteable command to list the predefined groups.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] rmgp options For information about the options listed above that are specific to smcli, enter smcli -?. smcli rmgp [-h | -? | --help] [-L language] smcli rmgp [-L language] [-v] {-f file_name | [-N] group_list}

Description
Important: The syntax or output for this command has changed since IBM Director v5.20. You can use the IBM Director v5.20 command syntax and output by setting the CLILEGACY environment variable to 1. For more information about the v5.20 commands, see the commands reference in the IBM Director v5.20 information center at publib.boulder.ibm.com/infocenter/eserver/v1r2/topic/ diricinfo_5.20/fqm0_r_dircli_managed_object_group_commands.html.

Chapter 1. smcli

67

Operands
This command uses a list of groups as an operand. The list can optionally be preceded by the -N | --groups option.

Flags
-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of groups to be deleted. This list can be a mixture of group names and IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country

68

IBM Systems Director Commands Reference

code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets one or more specified groups, identified name or ID. The list can be a mixture of group names and IDs, separated by a comma. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. Tip: To display the group unique ID, use the lsgp -o command. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 52: A group cannot be deleted.

Examples
1. Delete multiple groups using the group name This example illustrates how to delete the two groups named ID systems and Test systems.
smcli rmgp "ID systems","Test systems"

2. Delete a group using a definition file This example illustrates how to use the data in the c:\temp\MyOldGroup.txt file to delete several groups.
smcli rmgp -f c:\temp\MyOldGroup.txt

The c:\temp\MyOldGroup.txt file contains the following names.


"ID systems","Test systems"

Chapter 1. smcli

69

Discovery and inventory commands


Use the commands in this section to discover systems and collect inventory with the command-line interface (CLI). The following function is not available through the CLI. Use the IBM Systems Director Web interface instead. v Create, modify, delete, list, import, or export discovery profiles v Create, modify, delete, list, import, or export custom queries v Create, modify, delete, list, import, or export inventory monitors v Activate or deactivate inventory monitors v List, add or remove entries from the inventory resource dictionary

smcli commands
The following smcli discovery commands are available: discover Use the discover command to discover resources on networks that are connected to the management server. collectinv Use the collectinv command to collect data about hardware and software resources that are currently installed on specified systems and to update the database. lsinv Use the lsinv command to list inventory data for systems or groups.

dircli commands
Using the new smcli discovery and inventory commands is recommended; however, the dircli discovery and inventory commands listed in the following table are supported in this release for compatibility with IBM Director version 5.20. Note that not all command options are supported in this release. For information about the dircli commands, see the commands reference in the IBM Director v5.20 information center at publib.boulder.ibm.com/infocenter/ eserver/v1r2/topic/diricinfo_5.20/fqm0_r_dircli_managed_object_commands.html. Important: v You must enter the dircli commands in lower case. v To use a dircli command with the same name as an smcli command, you must define the CLILEGACY environment variable and set it to a value of 1.
Table 3. Supported dircli commands dircli command discover Description and supported syntax Discovers systems Syntax: discover -t system_type Equivalent smcli command discover

70

IBM Systems Director Commands Reference

Table 3. Supported dircli commands (continued) dircli command lsinv Description and supported syntax Lists the inventory of a system Syntax: lsinv [-l] [-e table[.column]] lsinv {-V} [-e table[.column]] [-d delimiter] [-t system_type] [-w query | -f file_name | -N group_list | [-n] system_list] Equivalent smcli command lsinv

discover command
Use the discover command to discover resources on networks that are connected to the management server.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] discover options For information about the options listed above that are specific to smcli, enter smcli -?. smcli discover [-h | -? | --help] [-L language] smcli discover [-L language] [-v] [-W seconds] [{{-i ip_address_list | -H hostname_list} [-t resource_type] | -p { all | profile_list}}]

Description
Important: The syntax or output for this command has changed since IBM Director v5.20. You can use the IBM Director v5.20 command syntax and output by setting the CLILEGACY environment variable to 1. For more information about the v5.20 commands, see the commands reference in the IBM Director v5.20 information center at publib.boulder.ibm.com/infocenter/eserver/v1r2/topic/ diricinfo_5.20/fqm0_r_dircli_managed_object_commands.html. The discover command discovers resources on networks that are connected to the management server. The IP address, host name, or profile ID is the necessary operand for discovery. When a resource type is specified, discovery is filtered based on that type. If you do not specify the -i | --ipaddress or -p | --profile option, this command discovers resources using all available profiles.

Operands
This command optionally uses a list of IP addresses or profile IDs as an operand. The list of IP addresses can optionally be preceded by the -i | --ipaddress option.
Chapter 1. smcli

71

Flags
-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. -H | --hostname hostname [, hostname, ...] Discovers one or more systems with the specified host names. The list must contain individual host names separated by a comma. Host names must meet the following requirements: v The characters must consist of only alphanumeric characters, periods (.), and dashes (-). v The first character must be an alphanumeric character. v The last character cannot be a period (.) or dash (-). v The length must not exceed 63 characters. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {{ip_address | host_name} [, {ip_address | host_name} ... ] | ip_address-ip_address} Discovers one or more systems with the specified IP addresses and host names. The list can be a mixture of IP address and host names, separated by a comma, or a range of IP addresses. To specify a range of IP addresses, specify the lowest and highest address in the range separated by a hyphen (for example, 9.124.100.50-9.124.100.100). ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific.

72

IBM Systems Director Commands Reference

v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. Tip: This option cannot be used with the -p | --profile option. -p | --profile {all | { profile_name}[,profile_name...]} Discovers the systems associated with one or more discovery profiles that are specified by name and separated by a comma. Tips: v You can create discovery profiles using the IBM Systems Director Web interface. You cannot create, modify or delete profiles from the command line interface. v You can get a list of profile names from the IBM Systems Director Web interface. v To discover systems associated with all discovery profiles, specify all. v This option cannot be used with the -i | --ipaddress option. all All discovery profiles. profile_name The name of the discovery profile. If the discovery profile name contains a comma, prefix the comma with a backslash (\). Tips: v Discovery-profile names might not be unique. This command acts on all discovery profiles with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple discovery profiles with the same name. To target a discovery profile that has a name that is not unique, identify the discovery profile by specifying its unique, hexadecimal group ID, or use additional target options to refine the selection. v The discovery profiles names are not local specific. -t | --type system_type Discovers one or more systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -I command to obtain a list of valid system types. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -W | --wait seconds Displays the results of the command after waiting the specified number of seconds, regardless of whether or not the task has been completed. Possible values for seconds are:
Chapter 1. smcli

73

v -1: Waits indefinitely for the task to finish before exiting and displaying the results. This value is the default if this option is not specified. v 0: Exits immediately, and the task continues to run in the background. Use the lsjob or lsjobhistory command to check the status. v 1 or greater: Exits after the specified number of seconds. If the task is completed before the specified wait period, this command displays the results. If the task is not completed before the specified wait period, the command exits and the task continues to run in the background. Use the lsjob or lsjobhistory command to check the status.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 26: A specified system type is not valid. v 29: The specified locale is not valid or not supported. v 50: The specified system type does not support discovery. v 126: The task did not complete before the specified wait time. The command is still running in the background. v 127: The command timed out.

Examples
1. Discover all resources This command illustrates how to discover all resources using all discovery profiles.
smcli discover

or
smcli discover -p all

2. Discover all BladeCenter chassis This command illustrates how to discover all BladeCenter chassis, as predefined in the BladeCenter Chassis discovery profile.
smcli discover -t BladeCenter Chassis

3. Discover resources by IP address This command illustrates how to discover all resources with IP address 9.124.100.1 and within the IP address range 9.124.100.50 - 9.124.100.100.
smcli discover -i 9.124.100.1,9.124.100.50-9.124.100.100

4. Discover resources by host name This command illustrates how to discover all resources with host name sumeet.kumar.com.
smcli discover -H sumeet.kumar.com

5. Discover resources associated with all profiles This command illustrates how to discover all resources that are associated with all profiles.
smcli discover -p all

collectinv command
Use the collectinv command to collect data about hardware and software resources that are currently installed on specified systems and to update the database.

74

IBM Systems Director Commands Reference

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] collectinv options For information about the options listed above that are specific to smcli, enter smcli -?. smcli collectinv [-h | -? | --help] [-L language] smcli collectinv [-L language] [-v] [-W seconds] {-p { "All Inventory" | profile_list}} [-t system_type] [-f file_name | -w query | -i ip_address_list | -N group_list | [-n] system_list]

Description
The collectinv command collects inventory for the targeted systems. You can use the lsinv command to view the collected inventory.

Operands
This command optionally uses a system list as an operand. The list can optionally be preceded by the -n | --names option.

Flags
-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of discovery profile names and IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more systems, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma.
Chapter 1. smcli

75

ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more systems specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. If the -n option is not specified, then a customized event action that starts a noninteractive task on the system on which the event occurred is created. If the -n option is specified, then a customized event action that starts a noninteractive task on a specified system is created.

76

IBM Systems Director Commands Reference

system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all systems in one or more specified groups that are identified by name or ID. The list can be a mixture of group names and IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -p | --profile {"All Inventory" | { profile_name}[,profile_name...]} Discovers inventory for systems associated with one or more discovery profiles that are specified by name and separated by a comma. Tips: v You can create discovery profiles using the IBM Systems Director Web interface. You cannot create, modify or delete profiles from the command line interface.

Chapter 1. smcli

77

v You can get a list of profile names from the IBM Systems Director Web interface. v To discover inventory for systems associated with all discovery profiles, specify "All Inventory". v This option cannot be used with the -i | --ipaddress option. "All Inventory" All discovery profiles. profile_name The name of the discovery profile. If the discovery profile name contains a comma, prefix the comma with a backslash (\). Tips: v Discovery-profile names might not be unique. This command acts on all discovery profiles with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple discovery profiles with the same name. To target a discovery profile that has a name that is not unique, identify the discovery profile by specifying its unique, hexadecimal group ID, or use additional target options to refine the selection. v The discovery profiles names are not local specific. -t | --type system_type Narrows the specified targeted systems to all systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs.

78

IBM Systems Director Commands Reference

v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes. -W | --wait seconds Displays the results of the command after waiting the specified number of seconds, regardless of whether or not the task has been completed. Possible values for seconds are: v -1: Waits indefinitely for the task to finish before exiting and displaying the results. This value is the default if this option is not specified. v 0: Exits immediately, and the task continues to run in the background. Use the lsjob or lsjobhistory command to check the status. v 1 or greater: Exits after the specified number of seconds. If the task is completed before the specified wait period, this command displays the results. If the task is not completed before the specified wait period, the command exits and the task continues to run in the background. Use the lsjob or lsjobhistory command to check the status.

Exit status
The following table lists the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 29: The specified locale is not valid or not supported. v 60: A table was not found. v 61: A column was not found. v 62: The database is inactive. v 126: The task did not complete before the specified wait time. The command is still running in the background. v 127: The command timed out.

Examples
1. Collect inventory based on a profile ID This example illustrates how to collect inventory based on the discovery profile named profile_1.
smcli collectinv -p profile_1 STATUS: COMPLETED

lsinv command
Use the lsinv command to list inventory data for systems or groups.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsinv options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsinv [-h | -? | --help] [-L language]
Chapter 1. smcli

79

smcli lsinv [-L language] [-v] [-e inventory] [-l] smcli lsinv [-L language] [-v] [-d symbol] [-e inventory_type] [-l | -F {xml|csv}] [-t system_type] [-f file_name | -w query | -i ip_address_list | -N group_list | [-n] system_list]

Description
The lsinv command lists the inventory information on a system or group. Important: The syntax or output for this command has changed since IBM Director v5.20. You can use the IBM Director v5.20 command syntax and output by setting the CLILEGACY environment variable to 1. For more information about the v5.20 commands, see the commands reference in the IBM Director v5.20 information center at publib.boulder.ibm.com/infocenter/eserver/v1r2/topic/ diricinfo_5.20/fqm0_r_dircli_managed_object_commands.html. If no options are specified, this command lists all inventory resource types. Important: The -V | --values option used in IBM Systems Director v5.20 is no longer supported by this command.

Operands
This command uses a system list as an operand. The list can optionally be preceded by the -n | --names option.

Flags
-d | --delimiter symbol Specifies one or more characters that separate data sets. The default is the end-of-line character. Tip: This option is ignored if the -l | --long option is also specified. -e | --entry inventory_type Displays information about the specified inventory type associated with the targeted systems. Tip: v If this option is specified without a targeted system, this command lists the attributes for that inventory type. v If this option is specified with a targeted system, this command lists the attributes and values for that inventory type. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of system names and IDs, separated by commas or line breaks.

80

IBM Systems Director Commands Reference

-F | --format {xml | csv} Displays the output in the specified format, either XML or CSV. The output can be used as input to other commands or processed by scripts. The CSV output separates data using the delimiter specified by the -d | --delimiter option. Tips: v In the <System> tag, the name, ipaddress and oid fields are empty if you do not specify a system. v Multiple <Value> tags are listed if an attribute has more than one value (for example, an attribute with a data type of stringarray). -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more systems, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely.
Chapter 1. smcli

81

-l | --long Lists the display name and value type of all inventory data that is associated with the targeted systems. If you do not specify a system, this option lists the display name and value type for all inventory data for all systems. If you do not specify this -l | --long option, this command lists the attribute and attribute values for the targeted systems. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more systems specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. If the -n option is not specified, then a customized event action that starts a noninteractive task on the system on which the event occurred is created. If the -n option is specified, then a customized event action that starts a noninteractive task on a specified system is created. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to

82

IBM Systems Director Commands Reference

generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all systems in one or more specified groups that are identified by name or ID. The list can be a mixture of group names and IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -t | --type system_type Narrows the specified targeted systems to all systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more systems based on system attributes specified by query.

Chapter 1. smcli

83

The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table lists the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 29: The specified locale is not valid or not supported. v 60: A table was not found. v 61: A column was not found. v 62: The database is inactive.

Examples
1. List all attributes for all system types This example illustrates how to list all attributes for all inventory types.
smcli lsinv

2. List detailed attribute information for a specific system type This example illustrates how to list the display name and value type for all Server inventory types attributes.
smcli lsinv -l -e "Server"

3. Display all inventory information for a system This example illustrates how to display all inventory information for the system named node1.
smcli lsinv -n node1

4. Display specific inventory information for a system This example illustrates how to display Server inventory information for the system named node1.
smcli lsinv -n node1 -e "Server"

5. Display inventory information in XML format This example illustrates how to display inventory information for the system named System1 in XML format.
smcli lsinv -F xml -n System1

84

IBM Systems Director Commands Reference

Configuration plans and templates commands


Use the configuration commands to manage configuration plans and templates for systems, such as IBM BladeCenter chassis, servers, and network-storage systems. Note: The IBM Director v5.20 configuration commands are not supported in this release.

smcli commands
These smcli configuration plan and template commands are available. Configuration plan commands: lscfgplan Use the lscfgplan command to list configuration plans for systems. mkcfgplan Use the mkcfgplan command to create a configuration plan for a system. This command acquires the configuration information only from an XML input file. rmcfgplan Use the rmcfgplan command to delete configuration plans. Configuration template commands: lscfgtmpl Use the lscfgtmpl command to list configuration templates for systems in XML format. mkcfgtmpl Use the mkcfgtmpl command to create a configuration template for a system. This command acquires the configuration-template information only from an XML input file. rmcfgtmpl Use the rmcfgtmpl command to delete configuration templates.

Configuration plan commands


The smcli configuration plan recording commands create, delete and list configuration plans..

smcli commands
These smcli configuration plan commands are available: lscfgplan Use the lscfgplan command to list configuration plans for systems. mkcfgplan Use the mkcfgplan command to create a configuration plan for a system. This command acquires the configuration information only from an XML input file. rmcfgplan Use the rmcfgplan command to delete configuration plans.

lscfgplan command
Use the lscfgplan command to list configuration plans for systems.
Chapter 1. smcli

85

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lscfgplan options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lscfgplan [-h | -? | --help] [-L language] smcli lscfgplan [-L language] [-v] [-d symbol] {-T plan_list}

Description
This command lists configuration information in XML format. If a configuration plan is targeted, this command lists information about the configuration plan. If a system is targeted, this command lists the current configuration information for that system.

Operands
This command has no operands.

Flags
-d | --delimiter symbol Specifies the character or set of characters that separates output data, where symbol is a string of one or more characters. By default, this command separates individual data sets (for example, the data returned for a specific object) with a line break. When you specify the -d | --delimiter option, the line break is replaced by the specified characters. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese

86

IBM Systems Director Commands Reference

v v v v

ko: Korean pt_BR: Brazilian Portuguese zh_CN: Simplified Chinese zh_TW: Traditional Chinese

Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -T | --tasks {task_oid | task_id_string | task_title}[,{task_oid | task_id_string | task_title}...] Lists information for one or more configuration plans (which are tasks), specified by title, unique ID or ID string. The list can be a mixture of titles, IDs and ID strings, separated by a comma. The list is delimited by the end-of-line character when it is read from a file. task_oid The unique ID of the task, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lstask -o -r command to list all task IDs that are valid for the targeted system. task_id_string The unique ID string of the task, prefixed with a percent sign (%) (for example, %BladeServerCfgTask). If the string ID contains a comma, prefix the comma with a backslash (\). Tip: You can use the lstask -I command to list all task ID strings that are valid for the targeted system. task_title The title of the task. The task title must be fully qualified with the parent task (for example, grandparent_task_title/parent_task_title/task_title). If the task name contains a comma, prefix the comma with a backslash (\). Enclose the task title in quotation marks if it contains a space character. Tips: v Task names might not be unique. This command acts on all tasks with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple tasks with the same name. To target a task that has a name that is not unique, identify the task by specifying its unique, hexadecimal task ID, or use additional target options to refine the selection. v Locale-specific task names might not exist for every noninteractive task. The name specified must match the locale being used by the command line interface. v Use the lstask -r command to list all tasks that are valid for the targeted system.
Chapter 1. smcli

87

-v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table lists the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 29: The specified locale is not valid or not supported. v 50: This operation failed on some targets. v 51: The operation failed on all targets, but for different reasons. v 53: A specified task was not a valid configuration plan. v 54: Configuration settings were not found for a targeted system. v 55: Configuration settings are not registered with configuration manager. v 56: Configuration manager failed to connect to the device. v 57: Configuration manager lost connection to the device.

Examples
1. List information about multiple configuration plans This example illustrates how to list information for configuration plans with task IDs 0x37 and 0x61
smcli lscfgplan -T 0x37,0x61

2. Export plan configuration information in an XML file This example illustrates how to export configuration information for the plan named bladesconfigplan to a file named plan.xml.
smcli lscfgplan -T bladesconfigplan > plan.xml

mkcfgplan command
Use the mkcfgplan command to create a configuration plan for a system. This command acquires the configuration information only from an XML input file.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] mkcfgplan options For information about the options listed above that are specific to smcli, enter smcli -?. smcli mkcfgplan [-h | -? | --help] [-L language] smcli mkcfgplan [-L language] [-v] {-f file_list} smcli mkcfgplan [-L language] [-v] {-p plan_name} [-D description] [-A attribute_list] {-f file_list}

Description
After you create a configuration plan, you can run it on system (such as a BladeCenter chassis, server, or network-storage system) using the runtask command. Use the lstask command to obtain the task IDs of the configuration plans.

88

IBM Systems Director Commands Reference

Operands
There are no operands.

Flags
-A | --attribute key=value Sets the value of the specified configuration-plan attribute, where key is the attribute key. You can specify any of the following attribute key:
Key AutomaticDeploy Data type boolean Description A flag that identifies whether to automatically apply the plan on a system. Possible values are true (automatically apply) and false (do not automatically apply).

-D | --description Specifies a description for the plan being created. Tip: If the description contains spaces or commas, enclose it in quotation marks. -f | --file file_name[,{file_name}...] Receives configuration data from one or more specified XML files, separated by a comma. If you specify the -P | --plan option, this is a list of configuration-template XML files. If you do not include the -P | --plan option, this is a list of configuration-plan XML files. The input data in each template or plan XML file must be a set of XML tags in the format required by IBM Systems Director configuration manager. The file is validated for structural correctness before the content is imported. It is validated for semantic correctness when the plan is applied. Tips: v You can export a configuration plan to a file using the lscfgplan command and modify the configuration data for use in this command. v You can export a configuration template to a file using the lscfgtmpl command and modify the configuration data for use in this command. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored.

Chapter 1. smcli

89

v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -P | --plan plan_name Specifies the name of the plan being created. Tip: If the plan name contains spaces or commas, enclose it in quotation marks. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 29: The specified locale is not valid or not supported. v 50: This operation failed on some targets. v 51: The operation failed on all targets, but for different reasons. v 52: The command failed with details.

Examples
1. Create and run a configuration plan This example illustrates how to create a configuration plan named bladesconfigplan that includes two templates defined in files template1.xml and template2.xml.

90

IBM Systems Director Commands Reference

smcli mkcfgplan -P bladesconfigplan -f template1.xml,template2.xml smcli runtask -N blades bladesconfigplan

2. Create multiple configuration plans This example illustrates how to create two configuration plans from input files plan1.xml and plan2.xml, both located in the current directory.
smcli mkcfgplan -f plan1.xml,plan2.xml

rmcfgplan command
Use the rmcfgplan command to delete configuration plans.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] rmcfgplan options For information about the options listed above that are specific to smcli, enter smcli -?. smcli rmcfgplan [-h | -? | --help] [-L language] smcli rmcfgplan [-L language] [-v] {-T plan_list}

Description Operands
None

Flags
-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese
Chapter 1. smcli

91

v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -T | --tasks {task_oid | task_id_string | task_title}[,{task_oid | task_id_string | task_title}...] Deletes one or more configuration plans (tasks), specified by title, unique ID or ID string. The list can be a mixture of titles, IDs and ID strings, separated by a comma. The list is delimited by the end-of-line character when read from a file. task_oid The unique ID of the task, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lstask -o -r command to list all task IDs that are valid for the targeted system. task_id_string The unique ID string of the task, prefixed with a percent sign (%) (for example, %BladeServerCfgTask). If the string ID contains a comma, prefix the comma with a backslash (\). Tip: You can use the lstask -I command to list all task ID strings that are valid for the targeted system. task_title The title of the task. The task title must be fully qualified with the parent task (for example, grandparent_task_title/parent_task_title/task_title). If the task name contains a comma, prefix the comma with a backslash (\). Enclose the task title in quotation marks if it contains a space character. Tips: v Task names might not be unique. This command acts on all tasks with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple tasks with the same name. To target a task that has a name that is not unique, identify the task by specifying its unique, hexadecimal task ID, or use additional target options to refine the selection. v Locale-specific task names might not exist for every noninteractive task. The name specified must match the locale being used by the command line interface. v Use the lstask -r command to list all tasks that are valid for the targeted system. -v | --verbose Writes verbose messages to standard output.

92

IBM Systems Director Commands Reference

If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table lists the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 29: The specified locale is not valid or not supported. v 50: This operation failed on some targets. v 51: The operation failed on all targets, but for different reasons. v 53: A specified task was not a valid configuration plan.

Examples
1. Remove a configuration plan using a task string ID This example illustrates how to remove the configuration plan associated with the task string ID profileTask
smcli rmcfgplan -T %profileTask

2. Remove configuration plans using task IDs This example illustrates how to remove the configuration plans associated with the task IDs 0x54 and 0x79.
smcli rmcfgplan -T 0x54,0x79

Configuration template commands


The smcli configuration template commands create, delete, and list configuration templates.

smcli commands
These smcli configuration template commands are available: lscfgtmpl Use the lscfgtmpl command to list configuration templates for systems in XML format. mkcfgtmpl Use the mkcfgtmpl command to create a configuration template for a system. This command acquires the configuration-template information only from an XML input file. rmcfgtmpl Use the rmcfgtmpl command to delete configuration templates.

lscfgtmpl command
Use the lscfgtmpl command to list configuration templates for systems in XML format.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lscfgtmpl options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lscfgtmpl [-h | -? | --help] [-L language] smcli lscfgtmpl [-L language] [-v] [-d symbol] {-T template_list}
Chapter 1. smcli

93

smcli lscfgtmpl [-L language] [-v] [-d symbol] [-t system_type] [-f file_list] {-a | -w query | -n system_list | [-N] group_list}

Description
This command lists name and information about configuration templates in XML format.

Operands
This command has no operands.

Flags
-a | --all Targets all systems. -d | --delimiter symbol Specifies the character or set of characters that separates output data, where symbol is a string of one or more characters. By default, this command separates individual data sets (for example, the data returned for a specific object) with a line break. When you specify the -d | --delimiter option, the line break is replaced by the specified characters. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of configuration templates tasks. This list can be a mixture of task titles, IDs, and string IDs, separated by a comma and delimited by an end-of-line character. The input files are validated for structural correctness before the content is imported. It is validated for semantic correctness when the configuration template is run. Note: You can export a configuration template to a file using the lscfgtmpl command and modify the configuration data for use in this command. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored.

94

IBM Systems Director Commands Reference

v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more systems specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. If the -n option is not specified, then a customized event action that starts a noninteractive task on the system on which the event occurred is created. If the -n option is specified, then a customized event action that starts a noninteractive task on a specified system is created. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific.
Chapter 1. smcli

95

-N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all systems in one or more specified groups that are identified by name or ID. The list can be a mixture of group names and IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -t | --type system_type Narrows the specified targeted systems to all systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -T | --tasks {task_oid | task_id_string | task_title}[,{task_oid | task_id_string | task_title}...] Lists information for one or more configuration templates (tasks), specified by title, unique ID or ID string. The list can be a mixture of titles, IDs and ID strings, separated by a comma. The list is delimited by the end-of-line character when read from a file. task_oid The unique ID of the task, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lstask -o -r command to list all task IDs that are valid for the targeted system.

96

IBM Systems Director Commands Reference

task_id_string The unique ID string of the task, prefixed with a percent sign (%) (for example, %BladeServerCfgTask). If the string ID contains a comma, prefix the comma with a backslash (\). Tip: You can use the lstask -I command to list all task ID strings that are valid for the targeted system. task_title The title of the task. The task title must be fully qualified with the parent task (for example, grandparent_task_title/parent_task_title/task_title). If the task name contains a comma, prefix the comma with a backslash (\). Enclose the task title in quotation marks if it contains a space character. Tips: v Task names might not be unique. This command acts on all tasks with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple tasks with the same name. To target a task that has a name that is not unique, identify the task by specifying its unique, hexadecimal task ID, or use additional target options to refine the selection. v Locale-specific task names might not exist for every noninteractive task. The name specified must match the locale being used by the command line interface. v Use the lstask -r command to list all tasks that are valid for the targeted system. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table lists the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred.
Chapter 1. smcli

97

v v v v v v v v

29: The specified locale is not valid or not supported. 50: This operation failed on some targets. 51: The operation failed on all targets, but for different reasons. 53: A specified task was not a valid configuration plan. 54: Configuration settings were not found for a targeted system. 55: Configuration settings are not registered with configuration manager. 56: Configuration manager failed to connect to the device. 57: Configuration manager lost connection to the device.

Examples
1. List information about multiple configuration templates This example illustrates how to list information for configuration templates with task IDs 0x37 and 0x61
smcli lscfgtmlp -T 0x37,0x61

2. List configuration information in a template XML file This example illustrates how to list current configuration information described by get.xml for the system with IP address 192.168.1.100.
smcli lscfgplan -w MO.ipaddr=192.168.1.100 -f get.xml

mkcfgtmpl command
Use the mkcfgtmpl command to create a configuration template for a system. This command acquires the configuration-template information only from an XML input file.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] mkcfgtmpl options For information about the options listed above that are specific to smcli, enter smcli -?. smcli mkcfgtmpl [-h | -? | --help] [-L language] smcli mkcfgtmpl [-L language] [-v] {-f file_list}

Description
After you create a configuration template, you can run it on system (such as a BladeCenter chassis, server, or network-storage system) using the runtask command. Use the lstask command to obtain the task IDs of the configuration templates.

Operands
There are no operands.

Flags
-f | --file file_name[,{file_name}...] Receives configuration data from one or more specified XML files, separated by a comma. This is a list of configuration-template XML files. The input data in each configuration-template XML file must contain a set of XML tags in the format required by IBM Systems Director configuration manager. The file is validated for structural correctness before the content is imported. It is validated for semantic correctness when the plan is applied.

98

IBM Systems Director Commands Reference

Tip: You can export a configuration template to a file using the lscfgtmpl command and modify the configuration data for use in this command. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 29: The specified locale is not valid or not supported.
Chapter 1. smcli

99

v v v v v v

50: This operation failed on some targets. 51: The operation failed on all targets, but for different reasons. 52: The command failed with details. 58: A template with the specified name and subtype already exists. 61: The input XML is not valid. 125: An internal error occurred.

Examples
1. Create and run a configuration template This example illustrates how to create a configuration template using the data stored in the blades_template.xml file. It then obtains the task ID for the template with ID0x45, and runs the template on all systems in the blades group.
smcli mkcfgtmpl -f blades_template.xml smcli runtask -N blades_template 0x45

2. Create multiple configuration templates This example illustrates how to create two configuration templates from input files template1.xml and template2.xml, both located in the current directory.
smcli mkcfgtmpl -f template1.xml,template2.xml

rmcfgtmpl command
Use the rmcfgtmpl command to delete configuration templates.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] rmcfgtmpl options For information about the options listed above that are specific to smcli, enter smcli -?. smcli rmcfgtmpl [-h | -? | --help] [-L language] smcli rmcfgtmpl [-L language] [-v] {-T template_list}

Description Operands
None

Flags
-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored.

100

IBM Systems Director Commands Reference

v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -T | --tasks {task_oid | task_id_string | task_title}[,{task_oid | task_id_string | task_title}...] Deletes one or more configuration templates (tasks), specified by title, unique ID or ID string. The list can be a mixture of titles, IDs and ID strings, separated by a comma. The list is delimited by the end-of-line character when read from a file. task_oid The unique ID of the task, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lstask -o -r command to list all task IDs that are valid for the targeted system. task_id_string The unique ID string of the task, prefixed with a percent sign (%) (for example, %BladeServerCfgTask). If the string ID contains a comma, prefix the comma with a backslash (\). Tip: You can use the lstask -I command to list all task ID strings that are valid for the targeted system. task_title The title of the task. The task title must be fully qualified with the parent task (for example, grandparent_task_title/parent_task_title/task_title). If the task name contains a comma, prefix the comma with a backslash (\). Enclose the task title in quotation marks if it contains a space character. Tips:
Chapter 1. smcli

101

v Task names might not be unique. This command acts on all tasks with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple tasks with the same name. To target a task that has a name that is not unique, identify the task by specifying its unique, hexadecimal task ID, or use additional target options to refine the selection. v Locale-specific task names might not exist for every noninteractive task. The name specified must match the locale being used by the command line interface. v Use the lstask -r command to list all tasks that are valid for the targeted system. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table lists the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 29: The specified locale is not valid or not supported. v 50: This operation failed on some targets. v 51: The operation failed on all targets, but for different reasons. v 53: A specified task was not a valid configuration plan.

Examples
1. Remove a configuration template using a task string ID This example illustrates how to remove the configuration template associated with the task string ID templateTask
smcli rmcfgtmpl -T %templateTask

2. Remove configuration templates using task IDs This example illustrates how to remove the configuration templates associated with the task IDs 0x54 and 0x79.
smcli rmcfgtmpl -T 0x54,0x79

Status commands
Use the commands in this section to monitor the status of systems.

smcli commands
These smcli status commands are available: chled lsled lsstatus Use the lsstatus command to list the status information for a specified category of systems. Use the chled command to modify the light-path-diagnostic LED attributes on one or more systems. You can change the status and polling interval. Use the lsled command to list light path diagnostic LED status on one or more systems.

102

IBM Systems Director Commands Reference

chled command
Use the chled command to modify the light-path-diagnostic LED attributes on one or more systems. You can change the status and polling interval. Important: This command is supported only by System x and IBM BladeCenter servers and IBM BladeCenter chassis.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] chled options For information about the options listed above that are specific to smcli, enter smcli -?. smcli chled [-h | -? | --help] [-L language] smcli chled [-L language] [-v] {-p minutes | -s {off} -l led_list} {-f file_name | -i ip_address_list | -N group_list | [-n] system_list}

Description
Tip: To change the state of the locator LED on a specific system, use the runtask command to run one of these tasks:
Task name Led On Led Blink Led Off Task ID string %BlueLight_ON %BlueLight_BLINK %BlueLight_OFF Description Turns the locator LED on. Causes the locator LED to flash. Turns the locator LED off.

Operands
This command uses a system list as an operand. The list can optionally be preceded by the -n | --names option.

Flags
-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of system names and IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored.

Chapter 1. smcli

103

--help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more systems, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings.

104

IBM Systems Director Commands Reference

v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -l | --led {led_name}[,led_name...] Changes the state of one or more light-path-diagnostic LEDs, separated by a comma. If the LED name contains spaces, enclose it in quotation marks. Tips: v Use the lsled command to obtain a list of valid LED names. v The -s | --state option must be specified with this option. v This option cannot be used with the -p | --polling option. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more systems specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. If the -n option is not specified, then a customized event action that starts a noninteractive task on the system on which the event occurred is created. If the -n option is specified, then a customized event action that starts a noninteractive task on a specified system is created. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all systems in one or more specified groups that are identified by name or ID. The list can be a mixture of group names and IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group.
Chapter 1. smcli

105

group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -p | --polling minutes Starts polling the light-path-diagnostic LED status on the targeted systems at the specified interval, in minutes. If the polling interval is set to 0, LED status it not polled. Tips: v You can use the lsled -p command to find the current polling interval. v This option cannot be used with the -s | --state or -l | --led options. -s | --state {off} Turns off the specified light-path-diagnostic LEDs on the targeted systems. Tip: v The -l | --led option must be specified with this option. v This option cannot be used with the -p | --polling option. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 301: The specified LED state was not found. v 302: The specified LED was not found.

Examples
1. Turn off an LED on multiple systems This example illustrates how to turn off the processor LED on all blade servers in the group named blades.
smcli chled -s off -l CPU -N blades

106

IBM Systems Director Commands Reference

2. Turn off multiple LEDs on a systems This example illustrates how to turn off the Fault and Info LEDs on the blade chassis with ID x078.
smcli chled -s off -l Fault,Info -n 0x78

3. Start polling the LED status This example illustrates how to poll the LED status on all discovered systems every 3 minutes.
chled -p 3 -N "All Systems"

4. smcli 5. Stop polling the LED status This example illustrates how to stop polling the LED status on a system named system_1.
smcli chled -p 0 system_1

lsled command
Use the lsled command to list light path diagnostic LED status on one or more systems.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsled options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsled [-h | -? | --help] [-L language] smcli lsled [-L language] [-v] {-p | {-s state_list} {-f file_name | -i ip_address_list | -N group_list | [-n] system_list}

Description
Important: This command is supported only by System x and IBM BladeCenter servers and IBM BladeCenter chassis.

Operands
This command uses a system list as an operand. The list can optionally be preceded by the -n | --names option.

Flags
-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of system names and IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command.
Chapter 1. smcli

107

Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more systems, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips:

108

IBM Systems Director Commands Reference

v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more systems specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. If the -n option is not specified, then a customized event action that starts a noninteractive task on the system on which the event occurred is created. If the -n option is specified, then a customized event action that starts a noninteractive task on a specified system is created. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all systems in one or more specified groups that are identified by name or ID. The list can be a mixture of group names and IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in
Chapter 1. smcli

109

quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -p | --polling Displays the current polling interval on the targeted systems. Tip: If the polling interval is 0, LED status is not being polled. -s | --state {state}[,state...] Lists light path diagnostic LEDs on the targeted systems that are in one or more specified states, separated by a comma. You can specify any of these states: v flash - Lists LEDs that are blinking. v on - Lists LEDs that are on. v off - Lists LEDs that are off. v all - Lists LEDs that are in any state. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported.

Examples
1. List all LEDs that are flashing This example illustrates how to list the status all LEDs that are currently flashing on all discovered systems.
smcli lsled -s flash -N "All Systems"

2. List status of all LEDs on a system This example illustrates how to list the status of all LEDs on the system named system1.
smcli lsled -s flash,on,off -n system1

3. Display the LED-status polling interval multiple systems This example illustrates how to list the LED-status polling interval on all systems in the group named blades.
smcli lsled -p -N blades

lsstatus command
Use the lsstatus command to list the status information for a specified category of systems.

110

IBM Systems Director Commands Reference

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsstatus options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsstatus [-h | -? | --help] [-L language] smcli lsstatus [-L language] [-v] [-o | -p] [-l] [-t system_type] [-c category] [-F format] [-f file_name | -w query | -i ip_address_list | -N group_list | [-n] system_list] smcli lsstatus [-L language] [-v] [-D]

Description
If no options are specified, this command lists the status of all systems in the specific category. If no categories are specified, this command lists the status of all categories.

Operands
This command uses a list of systems as an operand. The list can optionally be preceded by the -n | --names option.

Flags
-c | --category category Lists the status of the specified category. Tip: You can use the lsstatus -D command to list the available categories. -D | --display Lists the available categories. The available categories are dynamic and vary based your environment. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of systems. This list can be a mixture of names and IDs, separated by a comma or end-of-line character. -F | --format [xml ] Displays the output in XML format. The output can be used as input to other commands or processed by scripts. The format of the XML file is:
<Status> <ManageableEndpoint name="" ipaddress=""> <ManageableComponent name=""> <Category name=""> <attribute name="" value=""/>

Chapter 1. smcli

111

</Category> </ManageableComponent> </ManageableEndpoint> </Status>

Tip: Multiple <attribute> tags are listed if an attribute has more than one value (for example, an attribute with a data type of stringarray). -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more systems, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -l | --long Displays detailed status information. This option returns these attributes for each system: v System Name v UpdateComplianceStatus

112

IBM Systems Director Commands Reference

v Severity -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more systems specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. If the -n option is not specified, then a customized event action that starts a noninteractive task on the system on which the event occurred is created. If the -n option is specified, then a customized event action that starts a noninteractive task on a specified system is created. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific.

Chapter 1. smcli

113

-N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all systems in one or more specified groups that are identified by name or ID. The list can be a mixture of group names and IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -o | --oid Displays the unique IDs associated with the targeted systems in addition to other information. Tip: v This option cannot be used with the -p | --pipe option. v You can combine this option with the -l | --long option. -p | --pipe Displays only the unique IDs for the targeted systems instead of the name. Tip: v When used alone, this option enables the output to be piped to other smcli commands. v This option cannot be used with the -o | --oid options. v You can combine this option with the -l | --long option. -t | --type system_type Narrows the specified targeted systems to all systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress.

114

IBM Systems Director Commands Reference

v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 50: An error occurred because one or more targeted systems are an Agentless-managed system systems.

Examples
1. List compliance status of a system This example illustrates how to list the compliance status of the system named system1. The system ID, category ID, status ID and severity are displayed.
smcli lsstatus -c update -n system_1 system_1 (22F),ComplianceStatusCategory,Fatal, 0

2. List status of all systems This example illustrates how to list number of systems with critical errors, warning errors, and without errors.
smcli lsstatus -l MEP ID:105
Chapter 1. smcli

115

MEP NAME:CS9.56.79.134 HardwareStatusCategory HardwareStatusCategory HardwareStatusCategory MEP Details: generated MEP Events: Status Set

Severity: 0 Status ID: Fatal Category: HardwareStatusCategory fatal fan event FATAL_SS_NAME

MEP ID:105 MEP NAME:CS9.56.79.134 ComplianceStatusCategory Severity: 0 ComplianceStatusCategory Status ID: Fatal ComplianceStatusCategory Category: ComplianceStatusCategory MEP Details: generated fatal fan event MEP Events: Status Set FATAL_SS_NAME

3. List systems in critical condition This example illustrates how to list systems on which one or more critical events have occurred.
smcli lsstatus -N "Hardware Status Critical"

4. List available categories This example illustrates how to list status categories that are currently available.
smcli lsstatus -D

Resource monitor commands


Use the commands in this section to monitor resources. Note: The IBM Director v5.20 resource monitor commands are not supported in this release.

smcli commands
These smcli resource monitor commands are available. Resource monitor commands: lsresmon Use the lsresmon command to list resource monitors that are available for monitoring systems. runresmon Use the runresmon command to start monitoring one or more resources on systems and display the monitored values. Resource-monitor threshold commands: chresmonthresh Use the chresmonthresh command to change the settings of one or more resource monitor thresholds. You can also use this command to activate or deactivate thresholds using this command. lsresmonthresh Use the lsresmonthresh command to list the resource-monitor thresholds. mkresmonthresh Use the mkresmonthresh command to create a new resource-monitor threshold for a system or group.

116

IBM Systems Director Commands Reference

rmresmonthresh Use the rmresmonthresh command to remove one or more resource-monitor thresholds. Resource-monitor recording commands: lsresmonrec Use the lsresmonrec command to list information about previously configured resource-monitor recordings. mkresmonrec Use the mkresmonrec command to record resource-monitor values. rmresmonrec Use the rmresmonrec command to delete one or more resource-monitor recordings. stopresmonrec Use the stopresmonrec command to stop recording resource-monitor values.

Resource monitor commands


Use the commands in this section to list and run resource monitors.

smcli commands
These smcli resource-monitor commands are available: lsresmon Use the lsresmon command to list resource monitors that are available for monitoring systems. runresmon Use the runresmon command to start monitoring one or more resources on systems and display the monitored values.

lsresmon command
Use the lsresmon command to list resource monitors that are available for monitoring systems.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsresmon options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsresmon [-h | -? | --help] [-L language] smcli lsresmon [-L language] [-v] [-l] [-T target_level] [-s order] [-f file_name | -m monitors_list] {-i ip_address | -n system}

Description
If you do not specify a resource monitor, this command lists all first-level, second-level, and third-level resource monitors by default.

Chapter 1. smcli

117

If you do specify a monitor, this command lists the monitor and its submonitors up to the third level. If you specify a submonitor, this command lists only the submonitor and its lower-level submonitors up to the third level. To change the level of monitors to list, specify the -T | --targetlevel option.

Operands
This command optionally uses a list of resource monitors and a system as operands. The resource-monitors list can optionally be preceded by the -m | --monitor option.

Flags
-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data must contain the names of one or more valid resource monitors, separated by commas or end-of-line characters (for example, [Director Agent][CPU Monitors],[Director Agent][Disk Monitors]\ or [Director Agent][CPU Monitors]\ \n [Director Agent][Disk Monitors]\). -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name} Displays all resource monitors for the system specified by IP address or host name. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS)

118

IBM Systems Director Commands Reference

suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -l | --long Displays detailed information about the specified resource monitors and all submonitors. -m | --monitors {monitor_name}[,{monitor_name}...] Lists information about one or more specified monitors and corresponding submonitors. Resource monitors are made up of levels, for example [Director Agent][CPU Monitors][Process Count]. You can specify any top-level resource monitors (for example, [Director Agent]) or lower-level submonitors (for example, [Director Agent][CPU Monitors][Process Count]). If you specify a top-level monitor, all lower-level submonitors are also targeted. Tips: v You can use the lsresmon command to list resource-monitor names.

Chapter 1. smcli

119

v The monitor name can be locale specific. The name specified must match the locale being used by the command line interface. -n | --names {system_oid | system_name} Displays all resource monitors for the system, specified by name or ID. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -s | --sort {a | d} Sorts the resource monitor names in ascending (a) or descending (d) order. -T | --targetlevel level Lists the resource monitors and submonitors up to the specified target level. You must specify the level as a whole number from 1 to n, for example: v 1: First level (for example, [Director Agent]) v 2: Second level (for example, [Director Agent][CPU Monitors]) v 3: Third level (for example, [Director Agent][CPU Monitors][CPU Utilization]) -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 50: A specified resource monitor is not valid.

Examples
1. List top-level resource monitors This example illustrates how to list the top-level resource monitors. All system-defined and user-defined monitors are listed.

120

IBM Systems Director Commands Reference

Tip: The indented items are the data nodes. The items that are not indented are the monitor paths.
smcli lsresmon -n SYSTEM_A system1 [Director Agent][Windows Performance Monitors] [Browser] [PSched Pipe] [System] [Director Agent][FILE Monitors] [C:] [Director Agent][Windows Device Monitors] [Fastfat] [ViaIde] [Director Agent][CPU Monitors] [CPU Utilization] [CPU "0" Utilization] [CPU "1" Utilization] [Process Count] ...

2. List details of multiple resource monitors This example illustrates how to list detailed information about processor monitors and disk monitors.
smcli lsresmon -m "[Director Agent][CPU Monitors], [Director Agent][DISK Monitors]" -n SYSTEM_A system1 [Director Agent][CPU Monitors] [Director Agent][CPU Monitors][CPU Utilization] [Director Agent][CPU Monitors][CPU "0" Utilization] [Director Agent][CPU Monitors][CPU "1" Utilization] [Director Agent][CPU Monitors][Process Count] [Director Agent][DISK Monitors] [Director Agent][DISK Monitors][DISK 0 : Work Load] [Director Agent][DISK Monitors][DRIVE C: % Space Used] [Director Agent][DISK Monitors][DRIVE C: Space Remaining] [Director Agent][DISK Monitors][DRIVE C: Space Used]

3. List resource monitors up to a specific level This example illustrates how to list all first, second, third, and fourth-level resource monitors.
smcli lsresmon -T 4 -n SYSTEM_A

4. List specific resource monitors up to a specific level This example illustrates how to list all first, second, third, and fourth-level CPU monitors and disk monitors.
smcli lsresmon -m "[Director Agent][CPU Monitors], [Director Agent][DISK Monitors]" -T 4 -n SYSTEM_A

runresmon command
Use the runresmon command to start monitoring one or more resources on systems and display the monitored values.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] runresmon options For information about the options listed above that are specific to smcli, enter smcli -?. smcli runresmon [-h | -? | --help] [-L language]

Chapter 1. smcli

121

smcli runresmon [-L language] [-v] [-s order] {-f file_name | -m monitor_list} [ -t system_type] {-w query | -i ip_address_list | -N group_list | [-n] system_list}

Description
When a resource monitor is started, this command displays a message that monitoring has started and displays the current values. The resource monitor collects and displays values approximately every 30 seconds until you cancel the command. The time might vary based on your platform. When you cancel this command, monitoring stops. To stop monitoring, type Ctrl+C from the command line session on which this command is running.

Operands
This command uses a list of resource-monitors and targeted system as required operands.

Flags
-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data must contain one or more resource-monitor names, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Displays resource-monitoring values for one or more systems, specified by IP addresses or host names. This list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips:

122

IBM Systems Director Commands Reference

v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -m | --monitors {monitor_name}[,{monitor_name}...] Runs one or more resource monitors. Resource monitors are made up of levels. The lowest-level submonitor (for example, [Process Count]) is called the monitor data. Higher-level monitors (for example, [Director Agent] and [Director Agent][CPU Monitors]), are called monitor paths. You must specify the full monitor path and data with this command (for example, [Director Agent][CPU Monitors][Process Count]). Tips: v You can use the lsresmon command to list resource-monitor names.

Chapter 1. smcli

123

v The monitor name can be locale specific. The name specified must match the locale being used by the command line interface. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Displays resource-monitoring values for one or more systems, specified by name or ID. This list can be a mixture of names or IDs, separated by a comma. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Displays resource-monitoring values for all systems in one or more groups, specified by name or ID. This list can be a mixture of names or IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -s | --sort {a | d} Sorts the resource monitor names in ascending (a) or descending (d) order. -t | --type system_type Displays resource-monitoring values for all systems of the specified type.

124

IBM Systems Director Commands Reference

The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Displays resource-monitoring values for one or more systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 26: A specified system type is not valid. v 29: The specified locale is not valid or not supported. v 50: A specified resource monitor is not valid.

Examples
Run multiple resource monitors on multiple systems

Chapter 1. smcli

125

This example illustrates how to run CPU-utilization monitors and disk-usage monitors on systems named system1 and system2.
smcli runresmon -m "[Director Agent][CPU Monitors][CPU Utilization], [Director Agent][DISK Monitors][DRIVE C: Space Used]" -n system1,system2 system1: [Director [Director system2: [Director [Director Agent][CPU Monitors][CPU Utilization]: 80% Agent][DISK Monitors][DRIVE C: Space Used](MB): 500 Agent][CPU Monitors][CPU Utilization]: 60% Agent][DISK Monitors][DRIVE C: Space Used](MB): 5000

Resource-monitor threshold commands


The smcli resource-monitor thresholds commands create, delete, modify, and list resource-monitor thresholds.

smcli commands
These smcli resource-monitor threshold commands are available: chresmonthresh Use the chresmonthresh command to change the settings of one or more resource monitor thresholds. You can also use this command to activate or deactivate thresholds using this command. lsresmonthresh Use the lsresmonthresh command to list the resource-monitor thresholds. mkresmonthresh Use the mkresmonthresh command to create a new resource-monitor threshold for a system or group. rmresmonthresh Use the rmresmonthresh command to remove one or more resource-monitor thresholds.

chresmonthresh command
Use the chresmonthresh command to change the settings of one or more resource monitor thresholds. You can also use this command to activate or deactivate thresholds using this command.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] chresmonthresh options For information about the options listed above that are specific to smcli, enter smcli -?. smcli chresmonthresh [-h | -? | --help] [-L language] smcli chresmonthresh [-L language] [-v] [-c] [-A | -D] [-S settings_list] [-t system_type] {-w query | -i ip_address_list | -N group_list | -n system_list} [-m monitor] {[-T] threshold_list}

Description
Using this command, you can change the property that activates or deactivates the specified resource-monitor thresholds and also change the alert settings.

126

IBM Systems Director Commands Reference

You must specify both the threshold name and resource monitor to uniquely identify the resource-monitor threshold. The threshold name by itself might not be unique.

Operands
This command uses a resource-monitor threshold name and system as operands. The resource-monitor threshold name can optionally be preceded by the -T | --threshold option.

Flags
-A | --activate Activates the targeted resource-monitor thresholds. -c | --confirm Prompts for confirmation to proceed if multiple resource-monitor thresholds are targeted. Tips: v If this option targeted, this v If this option targeted, this

is not specified and multiple resource-monitor thresholds are command proceeds without prompting. is specified and only one resource-monitor threshold is command proceeds without prompting.

-D | --deactivate Deactivates the targeted resource-monitor thresholds. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Changes the threshold properties on one ore more systems, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address.

Chapter 1. smcli

127

host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -m | --monitors {monitor_name} Changes the threshold associated with the specified resource-monitor. Resource monitors are made up of levels. The lowest-level submonitor (for example, [Process Count]) is called the monitor data. Higher-level monitors (for example, [Director Agent] and [Director Agent][CPU Monitors]), are called monitor paths. You must specify the full monitor path and data with this command (for example, [Director Agent][CPU Monitors][Process Count]). Tips: v You can use the lsresmon command to list resource-monitor names. v The monitor name can be locale specific. The name specified must match the locale being used by the command line interface.

128

IBM Systems Director Commands Reference

-n | --names {system_oid | system_name}[,{system_oid | system_name}...] Changes the threshold properties on one or more systems, specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Changes the threshold properties on all systems in one ore more specified groups, identified by name or ID. The list can be a mixture of system group names and IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -S | --settings "alert_type=setting"[,"alert_type=setting"... ] Sets values for one or more specified attributes, where alert_type is the type of alert (event) to be generated and setting is the setting value. Tips:
Chapter 1. smcli

129

v The alert-type and setting pairs are enclosed in double quotation marks and separated by a comma. v The attributes and attribute values are not locale specific. You can specify any of the following keys.
Alert type Name HighError Setting The group name. Generates an error when the threshold reaches or exceeds the specified value. The value of HighError must always be greater than the value of HighWarning. Generates a warning when the threshold reaches or exceeds the specified value. The value of HighWarning must always be less than the value of HighError and greater than the value of LowWarning. Generates a warning when the threshold reaches or falls below the specified value. The value of LowWarning must always be less than the value of HighWarning and greater than the value of LowError. Generates an error when the threshold reaches or falls below the specified value. The value of LowError must always be less than the value of LowWarning. Generates an error when the threshold matches the specified value string. Generates a warning when the threshold matches the specified value string. Generates a normal event when the threshold matches the specified value string.

HighWarning

LowWarning

LowError

ErrorStrings WarningStrings NormalStrings

-t | --type system_type Changes the threshold properties on all systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -T | --threshold {threshold_name}[,{threshold_name}...] Targets one or more thresholds names, separated by a comma. Tips: v The threshold names might not be unique. This command acts on all thresholds with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple thresholds with the same name. To target a threshold that has a name that is not unique, identify the threshold by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v The threshold names are not locale specific.

130

IBM Systems Director Commands Reference

v Use the lsresmonthresh command with no options to obtain a list of valid system threshold names. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Changes the threshold properties on one or more systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 27: A specified attribute is not valid. v 29: The specified locale is not valid or not supported. v 50: A specified resource monitor is not valid. v 51: The specified threshold is not valid.

Examples
1. Change multiple resource-monitor threshold settings This example illustrates how to change the resource-monitor threshold named CPUThreshold on the system named system1 for the CPU utilization monitor. The threshold generates a warning when the CPU utilization reaches or exceeds 50% and generates an error when the CPU utilization reaches or exceeds 80%.
smcli chresmonthresh -m "[Director Agent][CPU Monitors][CPU Utilization]" -n system1 -S "HighWarning=50","HighError=80" -T "CPUThreshold"

2. Activate a resource-monitor threshold This example illustrates how to activate the threshold named CPUThreshold on a system named system1.
smcli chresmonthresh -Am "[Director Agent][CPU Monitors][CPU Utilization]" -n system1 -T CPUThreshold

3. Activate a resource-monitor threshold on multiple systems


Chapter 1. smcli

131

This example illustrates how to activate the resource-monitor threshold named CPUThreshold on systems named system1 and system2 for the CPU utilization monitor. The command prompts you to continue.
smcli chresmonthresh -c -A -m "[Director Agent][CPU Monitors][CPU Utilization]" -n system1,system2 -T "CPUThreshold" Warning : Multiple thresholds resolved, do you want to continue (y/n) : y

4. Deactivate a resource-monitor threshold This example illustrates how to deactivate the threshold named DiskThreshold on a system named system1.
smcli chresmonthresh -D -m "[Director Agent][Disk Monitors][DRIVE C: % Space Used]" -n system1 DiskThreshold

lsresmonthresh command
Use the lsresmonthresh command to list the resource-monitor thresholds.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsresmonthresh options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsresmonthresh [-h | -? | --help] [-L language] smcli lsresmonthresh [-L language] [-v] [-l] [-t system_type] [-f file_name | -m monitor] [-w query | -i ip_address_list | -N group_list | -n system_list] [[-T] threshold_list]

Description
If you specify one or more systems, this command lists the resource-monitor thresholds that are currently active on those systems. If no options are specified, this command lists all the available resource-monitor thresholds that have been created.

Operands
This command optionally uses a list of resource-monitor thresholds as an operand. The list can optionally be preceded by the -T | --threshold option.

Flags
-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data must contain the names of one or more valid resource monitors, separated by commas or end-of-line characters. -h | -? Displays the syntax and a brief description of the command.

132

IBM Systems Director Commands Reference

Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Lists information about resource-monitor thresholds that have been set on one or more systems, specified by IP addresses or host names. This list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -l | --long Displays detailed information about each resource-monitor threshold. This option displays these attributes for each resource-monitor threshold: v Name: Name of the resource-monitor threshold v IsActive: Flag indicating whether the threshold is activated. Possible values are true (active) or false (not active). v Type: Threshold type. Possible values are individual (set on specific systems) or group (set on system groups). v Target: The name of the system or group to which the threshold is applied. v v v v Attribute: Attribute for which the threshold is applied. Description: Threshold description Generate warning: The circumstance in which a warning is generated. Generate error: The circumstance in which an error is generated.
Chapter 1. smcli

133

-L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -m | --monitors monitor_name Displays threshold information about the specified resource monitor. Resource monitors are made up of levels. The lowest-level submonitor (for example, [Process Count]) is called the monitor data. Higher-level monitors (for example, [Director Agent] and [Director Agent][CPU Monitors]), are called monitor paths. You must specify the full monitor path and data with this command (for example, [Director Agent][CPU Monitors][Process Count]). Tips: v You can use the lsresmon command to list resource-monitor names. v The monitor name can be locale specific. The name specified must match the locale being used by the command line interface. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Lists information about resource-monitor thresholds that have been set on one or more systems, specified by name or ID. This list can be a mixture of names or IDs, separated by a comma. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips:

134

IBM Systems Director Commands Reference

v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Lists information about resource-monitor thresholds that have been set on all systems in one or more specified groups, identified by name or ID. This list can be a mixture of names or IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -t | --type system_type Lists information about resource-monitor thresholds that have been set on all systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -T | --threshold {threshold_name}[,{threshold_name}...] Targets one or more thresholds names, separated by a comma. Tips:

Chapter 1. smcli

135

v The threshold names might not be unique. This command acts on all thresholds with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple thresholds with the same name. To target a threshold that has a name that is not unique, identify the threshold by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v The threshold names are not locale specific. v Use the lsresmonthresh command with no options to obtain a list of valid system threshold names. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Lists information about resource-monitor thresholds that have been set on one or more systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 51: The specified threshold is not valid.

Examples
1. List resource-monitor thresholds set on a system This example illustrates how to list resource-monitor thresholds that are set on the system named system1.
smcli lsresmonthresh -n system1 MyCPUUtilization

2. List detailed information about a resource-monitor threshold

136

IBM Systems Director Commands Reference

This example illustrates how to list detailed information about resource-monitor threshold named MyCPUUtilization that is associated with the [Director Agent][CPU Monitors][CPU Utilization] monitor that runs on the system named system1.
smcli lsresmonthresh -l -m [Director Agent][CPU Monitors][CPU Utilization] -n system1 -T MyCPUUtilization Name: MyCPUUtilization IsActive: True Type: Individual Target: system1 Attribute: CPUUtilization Description: Threshold on CPU Utilization Generate warning: If CPU Utilization goes above 70% or goes below 10% Generate error: If CPU Utilization goes above 90% or goes below 5% HighWarning: 50

3. Export a resource-monitor threshold as a plan This example illustrates how to create an XML file named mythreshold.xml with details of the resource-monitor threshold named mythreshold.
smcli lsresmonthresh -F xml -T mythreshold > mythreshold.xml

mkresmonthresh command
Use the mkresmonthresh command to create a new resource-monitor threshold for a system or group.

Syntax
smcli [-c] options [-prompt] [-user user_name] [-pw password] mkresmonthresh

For information about the options listed above that are specific to smcli, enter smcli -?. smcli mkresmonthresh [-h | -? | --help] [-L language] smcli mkresmonthresh [-L language] [-v] {-m monitor} {-S settings_list} [ -t system_type] {-w query | -i ip_address_list | -N group_list | -n system_list} {-T threshold}

Description
You can create a resource-monitor threshold for an individual system or group. If you do not specify the name of an XML file, you must specify the name of a resource monitor and one or more systems or groups. Important: After you create the resource-monitor threshold, you must activate it using the chresmonthresh -A command.

Operands
This command uses the name of a resource monitor and one or more systems or groups as operands. This command creates a resource-monitor threshold with the name specified by threshold.

Chapter 1. smcli

137

Flags
-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Sets the resource-monitor threshold on one or more systems, specified by IP addresses or host names. This list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese

138

IBM Systems Director Commands Reference

v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -m | --monitors {monitor_name} Creates the threshold for the specified resource monitor. Resource monitors are made up of levels, for example [Director Agent][CPU Monitors][Process Count]. [Director Agent] is a top-level resource monitors, and [Director Agent][CPU Monitors][Process Count] is a lower-level submonitor. For this command, you must specify a submonitor. Tips: v You can use the lsresmon command to list resource-monitor names. v The monitor name can be locale specific. The name specified must match the locale being used by the command line interface. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Sets the resource-monitor threshold on one or more systems, specified by name or ID. This list can be a mixture of names or IDs, separated by a comma. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Sets the resource-monitor threshold on all systems in one or more specified groups, identified by name or ID. This list can be a mixture of names or IDs, separated by a comma. Tips:
Chapter 1. smcli

139

v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -S | --settings "alert_type=setting"[,"alert_type=setting"... ] Sets values for one or more specified attributes, where alert_type is the type of alert (event) to be generated and setting is the setting value. Tips: v The alert-type and setting pairs are enclosed in double quotation marks and separated by a comma. v The attributes and attribute values are not locale specific. You can specify any of the following keys.
Alert type Name HighError Setting The group name. Generates an error when the threshold reaches or exceeds the specified value. The value of HighError must always be greater than the value of HighWarning. Generates a warning when the threshold reaches or exceeds the specified value. The value of HighWarning must always be less than the value of HighError and greater than the value of LowWarning. Generates a warning when the threshold reaches or falls below the specified value. The value of LowWarning must always be less than the value of HighWarning and greater than the value of LowError. Generates an error when the threshold reaches or falls below the specified value. The value of LowError must always be less than the value of LowWarning. Generates an error when the threshold matches the specified value string. Generates a warning when the threshold matches the specified value string. Generates a normal event when the threshold matches the specified value string.

HighWarning

LowWarning

LowError

ErrorStrings WarningStrings NormalStrings

-t | --type system_type Sets the resource-monitor threshold on all systems of the specified type.

140

IBM Systems Director Commands Reference

The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -T | --threshold {threshold_name} Creates a resource-monitor threshold with the specified name. Tip: v The threshold names are not required to be unique. v The threshold names are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Sets the resource-monitor threshold on one or more systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 27: A specified attribute is not valid. v 29: The specified locale is not valid or not supported. v 50: A specified resource monitor is not valid.
Chapter 1. smcli

141

Examples
Create a threshold This example illustrates how to create a resource-monitor threshold named CPUThreshold on the system named system1 for the CPU utilization monitor. The threshold generates a warning when the CPU utilization reaches or exceeds 50% and generates an error when the CPU utilization reaches or exceeds 80%.
smcli mkresmonthresh -m "[Director Agent][CPU Monitors][CPU Utilization]" -n system1 -S "HighWarning=50","HighError=80" -T "CPUThreshold"

rmresmonthresh command
Use the rmresmonthresh command to remove one or more resource-monitor thresholds.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] rmresmonthresh options For information about the options listed above that are specific to smcli, enter smcli -?. smcli rmresmonthresh [-h | -? | --help] [-L language] smcli rmresmonthresh [-L language] [-v] [-c] [-t system_type] [-w query | -i ip_address_list | -N group_list | -n system_list} [-m monitor] {[-T] threshold_list}

Description
None.

Operands
This command uses a one or more resource-monitor thresholds and systems as operands. The resource monitor threshold can optionally be preceded by the -T | --threshold option.

Flags
-c | --confirm Prompts for confirmation to proceed if multiple resource-monitor thresholds are targeted. Tips: v If this option is not specified and multiple resource-monitor thresholds are targeted, this command proceeds without prompting. v If this option is specified and only one resource-monitor threshold is targeted, this command proceeds without prompting. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command.

142

IBM Systems Director Commands Reference

To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of resource-monitor thresholds to be removed, separated by a comma. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Removes the resource-monitor thresholds from one or more systems, specified by IP addresses or host names. This list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English
Chapter 1. smcli

143

v v v v v v v v

es: Spanish fr: French it: Italian ja: Japanese ko: Korean pt_BR: Brazilian Portuguese zh_CN: Simplified Chinese zh_TW: Traditional Chinese

Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -m | --monitors {monitor_name} Removes the targeted threshold that is associated with the specified resource monitor. Resource monitors are made up of levels, for example [Director Agent][CPU Monitors][Process Count]. [Director Agent] is a top-level resource monitors, and [Director Agent][CPU Monitors][Process Count] is a lower-level submonitor. For this command, you must specify a submonitor. Tips: v You can use the lsresmon command to list resource-monitor names. v The monitor name can be locale specific. The name specified must match the locale being used by the command line interface. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Removes the resource-monitor threshold from one or more systems, specified by name or ID. This list can be a mixture of names or IDs, separated by a comma. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names.

144

IBM Systems Director Commands Reference

v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Removes the resource-monitor threshold from all systems in one or more specified groups, identified by name or ID. This list can be a mixture of names or IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -t | --type system_type Removes the resource-monitor threshold from all systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -T | --threshold {threshold_name}[,{threshold_name}...] Targets one or more thresholds names, separated by a comma. Tips: v The threshold names might not be unique. This command acts on all thresholds with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple thresholds with the same name. To target a threshold that has a name that is not unique, identify the threshold by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v The threshold names are not locale specific. v Use the lsresmonthresh command with no options to obtain a list of valid system threshold names.
Chapter 1. smcli

145

-v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Removes the resource-monitor threshold from one or more systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 50: A specified resource monitor is not valid. v 51: The specified threshold is not valid.

Examples
Remove a resource-monitor threshold This example illustrates how to remove the resource-monitor threshold MyCPUUtilization from the system named system1.
smcli rmresmonthresh -T MyCPUUtilization -m "[Director Agent][CPU Monitors] [CPU Utilization]" -n system1

Resource-monitor recording commands


The smcli resource-monitor recording commands record, delete, stop, and list resource-monitor recordings.

smcli commands
These smcli resource-monitor recording commands are available:

146

IBM Systems Director Commands Reference

lsresmonrec Use the lsresmonrec command to list information about previously configured resource-monitor recordings. mkresmonrec Use the mkresmonrec command to record resource-monitor values. rmresmonrec Use the rmresmonrec command to delete one or more resource-monitor recordings. stopresmonrec Use the stopresmonrec command to stop recording resource-monitor values.

lsresmonrec command
Use the lsresmonrec command to list information about previously configured resource-monitor recordings.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsresmonrec options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsresmonrec [-h | -? | --help] [-L language] smcli lsresmonrec [-L language] [-v] [-l] [-V] [-S time] [-t system_type] [-w query | -i ip_address_list | -N group_list | -n system_list] [-m monitor] [[-r] recording_list] smcli lsresmonrec [-L language] [-v] [{-F format} {[-r] record_name}]

Description
If a recording name is not specified, this command lists information about all recordings. You can view the recorded values using the -V | --view option. You can view details of each recording using the -l | --long option. If you do not specify a display option, only record names are listed.

Operands
This command optionally uses a list of recording names as an operand. The list can optionally be preceded by the -r | --record option. Tip: If you specify the -F | --format option, you must specify the -r | --record option.

Flags
-F | --format {csv | txt | html | xml} Lists recording information in the specified format. -h | -? Displays the syntax and a brief description of the command.

Chapter 1. smcli

147

Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Displays all recordings for one or more systems, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -l | --long Displays detailed information about the specified recording. Tip: This option does not display the recorded values. To display recorded values, use the -V | --view option. This option lists these attributes for each recording: v System name: The name of the system on which the recording was made. v Record name: The name of the recording. This name might not be unique. v Attribute: The attribute of the recording. v Start time: The time when the recording was started v Stop time: The time when the recording was stopped. v Duration: The amount of time in which the recording was completed. -L | --lang language Specifies the language to use for the command.

148

IBM Systems Director Commands Reference

The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -m | --monitors {monitor_name} Targets the recording that is associated with the specified resource monitor. Resource monitors are made up of levels. The lowest-level submonitor (for example, [Process Count]) is called the monitor data. Higher-level monitors (for example, [Director Agent] and [Director Agent][CPU Monitors]), are called monitor paths. You must specify the full monitor path and data with this command (for example, [Director Agent][CPU Monitors][Process Count]). Tips: v You can use the lsresmon command to list resource-monitor names. v The monitor name can be locale specific. The name specified must match the locale being used by the command line interface. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Displays all recordings for one or more systems, specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not

Chapter 1. smcli

149

unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Displays all recordings for all systems in one ore more specified groups, identified by name or ID. The list can be a mixture of system group names and IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -r | --record {recording_name}[,{recording_name}...] Targets one or more specified recordings, separated by a comma. Tip: v If you specify the -V | --view option, you can specify only one recording name because the output might be very long. v The recording name is unique for a system or group. v Use lsresmonrec command with no options to list all recording names. v The system names are not locale specific. -S | --start time Lists recording with that started at the specified time, using the format yyyy-mm-dd:hh:mm:ss, where: v yyyy: 4-digit year v mm: Full name of the month v dd: 2-digit day v hh: 2-digit hour v mm: 2-digit minutes v ss: 2-digit seconds -t | --type system_type Displays all recordings for all systems of the specified type.

150

IBM Systems Director Commands Reference

The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -V | --view Displays recording values for the specified recordings. -w | --where "query" Displays all recordings for one or more systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 50: A specified resource monitor is not valid. v 53: A recording could not be found.

Examples
1. List all recording on a system

Chapter 1. smcli

151

This example illustrates how to list all the recordings that have been done on the system name system1.
smcli lsresmonrec -n system1 CPUUtilization

2. List detailed information about a recording This example illustrates how to list detailed information about the recording named CPUUtilization.
smcli lsresmonrec -l -r CPUUtilization System name = system1 Record name = CPUUtilization Attribute = CPUUtilization Start time = November 10, 2007 1:04:59 PM Stop time = November 10, 2007 1:14:58 PM Duration = 10 minute(s)

3. List recorded values This example illustrates how to lists recorded values of the recording named CPUUtilization.
smcli lsresmonrec -V CPUUtilization System name = system1 Record name = CPUUtilization Attribute = CPUUtilization Start time = November 10, 2007 1:04:59 PM Stop time = November 10, 2007 1:14:58 PM Sampling Rate = 5000 msecs Recorded values Date November 10, 2006 November 10, 2006 November 10, 2006 ... November 10, 2006 Time 1:05:02 PM 1:05:07 PM 1:05:12 PM 1:14:57 PM Data 20.6 19.3 19.3 18.4

4. Export recording a in XML format This example illustrates how to export recorded values of the recording named CPUUtilization into a file named CPUUtilization.xml.
smcli lsresmonrec CPUUtilization CPUUtilization -F xml > CPUUtilization.xml

mkresmonrec command
Use the mkresmonrec command to record resource-monitor values.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] mkresmonrec options For information about the options listed above that are specific to smcli, enter smcli -?. smcli mkresmonrec [-h | -? | --help] [-L language] smcli mkresmonrec [-L language] [-v] {-d duration} {-m monitor_list} [-t system_type] {-w query | -i ip_address_list | -N group_list | -n system_list} {[-r] new_record_name}

Description
Values are recorded approximately every 5 seconds.

152

IBM Systems Director Commands Reference

Operands
This command uses the name of the new resource-monitor recording as an operand. The recording can optionally be preceded by the -r | --record option.

Flags
-d | --duration duration Stops recording after the specified number of minutes. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Records resource monitors on one or more systems, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported:
Chapter 1. smcli

153

v v v v v v v v v v

de: German en: English es: Spanish fr: French it: Italian ja: Japanese ko: Korean pt_BR: Brazilian Portuguese zh_CN: Simplified Chinese zh_TW: Traditional Chinese

Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -m | --monitors {monitor_name}[,{monitor_name}...] Records value for one or more specified resource monitors, separated by a comma. Resource monitors are made up of levels, for example [Director Agent][CPU Monitors][Process Count]. [Director Agent] is a top-level resource monitors, and [Director Agent][CPU Monitors][Process Count] is a lower-level submonitor. For this command, you must specify a submonitor. Tips: v You can use the lsresmon command to list resource-monitor names. v The monitor name can be locale specific. The name specified must match the locale being used by the command line interface. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Records resource monitors on one or more systems, specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection.

154

IBM Systems Director Commands Reference

v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Records resource monitors on all systems in one ore more specified groups, identified by name or ID. The list can be a mixture of system group names and IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -r | --record record_name Create the new resource-monitor recording with the specified name. -t | --type system_type Records resource monitors on all systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Records resource monitors on one or more systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
Chapter 1. smcli

155

"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 50: A specified resource monitor is not valid.

Examples
Create a new recording This example illustrates how to record the CPU Utilization resource monitor on the system named system1 for 10 minutes, and names the recording NewRecord.
smcli mkresmonrec -d 10 -m "[Director Agent][CPU Monitor][CPU Utilization]" -r "NewRecord" -n system1

rmresmonrec command
Use the rmresmonrec command to delete one or more resource-monitor recordings.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] rmresmonrec options For information about the options listed above that are specific to smcli, enter smcli -?. smcli rmresmonrec [-h | -? | --help] [-L language] smcli rmresmonrec [-L language] [-v] [-c] [-S time] [-t system_type] {-w query | -i ip_address_list | -N group_list | -n system_list] [-m monitor] {[-r] recording_list}

Description
None

156

IBM Systems Director Commands Reference

Operands
This command uses a resource-monitor recording list as an operand. The resource monitor list can optionally be preceded by the -r | --record option.

Flags
-c | --confirm Prompts for confirmation to proceed if multiple resource-monitor recordings are targeted. Tips: v If this option targeted, this v If this option targeted, this

is not specified and multiple resource-monitor recordings are command proceeds without prompting. is specified and only one resource-monitor recording is command proceeds without prompting.

-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Deletes recordings for one or more systems, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific.

Chapter 1. smcli

157

v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -m | --monitors {monitor_name} Targets the recording that is associated with the specified resource monitor. Resource monitors are made up of levels, for example [Director Agent][CPU Monitors][Process Count]. [Director Agent] is a top-level resource monitors, and [Director Agent][CPU Monitors][Process Count] is a lower-level submonitor. For this command, you must specify a submonitor. Tips: v You can use the lsresmon command to list resource-monitor names. v The monitor name can be locale specific. The name specified must match the locale being used by the command line interface. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Deletes recordings for one or more systems, specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\).

158

IBM Systems Director Commands Reference

Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Deletes recordings for all systems in one ore more specified groups, identified by name or ID. The list can be a mixture of system group names and IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -r | --record {recording_name}[,{recording_name}...] Targets one or more specified recordings, separated by a comma. If the recording name contains a comma, prefix the comma with a backslash (\). Tips: v The recording name is unique for a combination of system and monitor. v Use lsresmonrec command with no options to list all recording names. v The system names are not locale specific. -S | --start time Deletes recordings that were started at the specified time, using the format yyyy-mm-dd:hh:mm:ss, where: v yyyy: 4-digit year v mm: Full name of the month v dd: 2-digit day v hh: 2-digit hour v mm: 2-digit minutes v ss: 2-digit seconds
Chapter 1. smcli

159

-t | --type system_type Deletes recordings for all systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Deletes recordings for one or more systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 50: A specified resource monitor is not valid. v 53: A recording could not be found.

Examples
1. Remove a resource-monitor recording

160

IBM Systems Director Commands Reference

This example illustrates how to remove two resource-monitor recording both named ProcessCountRecording.
smcli rmresmonrec -c -r ProcessCountRecording Warning: Multiple thresholds are resolved. Do you want to continue (y/n): y

stopresmonrec command
Use the stopresmonrec command to stop recording resource-monitor values.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] stopresmonrecoptions For information about the options listed above that are specific to smcli, enter smcli -?. smcli stopresmonrec [-h | -? | --help] [-L language] smcli stopresmonrec [-L language] [-v] [-c] [-m monitor] [-S time] [-t system_type] {-w query | -i ip_address_list | -N group_list | -n system_list] {[-r] recording_list}

Description
None.

Operands
This command uses a list of recording names as an operand. The list can optionally be preceded by the -r | --record option.

Flags
-c | --confirm Prompts for confirmation to proceed if multiple resource-monitor recordings are targeted. Tips: v If this option is not specified and multiple resource-monitor recordings are targeted, this command proceeds without prompting. v If this option is specified and only one resource-monitor recording is targeted, this command proceeds without prompting. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored.

Chapter 1. smcli

161

v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Stops recording values for one or more systems, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed.

162

IBM Systems Director Commands Reference

-m | --monitors {monitor_name} Targets the recording that is associated with the specified resource monitor. Resource monitors are made up of levels, for example [Director Agent][CPU Monitors][Process Count]. You can specify any top-level resource monitors (for example, [Director Agent]) or lower-level submonitors (for example, [Director Agent][CPU Monitors][Process Count]). If you specify a top-level monitor, all lower-level submonitors are also targeted. Tips: v You can use the lsresmon command to list resource-monitor names. v The monitor name can be locale specific. The name specified must match the locale being used by the command line interface. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Stops recording values for one or more systems, specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Stops recording values for all systems in one ore more specified groups, identified by name or ID. The list can be a mixture of system group names and IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks..
Chapter 1. smcli

163

Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -r | --record {recording_name}[,{recording_name}...] Targets one or more specified recordings, separated by a comma. If the recording name contains a comma, prefix the comma with a backslash (\). Tips: v The recording name is unique for a combination of system and monitor. v Use lsresmonrec command with no options to list all recording names. v The system names are not locale specific. -S | --start time Stops recording that were started at the specified time, using the format yyy-mm-dd:hh:mm:ss, where: v yyyy - 4-digit year v mm - Full name of the month v dd - 2-digit day v hh - 2-digit hour v mm - 2-digit minutes v ss - 2-digit seconds -t | --type system_type Stops recording values for all systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Stops recording values for one or more systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified.

164

IBM Systems Director Commands Reference

Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 29: The specified locale is not valid or not supported. v 50: A specified resource monitor is not valid. v 53: A recording could not be found.

Examples
1. Stop recording a resource monitor This example illustrates how to stop the recording named CPURecording running.
smcli stoptresmonrec -r CPURecording

Process monitor commands


Use the commands in this section to manage processes and process monitors.

smcli commands
These smcli process monitor commands are available: lsps Use the lsps command to list the processes that are available on the specified system.

mkpmtask Use the mkpmtask command to create a new process-monitor task. rmpmtask Use the rmpmtask command to delete a process-monitor task.

lsps command
Use the lsps command to list the processes that are available on the specified system.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsps options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsps [-h | -? | --help] [-L language]

Chapter 1. smcli

165

smcli lsps [-L language] [-v] {-T process_type} {-i ip_address | -n system} [-A attribute_list | -l] [-f file_name | [-p] process_list]

Description
Processes are specific to particular process type. This command takes a process type and system name as required options to list specific types of processes. If you do not specify a display option (-l | --long or -A | --attribute), this command lists all processes of the specified type.

Operands
This command uses a list of processes as an operand. The list can optionally be preceded by the -p | --process option.

Flags
-A | --attribute key[,key ... ] Displays values for one or more specified process attributes, where key is the attribute key. The keys are separated with commas. You can specify the following attribute keys, depending on the specified process type:
Key Name ProcessID User ThreadCount Priority MemoryUsage CPUTime Monitored Data type string long string integer integer long string boolean Description Name of the application, service, or device-service (Applications only) Process identifier of the application (Applications only) Name of the user running the application (Applications only) Application thread count (Applications only) Application priority (Applications only) Application memory usage (Applications only) Processor time (Applications only) Flag indicating whether the process is monitored. Possible values are true if the process is monitored and false if the process is not monitored. (Services and device services only) Status of the service or device service (Services only) Description of the service

ServiceStatus Description

string string

-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of processes names, separated by commas or line breaks.

166

IBM Systems Director Commands Reference

-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name} Lists processes that are available on a system, specified by IP address or host name. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -l | --long Displays detailed information about the targeted processes or targeted process type. If a process type is targeted, information is displayed for all processes of that type. See the -A | --attribute option for a list of attributes that are displayed. The list is different for each process type. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish
Chapter 1. smcli

167

v v v v v v v

fr: French it: Italian ja: Japanese ko: Korean pt_BR: Brazilian Portuguese zh_CN: Simplified Chinese zh_TW: Traditional Chinese

Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {resource_oid | resource_name} Lists processes that are available on a system, specified by name or ID. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -p | --process {process_name}[,{-process_name}...] Targets one or more process names, separated by a comma. Possible values are: v Applications v Services v DeviceServices Tips: v If the processes name contains a space, enclose it in double quotation marks. v Use lsps command with -p | --process and -n | --names options to list all process names specific to particular process-type.

168

IBM Systems Director Commands Reference

-T | --processtype {process_type} Targets one or more processes of the specified type. You can specify one of these types: v Applications: Program applications, which might be interactive v Services: IBM Systems Director services on systems v DeviceServices: Noninteractive programs with which high-level applications can perform various functions (for example, I/O drivers running on a system as support programs for application suites that perform word-processing, database, and print functions). -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 25: A number-formatting error occurred. v 27: A specified attribute is not valid. v 29: The specified locale is not valid or not supported. v 50: The specified process type is not valid. v 51: The specified application is not valid. v 52: The specified service is not valid. v 53: The specified device service is not valid.

Examples
1. List all applications running on a system This example illustrates how to list all application processes running on the system named system_1.
smcli lsps -T Applications -n system_1

2. List detailed information about multiple processes This example illustrates how to list detailed information about the service processes listed in the c:\services.txt file and running on the system named system_1.
smcli lsps -l -T Services -f c:\services.txt -n system_1

mkpmtask command
Use the mkpmtask command to create a new process-monitor task.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] mkpmtask options For information about the options listed above that are specific to smcli, enter smcli -?. smcli mkpmtask [-h | -? | --help] [-L language] smcli mkpmtask [-L language] [-v] {-f file_name}

Chapter 1. smcli

169

smcli mkpmtask [-L language] [-v] {-P path [+S | +s] [+E | +e] [+F | +f seconds]}... {task}

Description
This command creates a process-monitor task, but does not start monitoring the specified process on a system. Use the runtask command to start monitoring a process.

Operands
This command uses a process-monitor task as an operand. This command creates a process-monitor task with the specified name.

Flags
+E | +e Specifies that the process-monitor task is to generate an event when it ends. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of process-monitor tasks to create, separated by a line break. Specify the data using this format:
task_name:"path" [+S | +s] [+E | +e] [+F | +f seconds]

+F | +f seconds Specifies that the process-monitor task is to generate an event if it does not start correctly or if it fails after the specified number of seconds. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish

170

IBM Systems Director Commands Reference

v v v v v v v

fr: French it: Italian ja: Japanese ko: Korean pt_BR: Brazilian Portuguese zh_CN: Simplified Chinese zh_TW: Traditional Chinese

Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -P | --path path Specifies the fully-qualified path and executable file name of the application that you want to monitor. +S | +s Specifies that the process-monitor task is to generate an event when it starts. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported.

Examples
1. Create a process-monitor task using an input file This example illustrates how to create a process-monitor task using an input file named tasks.txt.
smcli mkpmtask -f tasks.txt

The tasks.txt file might contain this output:


"Notepad monitor1":"c:\windows\notepad.exe"+S+F5 "Notepad monitor2":"c:\winnt\notepad.exe"

2. Create a process-monitor task This example illustrates how to create a process-monitor task named Notepad monitor that monitors the application located in c:\winnt\notepad.exe and generates an event when the monitor is started and if it fails after 5 seconds. Then, it verifies that the task has been created using the lstask command.
smcli mkpmtask -P "c:\winnt\notepad.exe" +S +F 5 "Notepad monitor" smcli lstask -l "Notepad monitor"

3. Run a process-monitor task


Chapter 1. smcli

171

This example illustrates how to start the process-monitor task named Notepad monitor.
smcli runtask -n system_1 "Notepad monitor"

rmpmtask command
Use the rmpmtask command to delete a process-monitor task.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] rmpmtask options For information about the options listed above that are specific to smcli, enter smcli -?. smcli rmpmtask [-h | -? | --help] [-L language] smcli rmpmtask [-L language] [-v] {-f file_name | [-T] task_list}

Description
None

Operands
This command uses a list of process-monitor tasks as an operand. The list can optionally be preceded by the -T | --tasks option.

Flags
-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of process-monitor tasks to be deleted, separated by a comma or line break. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command.

172

IBM Systems Director Commands Reference

-L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -T | --tasks {task_oid | task_id_string | task_title}[,{task_oid | task_id_string | task_title}...] Removes one or more process-monitor tasks, specified by title, unique ID or ID string. The list can be a mixture of titles, IDs and ID strings, separated by a comma. The list is delimited by the end-of-line character when read from a file. task_oid The unique ID of the task, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lstask -o -r command to list all task IDs that are valid for the targeted system. task_id_string The unique ID string of the task, prefixed with a percent sign (%) (for example, %BladeServerCfgTask). If the string ID contains a comma, prefix the comma with a backslash (\). Tip: You can use the lstask -I command to list all task ID strings that are valid for the targeted system. task_title The title of the task. The task title must be fully qualified with the parent task (for example, grandparent_task_title/parent_task_title/task_title). If the task name contains a comma, prefix the comma with a backslash (\). Enclose the task title in quotation marks if it contains a space character. Tips: v Task names might not be unique. This command acts on all tasks with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple tasks with the same name. To
Chapter 1. smcli

173

target a task that has a name that is not unique, identify the task by specifying its unique, hexadecimal task ID, or use additional target options to refine the selection. v Locale-specific task names might not exist for every noninteractive task. The name specified must match the locale being used by the command line interface. v Use the lstask -r command to list all tasks that are valid for the targeted system. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 22: A specified task is not valid. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported.

Examples
1. Remove a process-monitor task This example illustrates how to remove a process-monitor task named Notepad monitor from all systems to which it has been applied.
smcli rmpmtask -T "Notepad monitor"

Event and event automation plan commands


Use the automation commands to managed automation plans, event filters, event actions, event logs, and events. The following function is not available through the command-line interface. Use the IBM Systems Director Web interface instead. v Clearing events v Ignoring events

smcli commands
These smcli automation commands are available. Event, event log and event action history commands: evtlog Use the evtlog command to manage the size of the event log. genevent Use the genevent command to send a custom event to the event router on the management server for testing purposes. lsevtlog Use the lsevtlog command to list the contents of the event log (the events that have occurred). rmevtlog Use the rmevtlog command to remove entries from the event log.

174

IBM Systems Director Commands Reference

evtacthist Use the evtacthist command to manage the event-action history, including activating or deactivating the history collection and clearing the log. lsevtacthist Use the lsevtacthist command to display entries in the event-action history log that are associated with a specific event action or system. Event automation plan commands: chevtautopln Use the chevtautopln command to change an existing event-automation plan. evtautopln Use the evtautopln command to apply one or more systems and groups to or remove one or more systems and groups from one or more event-automation plans. You can also activate or deactivate an event-automation plan. lsevtautopln Use the lsevtautopln command to list information about event-automation plans. You can also export one or more event-automation plans to a file. mkevtautopln Use the mkevtautopln command to create a new event-automation plan or import one or more existing event-automation plans. rmevtautopln Use the rmevtautopln command to delete one or more event-automation plans. Event action commands: lsevtact Use the lsevtact command to display information about available event actions or event-action types. mkevtactemail Use the mkevtactemail command to create a customized event action that sends an e-mail over the Internet (SMTP) or to a mobile phone. mkevtactstpgm Use the mkevtactstpgm command to create a customized event action that starts a program. mkevtactsttask Use the mkevtactsttask command to create a customized event action that starts a noninteractive task. rmevtact Use the rmevtact command to remove customized event actions. testevtact Use the testevtact command to test customized event actions. Event filter commands: lsevttype Use the lsevttype command to list all event types.

Chapter 1. smcli

175

lsevtfltr Use the lsevtfltr command to display information about the event filters. If you do not specify any display options, this command lists the names of all event filters. rmevtfltr Use the rmevtfltr command to remove event filters.

dircli commands
Using the new smcli automation plan commands is recommended; however, the dircli event-action plan commands listed in the following table are supported in this release for compatibility with IBM Director version 5.20. Note that not all command options are supported in this release. For information about the dircli commands, see the commands reference in the IBM Director v5.20 information center at publib.boulder.ibm.com/infocenter/ eserver/v1r2/topic/diricinfo_5.20/ fqm0_r_dircli_event_action_plan_commands.html. Important: v You must enter dircli commands in lower case. v To use a dircli command with the same name as an smcli command, you must define the CLILEGACY environment variable and set it to a value of 1.
Table 4. Supported dircli commands dircli command applyeventactionplan Description and supported syntax Applies an event action (automation) plan to a system or group Syntax: applyeventactionplan plan [-s system_id_list] [-g group_id_list] createeventactionplan Creates an event action plan (now called an event automation plan) Syntax: createeventactionplan plan [-e filter action_list] Notes: v The -e option is used to specify an event filter in this release. v You can specify only one filter name in this release. mkevtautopln Equivalent smcli command evtautopln

176

IBM Systems Director Commands Reference

Table 4. Supported dircli commands (continued) dircli command listeventactionplans Description and supported syntax Lists all event action plans (now called an event automation plan) Syntax: listeventactionplans [{-r | -report} | {-t | -terse}] listeventactions Lists all of the available event actions Syntax: listeventactions [{-r | -report} | {-t | -terse}] listevents Lists the contents of the event log Syntax: listevents [{-r | -report} | {-t | -terse}] [-e filter] [-h hours] [system_id_list] Note: The -e option is used to specify an event filter in this release. listeventtypes Lists all of the event types Syntax: listeventtypes listfilters Lists information about event lsevtfltr filters Syntax: listfilters [{-r | -report} | {-t | -terse}] lsevttype lsevtlog lsevtact Equivalent smcli command lsevtautopln

Event, event log and event action history commands


Use the smcli event commands to generate events and manage the Event log and event action history, including listing and removing entries.

smcli commands
These smcli even, event log, and event action history commands are available: evtlog Use the evtlog command to manage the size of the event log. genevent Use the genevent command to send a custom event to the event router on the management server for testing purposes.

Chapter 1. smcli

177

lsevtlog Use the lsevtlog command to list the contents of the event log (the events that have occurred). rmevtlog Use the rmevtlog command to remove entries from the event log. evtacthist Use the evtacthist command to manage the event-action history, including activating or deactivating the history collection and clearing the log. lsevtacthist Use the lsevtacthist command to display entries in the event-action history log that are associated with a specific event action or system.

evtlog command
Use the evtlog command to manage the size of the event log.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] evtlog options For information about the options listed above that are specific to smcli, enter smcli -?. smcli evtlog [-h | -? | --help] [-L language] smcli evtlog [-L language] [-v] {-m | -M count | -s}

Description
When the maximum size is reached, the oldest entries are no longer stored. If you set the maximum size to a value smaller than the current size, the oldest entries are no longer stored.

Operands
This command optionally uses a system list as an operand. The list can optionally be preceded by the -n | --names option.

Flags
-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command.

178

IBM Systems Director Commands Reference

-L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -m | --maxsize Lists the current setting for the maximum size of event log. The size is defined by the number of entries in the log. -M | --setmaxsize count Changes the maximum number of log entries to the specified number. -s | --size count Displays the current size (number of log entries) of the event log. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported.

Examples
1. List the current maximum size of the event log This example illustrates how to list the current maximum size of the event log.
smcli evtlog -m

2. Set the maximum size of the event log This example illustrates how to set the maximum size of the event log to 1000 entries.
smcli evtlog -M 1000
Chapter 1. smcli

179

genevent command
Use the genevent command to send a custom event to the event router on the management server for testing purposes.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] accesssys options For information about the options listed above that are specific to smcli, enter smcli -?. smcli genevent [-h | -? | --help] [-L language] smcli genevent [-L language] [-v] {-D event_description} [-r key=value] [-g key=value] {-c category_list} {-p component_type} [-I component_instance] [-m mode] [-s severity] [-d condition_type] [-V "condition_value] [-i ip_address | -n system]

Description
The genevent command is useful for triggering event automation plans on the management server when it is not convenient to do so with agent-initiated activities. For example, you can simulate and fan event on the management server to verify that an event automation plan correctly triggers without having to cause an actual fan failure.

Operands
None

Flags
-c | --compcat category_list Specifies the system-component category for the event definition. The component category, type and instance define the total event type. Tip: Use the lsevttype -l command to list the system-component categories. -d | --condtype condition_type Specifies the type of condition that triggered the event. Tip: Use the lsevttype -l command to list the condition types. -D | --description event_description Specifies a text description for the event. If the description contains spaces, enclose it in quotation marks. -g | --integer key=value Sets the value of an integer attribute, where key is the attribute name and value is an integer value for that attribute. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored.

180

IBM Systems Director Commands Reference

--help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name} Targets a system, specified by IP address or host name. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -I | --compinstance component_instance Specifies the instance (index) of the system-component type when multiple instances of that type exists in on a system (for example, if the system has more than one fan). Tip: Use the lsevttype -l command to list the system-component instance. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese
Chapter 1. smcli

181

Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_id | system_name} Targets a system specified by name or ID. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -m | --mode {alert | resolution} Specifies the mode of the event. Possible values are: v Alert: A problem has occurred. v Resolution: A problem has been resolved and is no longer a problem. -p | --comptype component_type Specifies the type of system component that is the focus of the event (for example, a disk or fan). Tip: Use the lsevttype -l command to list the system-component types. -r | --string key=value Sets the value of an string attribute, where key is the attribute name and value is the string value for that attribute. -s | --severity {0 | 1 | 2 | 3 | 4 | 5 } Specifies the severity level for the event. Possible values are: v 0: Fatal. The source of the event has already caused the program to fail and should be resolved before the program is restarted. v 1: Critical. The source of the event might cause program failure and should be resolved immediately.

182

IBM Systems Director Commands Reference

v 2: Minor. The application that issued the event has assigned a severity level indicating that the source of the event should not cause immediate program failure, but should be resolved. v 3: Warning. The source of the event might not be problematic but warrants investigation. v 4: Harmless. The event was generated only for informational purposes. Most events of this severity do not indicate potential problems. v 5: Unknown. The application that generated the event did not assign a severity level; however, these events might indicate potential problems. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -V | --condvalue condition_value Specifies the value that triggered the event.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 27: A specified attribute is not valid. v 29: The specified locale is not valid or not supported.

Examples
Generate an event This example illustrates how to simulate a processor failure on the system named system1.
genevent -D "device processor event" -c Device -p Processor -I 1 -n system1

lsevtlog command
Use the lsevtlog command to list the contents of the event log (the events that have occurred).

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsevtlog options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsevtlog [-h | -? | --help] [-L language] smcli lsevtlog [-L language] [-v] [-e event_filter] [-T hours] [-o | -p | -s | -l] [-t system_type | -f file_name | -w query | -i ip_address_list | [-n] system_list]

Description
If no options are specified, this command lists all events that have occurred in the past 24 hours.

Chapter 1. smcli

183

If no system is specified, this command lists information about all events that have been recorded on the management server, including the date and time of the event, event text, source of the event, event type (which contains information about the component category, component type, component instance, condition type, and condition value), event severity, and event category. If the -s | --summary option is specified, this command displays a summary of event types that have occurred and on which system they occurred. If the -l | --long or -s | --summary option is not specified, this command displays summarized information by default.

Operands
This command uses a system list as an operand. The list can optionally be preceded by the -n | --names option.

Flags
-e | --eventfilter {filter_oid | filter_name} Lists the log entries that match the event filter, specified by name or ID. filter_oid The unique ID of the event filter, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lsevtfltr -o command to list the event-filter IDs. filter_name The name of the event filter. If the name contains a comma, prefix the comma with a backslash (\). Tips: v Event-filter names might not be unique. This command acts on all event filters with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple event filters with the same name. To target an event filter that has a name that is not unique, identify the event filter by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v The event-filter name can be locale specific. The name specified must match the locale being used by the command line interface. v You can use the lsevtfltr command without any options to list the event-filter names. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of system. This list can be a mixture of names and IDs, separated by a comma or end-of-line character.

184

IBM Systems Director Commands Reference

Tip: You can use the lsevtlog -p with other options to get the desired long-entry IDs and pipe them into another command. For example, to remove log entries with informational events:
smcli lsevtlog -e "Informational Events" -p | smcli rmevtlog -f -

-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Display the events that have occurred on the specified systems, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -l | --long Displays detailed information about the event log. This option returns these attributes for each event log entry: v Date: The date and time on which the event was generated. v Resource Name: Target system on which the event occurred. v Event Type: The type of event that was generated. The event types are categorized by hardware, device, or software.
Chapter 1. smcli

185

v Component Category: The system-component category for the event definition. The component category, type and instance define the total event type. v Component Type: The type of system component that is the focus of the event (for example, a disk or fan). v Component Instance: The index of the system-component type when multiple instances of that type exists in on a system, for example, if the system has more than one fan. v Event Category: The mode of the event. Possible categories are: Alert: A problem has occurred. Resolution: A problem has been resolved and is no longer a problem. v Event Severity: The severity level of the event, which identifies potentially urgent problems requiring immediate attention. Possible severities are: Fatal: The source of the event has already caused the program to fail and should be resolved before the program is restarted. Critical: The source of the event might cause program failure and should be resolved immediately. Minor: The application that issued the event has assigned a severity level indicating that the source of the event should not cause immediate program failure, but should be resolved. Warning: The source of the event might not be problematic but warrants investigation. Informational: The event was generated only for informational purposes. Most events of this severity do not indicate potential problems; however, offline events are categorized as informational, and these events might indicate potential problems. Unknown: The application that generated the event did not assign a severity level. v Event Sender: The system that sent the event to IBM Systems Director Server. For example, SNMP events list the IP address of the trap source. Because most events are generated by IBM Systems Director Server, this field usually contains the name of the management server. v Family: The equivalent IBM Director v5.20 component category for the event definition. The family plus the qualifiers define the total event type. v Qualifiers: The equivalent IBM Director v5.20 qualifiers for the event definition. The family plus the qualifiers define the total event type. v Text: The cause of the event. In some cases, such as SNMP traps, not text is available. v Condition Type: The type of condition that triggered the event. v Condition Value: The value that triggered the event. v Details: Additional information about the event. This information varies depending on the type of event that occurred. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese

186

IBM Systems Director Commands Reference

Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Display the events that have occurred on the specified systems, identified by name or ID. The list can be a mixture of system names and ID, separated by a comma. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -o | -oid Displays the unique IDs associated with the event-log entries in addition to other information. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x3e). Tip: This option cannot be used with the -p | --pipe option. -p | --pipe Displays the unique IDs for the event-log entries instead of the name. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x35). Tip: v When used alone, this option enables the output to be piped to other smcli commands. v This option cannot be used with the -o | --oid options. -s | --summary Displays summarized information about the event log, including: v Date: The date and time on which the event was generated. v Resource Name: Target system on which the event occurred.
Chapter 1. smcli

187

v Event Type: The type of event that was generated. The event types are categorized by hardware, device, or software. v Event Severity: The severity level of the event, which identifies potentially urgent problems requiring immediate attention. Possible severities are: Fatal: The source of the event has already caused the program to fail and should be resolved before the program is restarted. Critical: The source of the event might cause program failure and should be resolved immediately. Minor: The application that issued the event has assigned a severity level indicating that the source of the event should not cause immediate program failure, but should be resolved. Warning: The source of the event might not be problematic but warrants investigation. Informational: The event was generated only for informational purposes. Most events of this severity do not indicate potential problems; however, offline events are categorized as informational, and these events might indicate potential problems. Unknown: The application that generated the event did not assign a severity level. v Event Category: The mode of the event. Possible categories are: Alert: A problem has occurred. Resolution: A problem has been resolved and is no longer a problem. -t | --type system_type Narrows the specified targeted systems to all systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -T | --time hours Lists the events that have occurred within the number of hours specified. Tip: The number specified must be a nonnegative integer. Decimals and fractions are not supported. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

188

IBM Systems Director Commands Reference

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 20: A specified system is not valid. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 50: The specified event-filter name or ID is not valid. v 51: The specified time is not valid.

Examples
1. List all fatal events that occurred in the previous 8 hours This example illustrates how to list all fatal events that occurred in the previous 8 hours.
smcli lsevtlog -e "Critical Events" -T 8 8/21/07 5:07 PM, CPU usage critical, CS192.168.0.101(0x6A), Director.usms.cpu.usage, Critical-Alert 8/21/07 6:08 PM, Memory usage critical, CS192.168.0.101(0x6A), Director.usms.memory.usage, Critical-Alert 8/21/07 7:08 PM, Memory usage critical, CS9.56.145.171(0x68), Director.usms.memory.usage, Critical-Alert 8/21/07 7:28 PM, CPU usage critical, WEBSRV1(0x69), Director.usms.cpu.usage, Critical-Alert 8/21/07 8:08 PM, Memory usage critical, WEBSRV1(0x69), Director.usms.memory.usage, Critical-Alert

2. List all event types that have been recorded This example illustrates how to list all events that have been recorded in the event log in the past 24 hours.
smcli lsevtlog -o 8/21/07 5:07 PM, CPU usage warning, CS192.168.0.101(0x6A), Director.usms.cpu.usage, Warning-Alert, 0x20 8/21/07 6:08 PM, Memory usage critical, CS192.168.0.101(0x6A), Director.usms.memory.usage, Critical-Alert, 0x22 8/21/07 7:08 PM, Memory usage critical, CS9.56.145.171(0x68), Director.usms.memory.usage, Critical-Alert, 0x23 8/21/07 7:28 PM, CPU usage warning, WEBSRV1(0x69), Director.usms.cpu.usage, Warning-Alert, 0x24 8/21/07 8:08 PM, System: WEBSRV1 is offline, WEBSRV1(0x69), Director.usms.topology.offline, Harmless-Alert , 0x25 8/21/07 9:08 PM, Memory usage critical, CS9.56.145.171(0x68), Director.usms.memory.usage, Critical-Alert, 0x26 8/21/07 9:28 PM, CPU usage warning, WEBSRV1(0x69),
Chapter 1. smcli

189

Director.usms.cpu.usage, Warning-Alert, 0x27 8/21/07 10:08 PM, Memory usage critical, WEBSRV1(0x69), Director.usms.memory.usage, Critical-Alert, 0x28

3. List detailed information about all events that occurred on a system within the last hour This example illustrates how to list detailed information about all events that occurred within the last hour on the system with ID 0x32f.
smcli lsevtlog -olT 1 0x32f 8/21/07 5:07 PM, User MySystemme () logged off server from xxxxx.mycompany.com, MySystem(0x32f), Director.Console.User.Logoff, Informational-Alert, ID: 0x20 Event Type:Director.Console.User.Logoff Component Category (0):Director.Console Component Category (1):User Component Type: Logoff Component Instance: Family: Director Qualifier (0): Console Qualifier (1): User Qualifier (2): Logoff Date:8/21/0707 4:20:55 PM EST Text: User MySystemme () logged off server from xxxxx.mycompany.com System: MySystem, ID:0x32f Severity: Informational Category: Alert Sender: MySystem Condition Type: User active Condition Value: false Details: 8/21/07 5:07 PM, Monitor CPU High Warning: CPU Utilization has been above or equal to 80 for 0:05:00. Value reported is 100, nMySystem(0x32f), Director.CPUMonitors.Utilization, Warning-Alert, ID: 0x40 Event Type:Director.CPUMonitors.Utilization Component Category (0):Director Component Category (1):CPUMonitor Component Type: Utilization Component Instance: Family: Director Qualifier (0): CPUMonitors Qualifier (1): Utilization Date: December 14, 2006 4:04:56 PM ESTE Text: Monitor CPU High Warning: CPU Utilization has been above or equal to 80 for 0:05:00. Value reported is 100 System: MySystem, ID:0x23f Severity: Warning Category: Alert Sender: MySystem Condition Type: Utilization Alert Condition Value: 80 Details: CPU Utilization=90.

4. List summarized information about all events that occurred within the last 24 hours This example illustrates how to list summarized information about all events that occurred within the last 24 hours.
smcli lsevtlog -s System1 Warning: Director.Director Agent.CPU Monitors.CPU Utilization.High Warning: Harmless: Director.Topology.Offline: 5

190

IBM Systems Director Commands Reference

Director.Topology.Online: System2 Harmless: Director.Topology.Offline: Director.Topology.Online:

3 8

rmevtlog command
Use the rmevtlog command to remove entries from the event log.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] rmevtlog options For information about the options listed above that are specific to smcli, enter smcli -?. smcli rmevtlog [-h | -? | --help] [-L language] smcli rmevtlog [-L language] [-v] {-a | -f file_name | [-e] entry_list}

Description
None

Operands
This command uses a list of even-log entry IDs as an operand. The list can optionally be preceded by the -e | --eventlog option.

Flags
-a | --all Clears all entries in the event log. -e | --eventlog {entry_oid}[,{entry_oid}...] Clears one or more event-log entries, identified by its unique ID, separated by a comma. Tips: v The unique ID of the event-log entry must be specified as a hexadecimal value prefixed with 0x (for example, 0x37). v You can use the lsevtlog command to list the event-log entry IDs. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of event-log entry IDs, separated by a comma or end-of-line character. -h | -? Displays the syntax and a brief description of the command.

Chapter 1. smcli

191

Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -T | --time hours Lists the events that have occurred within the number of hours specified. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 50: The specified event-log entry ID is not valid.

192

IBM Systems Director Commands Reference

Examples
1. Remove multiple event-log entries This example illustrates how to remove entries with IDs 0x13 and 0x14 from the event log.
smcli rmevtlog -e 0x13,0x14

2. Remove a event-log entries based on specific criteria This example illustrates how to remove all entries for events that occurred in the last 3 hours from the event log.
smcli lsevtlog -T 3 -p | smcli rmevtlog -f -

3. Clear the event log This example illustrates how to remove all entries in the event log.
smcli rmevtlog -a

evtacthist command
Use the evtacthist command to manage the event-action history, including activating or deactivating the history collection and clearing the log.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] evtacthist options For information about the options listed above that are specific to smcli, enter smcli -?. smcli evtacthist [-h | -? | --help] [-L language] smcli evtacthist [-L language] [-v] {-c entry_list} smcli evtacthist [-L language] [-v] {-A | -D | -C} {-f file_name | [-x] action_list}

Description
You must specify the action you want to perform: v -A: Activate the collection of data v -D: Deactivate the collection of data v -C: Clear all the history logs v -c: Clear one or more history logs

Operands
This command uses an action list as an operand. The list can optionally be preceded by the -x | --action option.

Flags
-A | --activate Activates the collection of data about performed event actions. Note: This option cannot be used with any other options. -c | --clear {entry_oid}[,entry_oid...] Clears one or more log entries associated with the specified action in the action-history log. List one or more entry IDs, separated by a comma. The ID is a hexadecimal value prefixed with 0x (for example, 0x37).

Chapter 1. smcli

193

Note: You can use the lsevtacthist command to list the log-entry IDs. -C | --clearall Clears all log entries in the action-history log. -D | --deactivate Deactivates the collection of data about performed event actions. Note: This option cannot be used with the any other options. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of event actions. This list can be a mixture of names and IDs, separated by a command or end-of-line character. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country

194

IBM Systems Director Commands Reference

code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -x | --action {action_oid | action_name}[,{action_oid | action_name}...] Targets one or more event actions, specified by name or ID, to be activated, deactivated or cleared in the log. This list can be a mixture of names and IDs, separated by a comma. action_oid The unique ID of the event-action, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lsevtact -o command to list the event-action IDs. action_name The name of the event-action. If the name contains a comma, prefix the comma with a backslash (\). Tips: v If the name contains a comma, prefix the comma with a backslash (\). v If the name contains a space, enclose the name in quotation marks. v The event-action name can be locale specific. The name specified must match the locale being used by the command line interface. v You can use the lsevtact command without any options to list the event-action names.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 50: A specified event-action name or ID is not valid. v 60: The specified entry ID in the action-history log was not found.

Examples
1. Activate the collection of an event actions This example illustrates how to enable the collection of data about performed actions named E-Mail Admin and with ID 0x26.
smcli evtacthist -A "E-Mail Admin",0x26

2. Deactivate the collection of an event action This example illustrates how to disable the collection of data about performed actions with ID 0x26.
smcli evtacthist -D 0x26

3. Clear all entries in action-history log for a specific action


Chapter 1. smcli

195

This example illustrates how to clear entries in the action-history log associated with an action named E-Mail Admin.
smcli evtacthist -C "E-Mail Admin"

4. Clear entries in the action-history for multiple actions This example illustrates how to clear entries in the action-history log associated with entries IDs 0x11 and 0x013.
smcli evtacthist -c 0x11,0x13

lsevtacthist command
Use the lsevtacthist command to display entries in the event-action history log that are associated with a specific event action or system.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsevtacthist options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsevtacthist [-h | -? | --help] [-L language] smcli lsevtacthist [-L language] [-v] {-i ipaddress | -n system | [-x] action}

Description
Each log entry contains the following data: v Action Name and ID - The name and unique identifier for the event action. v History - The history status, which indicates whether the history is activated or deactivated. Possible values are active and inactive. v Log ID - The unique identifier for the log entry. v Date: The date and time on which the event was generated. v Action Launch Status - Event action launch status, which indicates whether the action is launched successfully. Possible values are successful and failed. v Event Type: The type of event that was generated. The event types are categorized by hardware, device, or software. v Event Category: The mode of the event. Possible categories are: Alert: A problem has occurred. Resolution: A problem has been resolved and is no longer a problem. v Event Severity: The severity level of the event, which identifies potentially urgent problems requiring immediate attention. Possible severities are: Fatal: The source of the event has already caused the program to fail and should be resolved before the program is restarted. Critical: The source of the event might cause program failure and should be resolved immediately. Minor: The application that issued the event has assigned a severity level indicating that the source of the event should not cause immediate program failure, but should be resolved. Warning: The source of the event might not be problematic but warrants investigation. Informational: The event was generated only for informational purposes. Most events of this severity do not indicate potential problems; however, offline events are categorized as informational, and these events might indicate potential problems. Unknown: The application that generated the event did not assign a severity level.

196

IBM Systems Director Commands Reference

v Event Sender: The system that sent the event to IBM Systems Director Server. For example, SNMP events list the IP address of the trap source. Because most events are generated by IBM Systems Director Server, this field usually contains the name of the management server. v Resource Name: Target system on which the event occurred. v Action Completion Status - Event action completion status, which indicates whether the action is run successfully. Possible values are successful, failed, and not performed. The not performed status is specific to three event actions: Modify an event and send it, Start a program on a system, and Start a task on a specified system. If you do not configure any modifications to make to an incoming event, the event is not resent and the event action status is considered not performed. For the latter two events, if the specified system cannot be found when the event action is invoked, then the action cannot be performed. v Action Completion Date - The date and time when the event action completed.

Operands
This command uses an event action name or ID as an operand. The name or ID can optionally be preceded by the -x | --action option.

Flags
-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name} Targets a system, specified by IP address or host name. Tip: You can use the IPv6 format to specify the IP address. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\)..
Chapter 1. smcli

197

Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name} Targets the event-action-history entries of the specified system, identified by name or ID. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection.

198

IBM Systems Director Commands Reference

v Use the lssys command without any options to list all system names. v The system names are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -a | --action {action_name | action_oid} Targets an event action, specified by name or ID. action_oid The unique ID of the event-action, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lsevtact -o command to list the event-action IDs. action_name The name of the event-action. If the name contains a comma, prefix the comma with a backslash (\). Tips: v If the name contains a comma, prefix the comma with a backslash (\). v If the name contains a space, enclose the name in quotation marks. v The event-action name can be locale specific. The name specified must match the locale being used by the command line interface. v You can use the lsevtact command without any options to list the event-action names.

Exit status
The following table contains the codes returned by this command v 0: The operation completed successfully. v 1: A usage error occurred. v 20: A specified system is not valid. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 50: A specified event-action name or ID is not valid.

Examples
1. List the action history of an action This example illustrates how to list the event-action-history entries for the action named "Add to the event log".
smcli lsevtacthist "Add to the event log" Action Name: Add to the Event Log, ID: 0x10 History: activated Log ID: 0x10, Date: Wed Mar 21 18:27:12 EDT 2007 Action Launch Status: Successful Event Type: family.usms.zero.one.two Event Category: Alert Event Severity: Critical Event Sender: server Resource Name: MySystem, ID: 0x17 Action Completion Status: Successful, Date: Wed Mar 21 18:27:12 EDT 2007 Log ID: 0x11, Date: Wed Mar 21 18:28:57 EDT 2007 Action Launch Status: Successful
Chapter 1. smcli

199

Event Type: family.usms.zero.one.two Event Category: Alert Event Severity: Critical Event Sender: server Resource Name: MySystem, ID: 0x17 Action Completion Status: Successful, Date: Wed Mar 21 18:28:57 EDT 2007

2. List the action history of a system This example illustrates how to list the event-action-history entries for the system with ID 0x56.
smcli lsevtacthist -n 0x56

Action Name: Run application to switch to backup Fan, ID: 0x66 History: activated Log ID: 0x10, Date: Wed Mar 31 18:27:12 EDT 2007 Action Launch Status: Successful Event Type: family.usms.fan.overheat. Event Category: Alert Event Severity: Critical Event Sender: server Resource Name: System1, ID: 0x56 Action Completion Status: Successful, Date: Wed Mar 31 18:27:15 EDT 2007 Action Name: eMail admin, ID: 0x98 History: enabled Log ID: 0x10, Date: Wed Mar 21 18:27:12 EDT 2007 Action Launch Status: Successful Event Type: family.usms.server.offline. Event Category: Alert Event Severity: Warning Event Sender: server Resource Name: System1, ID: 0x56 Action Completion Status: Successful, Date: Wed Mar 21 18:27:22 EDT 2007

Event automation plan commands


The smcli event automation plan commands create, delete, modify and list event automation plans.

smcli commands
These smcli event automation plan commands are available: chevtautopln Use the chevtautopln command to change an existing event-automation plan. evtautopln Use the evtautopln command to apply one or more systems and groups to or remove one or more systems and groups from one or more event-automation plans. You can also activate or deactivate an event-automation plan. lsevtautopln Use the lsevtautopln command to list information about event-automation plans. You can also export one or more event-automation plans to a file. mkevtautopln Use the mkevtautopln command to create a new event-automation plan or import one or more existing event-automation plans.

200

IBM Systems Director Commands Reference

rmevtautopln Use the rmevtautopln command to delete one or more event-automation plans.

chevtautopln command
Use the chevtautopln command to change an existing event-automation plan.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] chevtautopln options For information about the options listed above that are specific to smcli, enter smcli -?. smcli chevtautopln [-h | -? | --help] [-L language] smcli chevtautopln [-L language] [-v] [-e event_filter] [-D description] [-m new_name] [-p action_list | -r action_list] plan

Description
None.

Operands
This command uses an event-automation plan ID or name as an operand. The event-automation plan ID (plan_oid) or name (plan_name) identifies the plan being modified. plan_oid The unique ID of the event-action plan, specified as a hexadecimal value prefixed with 0x (for example, 0x3e). Tip: You can use the lsevtautopln -o command to list event-action plan ID values. plan_name The name of the event-action plan. Tips: v If the event-action plan name contains spaces or commas, enclose it in quotation marks. If the name contains a comma, prefix the comma with a backslash (\). v The event-action plan name can be locale specific. The name specified must match the locale being used by the command line interface. v You can use the lsevtautopln command without any options to list event-action plan names.

Flags
-D | --description {description_string} Add or replaces the description of the event-automation plan. If the description contains spaces, enclose it in double-quotation marks. -e | --eventfilter {filter_oid | filter_name} Replaces the existing event filters with the specified filter, identified by name or ID, in the event-automation plan.
Chapter 1. smcli

201

filter_oid The unique ID of the event filter, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lsevtfltr -o command to list the event-filter IDs. filter_name The name of the event filter. If the name contains a comma, prefix the comma with a backslash (\). Tips: v Event-filter names might not be unique. This command acts on all event filters with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple event filters with the same name. To target an event filter that has a name that is not unique, identify the event filter by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v The event-filter name can be locale specific. The name specified must match the locale being used by the command line interface. v You can use the lsevtfltr command without any options to list the event-filter names. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings.

202

IBM Systems Director Commands Reference

v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -m | --move {new_name} Renames the event-automation plan to the specified new name. -p | --addaction {action_name | action_oid}[, {action_name | action_oid}...] Adds one or more event actions, specified by name or ID, to the event-automation plan. This list can be a mixture of event-action names and IDs, separated by a comma. action_oid The unique ID of the event-action, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lsevtact -o command to list the event-action IDs. action_name The name of the event-action. If the name contains a comma, prefix the comma with a backslash (\). Tips: v If the name contains a comma, prefix the comma with a backslash (\). v If the name contains a space, enclose the name in quotation marks. v The event-action name can be locale specific. The name specified must match the locale being used by the command line interface. v You can use the lsevtact command without any options to list the event-action names. -r | --removeaction {action_oid | action_name}[, {action_oid | action_name}...] Removes one or more event actions, specified by name or ID, from the event-automation plan. This list can be a mixture of event-action names and IDs, separated by a comma. See -a | -addaction for a description of the action_oid and action_name arguments. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 50: A specified event-automation plan name or ID is not valid. v 51: The specified event filter name or ID was not found. v 52: The specified action list contains an action name or id that was not found. v 53: A specified action was not found in the specified plan. v 54: A specified action is already in the specified plan.
Chapter 1. smcli

203

v 55: Removing the specified action will result in a plan that contains no action, which is not allowed. A plan must have at least one action.

Examples
1. Change the description and replace the event filter for an event automation plan This example illustrates how to change the description to Check for only minor events, and replaces the event filter to MinorEvents for the event-automation plan named MyEventPlan.
smcli chevtautopln -D "Check for only minor events" -e MinorEvents MyEventPlan

2. Add multiple actions to an event automation plan using action IDs This example illustrates how to add actions with IDs 0x50 and 0x70 to the event-automation plan named MyEventPlan.
smcli chevtautopln -p 0x50,0x70 MyEventPlan

3. Remove multiple actions from an event automation plan using the action name and ID This example illustrates how to remove an action named Run Recovery Application and an action with ID 0x55 from the event-automation plan with ID 0x7f.
smcli chevtautopln -r "Run Recovery Application",0x55 0x7f

evtautopln command
Use the evtautopln command to apply one or more systems and groups to or remove one or more systems and groups from one or more event-automation plans. You can also activate or deactivate an event-automation plan.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] evtautopln options For information about the options listed above that are specific to smcli, enter smcli -?. smcli evtautopln [-h | -? | --help] [-L language] smcli evtautopln [-L language] [-v] [-D | -A] {-f file_name | [-P] plan_list} smcli evtautopln [-L language] [-v] {[-p] | -r} {-N group_list} {-f file_name | [-P] plan_list} smcli evtautopln [-L language] [-v] {[-p] | -r} [-N group_list] {-t system_type | -w query | -i ip_address_list | -n system_list} {-f file_name | [-P] plan_list}

Description
If you do not specify the -p | --apply or -r | --remove option, the event-automation plan is applied by default.

Operands
This command uses an event-automation plan list as an operand. The list can optionally be preceded by the -P | --plan option.

204

IBM Systems Director Commands Reference

Flags
-A | -activate Activates the specified event-automation plan. Tips: v This option cannot be used with the -D | --deactivate, -p | --apply, and -r | --remove options. v If you specify this option and the targeted plans are active, this command is considered successful and will return exit status 0. -D | --deactivate Deactivates the specified event-automation plan. Tips: v This option cannot be used with the -A | -activate, -p | --apply, and -r | --remove options. v If you specify this option and the targeted plans are already inactive, this command is considered successful and will return exit status 0. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of event-automation plans to be deleted. This list can be a mixture of plan names and IDs, separated by a command or end-of-line character. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more systems, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system.

Chapter 1. smcli

205

Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more systems specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. If the -n option is not specified, then a customized event action that starts a noninteractive task on the system on which the event occurred is created. If the -n option is specified, then a customized event action that starts a noninteractive task on a specified system is created.

206

IBM Systems Director Commands Reference

system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all systems in one or more specified groups that are identified by name or ID. The list can be a mixture of group names and IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -p | --apply Applies the one or more specified systems and groups to the targeted event-automation plans. Tip: This option cannot be used with the -A | -activate, -D | -deactivate, and -r | --remove options. -P | --plan {plan_oid | plan_name}[,{plan_oid | plan_name}...] Targets one or more event-automation plans, specified by name or ID. This list can be a mixture of plan names and ID, separated by a comma.
Chapter 1. smcli

207

plan_oid The unique ID of the event-action plan, specified as a hexadecimal value prefixed with 0x (for example, 0x3e). Tip: You can use the lsevtautopln -o command to list event-action plan ID values. plan_name The name of the event-action plan. Tips: v If the event-action plan name contains spaces or commas, enclose it in quotation marks. If the name contains a comma, prefix the comma with a backslash (\). v The event-action plan name can be locale specific. The name specified must match the locale being used by the command line interface. v You can use the lsevtautopln command without any options to list event-action plan names. -r | --remove Removes the specified event-automation plan from one or more specified systems and groups. Tip: This option cannot be used with the -p | --apply, -A | -activate, -D | -deactivate options. -t | --type system_type Narrows the specified targeted systems to all systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips:

208

IBM Systems Director Commands Reference

v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 50: A specified event-automation plan name or ID is not valid.

Examples
1. Apply an event-automation plan to multiple systems identified by host name This example illustrates how to apply the event-automation plan named Log Events to all systems with running Windows XP Professional v5.1.
smcli evtautopln -w "OSType=67 AND OSVersion=5.1" "Log Events"

2. Apply an event-automation plan to multiple systems identified by ID This example illustrates how to apply the event-automation plan with ID 0xfe to systems with IDs 0x52 and 0x34.
smcli evtautopln -pn 0x52,0x34 0xfe

3. Remove multiple groups of systems from an event-automation plan This example illustrates how to remove the event-automation plan named Log Events from systems with host names server1.ibm.com and server2.ibm.com.
smcli evtautopln -ri server1.ibm.com,server2.ibm.com "Log Events"

4. Disable an event-automation plan This example illustrates how to disable the event-automation plan named MyNewPlan.
smcli evtautopln -D MyNewPlan

lsevtautopln command
Use the lsevtautopln command to list information about event-automation plans. You can also export one or more event-automation plans to a file.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsevtautopln options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsevtautopln [-h | -? | --help] [-L language] smcli lsevtautopln [-L language] [-v] [-o | -p ] [-l] [-f file_name | -x action | -e event_filter | [-P] plan_list]
Chapter 1. smcli

209

smcli lsevtautopln [-L language] [-v] {-F format} {-f file_name | [-P] plan_list} {export_file}

Description
If no event-automation plans are specified, this command targets all plans. If no display options are specified, this command lists the names of all targeted event-automation plans.

Operands
This command uses a list of event-automation plans as an operand. If you specify the -F | --format option, this operand is required; otherwise, the operand is optional. The list can optionally be preceded by the -P | --plan option. This command also uses the name and full path of the export file in which the one or more event-automation plans are to be exported. This operand is required if you specify the -F | --format option.

Flags
-e | --eventfilter {filter_oid | filter_name} Lists the event-automation plans that contain the event filter, specified by name or ID. filter_oid The unique ID of the event filter, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lsevtfltr -o command to list the event-filter IDs. filter_name The name of the event filter. If the name contains a comma, prefix the comma with a backslash (\). Tips: v Event-filter names might not be unique. This command acts on all event filters with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple event filters with the same name. To target an event filter that has a name that is not unique, identify the event filter by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v The event-filter name can be locale specific. The name specified must match the locale being used by the command line interface. v You can use the lsevtfltr command without any options to list the event-filter names. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of event-automation plans. This list can be a mixture of names and IDs, separated by a comma or end-of-line character.

210

IBM Systems Director Commands Reference

-F | --format {ar | html | xml} Displays the output in the specified format, either archive (ar), HTML, or XML. Tips: v You can export the plan information by redirecting the output to a file. You can then use the file as input to other commands or to process by scripts. v If you specify this option, you must also specify one or more event-automation plans. v If you specify this option, you cannot specify the l | --long, -o | --oid, and -p | --pipe options are invalid. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -l | --long Displays detailed information about each event-automation plan. This option returns these attributes for each plan: v Plan name v Status v Event filters v Actions v Systems v Time range v Description -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips:

Chapter 1. smcli

211

v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -o | -oid Displays the unique IDs associated with the targeted event-automation plans. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x3e). Tip: This option cannot be used with the -p | --pipe option. -p | --pipe Displays the unique IDs for the targeted event-automation plans instead of the plan name. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x35). Tip: v When used alone, this option enables the output to be piped to other smcli commands. v This option cannot be used with the -o | --oid options. -P | --plan {plan_oid | plan_name}[,{plan_oid | plan_name}...] Changes one or more event-automation plans, specified by name or ID. This list can be a mixture of plan names and IDs separated by commas. plan_oid The unique ID of the event-action plan, specified as a hexadecimal value prefixed with 0x (for example, 0x3e). Tip: You can use the lsevtautopln -o command to list event-action plan ID values. plan_name The name of the event-action plan. Tips: v If the event-action plan name contains spaces or commas, enclose it in quotation marks. If the name contains a comma, prefix the comma with a backslash (\). v The event-action plan name can be locale specific. The name specified must match the locale being used by the command line interface. v You can use the lsevtautopln command without any options to list event-action plan names. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -x | --action {action_oid | action_name} Lists the event-automation plans that contain the event action, specified by name or ID.

212

IBM Systems Director Commands Reference

action_oid The unique ID of the event-action, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lsevtact -o command to list the event-action IDs. action_name The name of the event-action. If the name contains a comma, prefix the comma with a backslash (\). Tips: v If the name contains a comma, prefix the comma with a backslash (\). v If the name contains a space, enclose the name in quotation marks. v The event-action name can be locale specific. The name specified must match the locale being used by the command line interface. v You can use the lsevtact command without any options to list the event-action names.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 50: A specified event-automation plan name or ID is not valid. v 61: A file with the specified export file name already exists. v 62: The location of the specified export file name is not writable. v 63: The specified export file name is not readable.

Examples
1. List names of all event-automation plans This example illustrates how to list the names of all event-automation plans.
smcli lsevtautopln RestartPrintSpooler Log Events CPU SecurityPlan

2. List names and ID of all event-automation plans This example illustrates how to list only the names and IDs of all event-automation plans.
smcli lsevtautopln -o RestartPrintSpooler, 0x10 Log Events, 0x26 CPU, 0x70 SecurityPlan, 0x90

3. Display detailed information for multiple event-automation plans using plan IDs This example illustrates how to display detailed information for two plans with plan IDs 0x26 and 0x70.

Chapter 1. smcli

213

smcli lsevtautopln -l 0x26,0x70 Name: Log events Description: Send all events to EventLog Status: active Event Filter: All Event. Time Ranges: Continuous Actions: Log Events Targets: Group name: All systems Name: CPU Description: Check for >90% usage Status: inactive Event Filter: CPU usage > 90% Time Ranges: Continuous Actions: Email Admin Targets: System Name: System1 System Name: System2

4. Display detailed information for an event-automation plans This example illustrates how to display detailed information and the plan ID for the plan named RestartPrintSpooler.
smcli lsevtautopln -lo RestartPrintSpooler Name: RestartPrintSpooler, ID: 0x11 Description: Reset printer spooler. Status: active Event Filter: Printer Error, ID: 0x21 Time Ranges: Day and time [0] = Sunday 1:30 AM - 10:00 AM Actions: Reset Spooler, ID: 0x33 Email admin, ID: 0x43 Targets: System Name: system1.abc.com, ID: 0x5e Group Name: PublicSystems, ID: 0x56d

5. List the event-automation plans that contains an event action This example illustrates how to list the event-automation plans that contain the event action named Log to Event Log.
smcli lsevtautopln -x "Log to Event Log" Log Events SecurityPlan

6. List the plans that contains an event filter This example illustrates how to list the event-automation plans that contain the event filter named Critical Events.
smcli lsevtautopln -e "Critical Events" MemoryAlertNotify CPUAlertNotify

7. Export an event-automation plan as an archive This example illustrates how to export an event-automation plan named RestartPrintSpooler as an archive into a file named C:\export\autoplan\ RestartPrintSpooler.ar, so that it can be imported at a later time.
smcli lsevtautopln -F ar RestartPrintSpooler C:\export\autoplan\RestartPrintSpooler.ar

214

IBM Systems Director Commands Reference

8. Export an event-automation plan as XML This example illustrates how to export two event-automation plans with IDs 0x10 and 0x20 in XML format into a file named C:\export\autoplan\Plans.xml.
smcli lsevtautopln -F xml 0x20 C:\export\autoplan\Plan.xml

An example output in the Plan.xml file is:


<?xml version="1.0" encoding="UTF-8" ?> <TWGEventActionPlanMgr TimeGenerated="Wednesday, March 19, 2008 1:52:57 PM" Title="Event Action Plan"> <TWGEventActionPlan Title="Event Action Plan" planName="Plan1"> <TWGEventFilter TWGEventFilterName="Plan1-Filter" Title="Event Filter"> <TWGEventFilterType Title="Filter Type" Type="Simple Event Filter" /> <TWGEventFilterEventType Title="Event Type" Type="ManagedElement.ManagedSystemElement.LogicalElement .LogicalDevice.Processor" <TWGEventExtendedAttribute Title="Extended Attributes"> </TWGEventFilterEventType> <TWGEventSeverity Severity="Critical" Title="Severity" /> <TWGEventSeverity Severity="Fatal" Title="Severity" /> <TWGEventSeverity Severity="Informational" Title="Severity" /> <TWGEventSeverity Severity="Minor" Title="Severity" /> <TWGEventSeverity Severity="Unknown" Title="Severity" /> <TWGEventSeverity Severity="Warning" Title="Severity" /> <TWGEventCategory Title="Category" Type="Alert" /> <TWGAction Title="Action Name" actionName="Add to the Event Log" actionParmLocale="English (United States)" actionParmLocaleLabel="Language" actionParmTimeZone="" actionParmTimeZoneLabel="Time Zone..." / </TWGEventFilter> </TWGEventActionPlan> </TWGEventActionPlanMgr>

mkevtautopln command
Use the mkevtautopln command to create a new event-automation plan or import one or more existing event-automation plans.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] mkevtautopln options For information about the options listed above that are specific to smcli, enter smcli -?. smcli mkevtautopln [-h | -? | --help] [-L language] smcli mkevtautopln [-L language] [-v] {import_file} smcli mkevtautopln [-L language] [-v] {-e event_filter} {-x action_list} {-N group_list} [-D description] plan_name smcli mkevtautopln [-L language] [-v] {-e event_filter} {-x action_list} [-N group_list] {-t system_type | -w query | -i ip_address_list | -n system_list} [-D description] plan_name

Description
None

Operands
This command uses a event-automation plan name or import file name as an operand.

Chapter 1. smcli

215

The plan_name creates an event-automation plan with the specified name. Tips: v If the event-action plan name contains spaces or commas, enclose it in quotation marks. If the name contains a comma, prefix the comma with a backslash (\). v The event-action plan name can be locale specific. The name specified must match the locale being used by the command line interface. v You can use the lsevtautopln command without any options to list event-action plan names. The import_file is the name and full path of the file that contains data for one or more event-automation plans to be imported. The file being imported must contain event-automation plans that were previously exported in the archive file format using the lsevtautopln command.

Flags
-D | --description {description_string} Specifies a description of the event-automation plan. If the description contains special characters (such as a space or comma) enclose it in quotes. -e | --eventfilter {filter_oid | filter_name} Targets the event filter, specified by name or ID. filter_oid The unique ID of the event filter, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lsevtfltr -o command to list the event-filter IDs. filter_name The name of the event filter. If the name contains a comma, prefix the comma with a backslash (\). Tips: v Event-filter names might not be unique. This command acts on all event filters with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple event filters with the same name. To target an event filter that has a name that is not unique, identify the event filter by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v The event-filter name can be locale specific. The name specified must match the locale being used by the command line interface. v You can use the lsevtfltr command without any options to list the event-filter names. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples.

216

IBM Systems Director Commands Reference

Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more systems, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed.
Chapter 1. smcli

217

v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more systems specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. If the -n option is not specified, then a customized event action that starts a noninteractive task on the system on which the event occurred is created. If the -n option is specified, then a customized event action that starts a noninteractive task on a specified system is created. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all systems in one or more specified groups that are identified by name or ID. The list can be a mixture of group names and IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names.

218

IBM Systems Director Commands Reference

v The group names are not locale specific. -t | --type system_type Narrows the specified targeted systems to all systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes. -x | --action {action_oid | action_name}[,{action_oid | action_name}...] Targets one or more event actions, specified by name or ID. This list can be a mixture of event-action names and IDs, separated by a comma. action_oid The unique ID of the event-action, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lsevtact -o command to list the event-action IDs. action_name The name of the event-action. If the name contains a comma, prefix the comma with a backslash (\). Tips:
Chapter 1. smcli

219

v If the name contains a comma, prefix the comma with a backslash (\). v If the name contains a space, enclose the name in quotation marks. v The event-action name can be locale specific. The name specified must match the locale being used by the command line interface. v You can use the lsevtact command without any options to list the event-action names.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 50: An event-automation plan already exists with the specified name. v 51: The specified event filter name or ID was not found. v 52: The specified action list contains an action name or id that was not found. v 55: The specified event filter cannot be reuse in another plan. v 60: The specified import file is not in a valid format. v 64: The specified import file does not have read permission. v 65: The specified import file is of an unsupported version.

Examples
1. Create an event automation plan This example illustrates how to create an event automation plan named MyNewPlan, with event filter ID 0x20, event actions 0x55 and 0x70, and description My New Plan. The new plan is applied to all systems in group1.
smcli mkevtautopln -e 0x20 -x 0x55,0x70 -N group1 -D "My New Plan" MyNewPlan

2. Create an event automation plan by importing an archive file This example illustrates how to create an event automation plan by importing an archive file named c:\automation\plan\MySavedPlan.ar.
smcli mkevtautopln C:\automation\plan\MySavedPlan.ar

rmevtautopln command
Use the rmevtautopln command to delete one or more event-automation plans.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] rmevtautopln options For information about the options listed above that are specific to smcli, enter smcli -?. smcli rmevtautopln [-h | -? | --help] [-L language] smcli rmevtautopln [-L language] [-v] {-f file_name | [-P]plan_list}

Description
Event filters that were created when the event automation plan was created using the wizard and have the name plan_name-Filter are also deleted. Default filters and other custom filters are not deleted.

220

IBM Systems Director Commands Reference

Operands
This command uses a list of event-automation plans as an operand. The list can optionally be preceded by the -P | --plans option.

Flags
-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of event-automation plans to be deleted. This list can be a mixture of plan names and IDs, separated by a comma or end-of-line character. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country

Chapter 1. smcli

221

code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -P | --plan {plan_oid | plan_name}[,{plan_oid | plan_name}...] Changes one or more event-automation plans, specified by name or ID. This list can be a mixture of plan names and IDs separated by commas. plan_oid The unique ID of the event-action plan, specified as a hexadecimal value prefixed with 0x (for example, 0x3e). Tip: You can use the lsevtautopln -o command to list event-action plan ID values. plan_name The name of the event-action plan. Tips: v If the event-action plan name contains spaces or commas, enclose it in quotation marks. If the name contains a comma, prefix the comma with a backslash (\). v The event-action plan name can be locale specific. The name specified must match the locale being used by the command line interface. v You can use the lsevtautopln command without any options to list event-action plan names. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 50: A specified event-automation plan name or ID is not valid.

Examples
1. Remove an event automation plan This example illustrates how to remove an event automation plan with ID 0x2f.
smcli rmevtautoplan 0x2f

2. Remove multiple event automation plans This example illustrates how to remove three event automation plans with ID 0x26 and names Plan A and Plan B.
smcli rmevtautoplan "Plan A","Plan B",0x26

Event action commands


The smcli event action commands list, create, delete and test event actions.

222

IBM Systems Director Commands Reference

smcli commands
These smcli event action commands are available: lsevtact Use the lsevtact command to display information about available event actions or event-action types. mkevtactemail Use the mkevtactemail command to create a customized event action that sends an e-mail over the Internet (SMTP) or to a mobile phone. mkevtactstpgm Use the mkevtactstpgm command to create a customized event action that starts a program. mkevtactsttask Use the mkevtactsttask command to create a customized event action that starts a noninteractive task. rmevtact Use the rmevtact command to remove customized event actions. testevtact Use the testevtact command to test customized event actions.

lsevtact command
Use the lsevtact command to display information about available event actions or event-action types.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsevtact options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsevtact [-h | -? | --help] [-L language] smcli lsevtact [-L language] [-v] [-o | -p] [-l] [-f file_name | -T | -t action_type | [-x] action_list]

Description
If no actions are specified, this command lists all available event actions. If no display options are specified, this command lists only the event-action name.

Operands
This command uses a list of event actions as an operand. The list can optionally be preceded by the -x | --action option.

Flags
-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored.

Chapter 1. smcli

223

--help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of event actions. This list can be a mixture of event-action names and IDs, separated by a command or end-of-line character. -l | --long Displays detailed information about the job. This option returns these attributes for each job: v Name v Type v Description v Details for the targeted event action v Used by event-automation plan -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed.

224

IBM Systems Director Commands Reference

-o | --oid Displays the unique IDs associated with the targeted systems in addition to other information. Tip: This option cannot be used with the -p | --pipe option. -p | --pipe Displays only the unique IDs for the targeted systems instead of the name. Tip: This option cannot be used with the -o | -oid option. -t | --type action_type Targets all actions of the specified type, identified by name or ID. Tips: v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lsevtact -T command to obtain a list of valid action types. -T | -listtypes Displays the action types in addition to other information. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -x | --action {action_oid | action_name}[,{action_oid | action_name}...] Targets one or more event actions, specified by name or ID. This list can be a mixture of event-action names and IDs, separated by a comma. action_oid The unique ID of the event-action, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lsevtact -o command to list the event-action IDs. action_name The name of the event-action. If the name contains a comma, prefix the comma with a backslash (\). Tips: v If the name contains a comma, prefix the comma with a backslash (\). v If the name contains a space, enclose the name in quotation marks. v The event-action name can be locale specific. The name specified must match the locale being used by the command line interface. v You can use the lsevtact command without any options to list the event-action names.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 25: A number-formatting error occurred.
Chapter 1. smcli

225

v 29: The specified locale is not valid or not supported. v 50: A specified event-action name or ID is not valid.

Examples
1. List the all event actions in detailed format and the action ID This example illustrates how to list the all event actions in detailed format, including the action ID.
smcli lsevtact -lo Name: Add to the Event Log, ID: 0x10 Description: Type: Add to the Event Log, ID: 0x10 History: activated Testable: True Language: English Time Zone: Used by plan: MyPlan Name: Page Admin on duty when server fails, ID: 0x17 Description: Page Admin on duty when server fails Type: Send a Numeric Page, ID: 0x11 History: deactivated Testable: True Language: English Time Zone: America/New_York - Eastern Standard Time - EST Serial Port Device Name: COM1 Pager Number (dial digits): 1-800-345-5555 Numerical Message: 999 Modem Initialization String: Used by plan: Name: Page Admin on duty when server is offline, ID: 0x19 Description: Page Admin on duty when server is offline Type: Send a Numeric Page, ID: 0x11 History: deactivated Testable: True Language: English Time Zone: America/New_York - Eastern Standard Time - EST Serial Port Device Name: COM3 Pager Number (dial digits): 1-333-333-3333 Numerical Message: 888 Modem Initialization String: Modem-AT Used by plan: ServerFailedPlan

2. List the all event-action types and IDs This example illustrates how to list the names and IDs of all event-actions types.
smcli lsevtact -To Add to the event log, 0x10 Send a numeric page, 0x11 Send an alphanumeric page (via TAP), 0x12 Start a program on the server, 0x14 Start a program on a system, 0x15 Start a task on the system that generated the event, 0x16 Send an e-mail to a mobile phone, 0x17 Start a program on the system that generated the event, 0x18 Modify and event and sent it, 0x19 Send an e-mail (Internet SMTP), 0x1a Set an event system variable, 0x1b Log to textual log file, 0x1c.

3. List all event actions for specific action type

226

IBM Systems Director Commands Reference

This example illustrates how to list all event actions of type Send an e-mail (Internet SMTP).
smcli lsevtact -t "Send an e-mail (Internet SMTP)" E-mail Admin on duty E-mail department on backup

mkevtactemail command
Use the mkevtactemail command to create a customized event action that sends an e-mail over the Internet (SMTP) or to a mobile phone.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] mkevtactemail options For information about the options listed above that are specific to smcli, enter smcli -?. smcli mkevtactemail [-h | -? | --help] [-L language] smcli mkevtactemail [-L language] [-v] {-P | -I} [-D description] [-p port] [-s subject] [-m message] {action_name send_to_address reply_to_address smtp_server}

Description
Note: When event actions are created, the action history is inactive. To list action history, you must first activate the history using the evtacthist command.

Operands
This command uses an event-action name, sent-to address, reply-to address, and SMTP server as operands. action_name Creates an event action with the specified name. This name must be unique. send_to_address Specifies the e-mail address to which the notification is to be sent. reply_to_address Specifies the e-mail address to which the person being notified can reply. smtp_server Specifies the SMTP server to use.

Flags
-D | --description {description} Specifies a description of the event action. If the description contains special characters (such as a space or comma) enclose it in quotes. -e | --eventfilter {filter_oid | filter_name} Lists the event-automation plans that contain the event filter, specified by name or ID. filter_oid The unique ID of the event filter, specified as a hexadecimal value prefixed with 0x (for example, 0x37).
Chapter 1. smcli

227

Tip: You can use the lsevtfltr -o command to list the event-filter IDs. filter_name The name of the event filter. If the name contains a comma, prefix the comma with a backslash (\). Tips: v Event-filter names might not be unique. This command acts on all event filters with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple event filters with the same name. To target an event filter that has a name that is not unique, identify the event filter by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v The event-filter name can be locale specific. The name specified must match the locale being used by the command line interface. v You can use the lsevtfltr command without any options to list the event-filter names. -I | --internet Sends an Internet (SMTP) e-mail. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings.

228

IBM Systems Director Commands Reference

v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -m | --message Specifies the message of the e-mail. -p | --port Specifies the SMTP port number. The default port is 25. -P | --mobilephone Sends an e-mail to a mobile phone -s | --subject Specifies the subject of the e-mail -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 50: An event-automation plan already exists with the specified name. v 51: The specified e-mail address form is not valid.

Examples
1. Create an Internet e-mail event action This example illustrates how to create an event action named E-Mail admin that sends an Internet (SMTP) e-mail. The subject of the e-mail is Server down, and there is no message. The e-mail is to be sent to admin@my.com. The reply-to address is also admin@myz.com. The SMTP server is smtp.my.com.
smcli mkevtactemail -I -s "Server down" "E-Mail admin" admin@my.com admin@my.com smtp.my.com

2. Create a mobile-phone e-mail event action This example illustrates how to create a event action named E-Mail admin mobile phone that sends an e-mail to a mobile phone. The subject of the e-mail is Server down, and there is no message. The e-mail is sent to a customer at 555-225-5555, and the reply-to address is admin@my.com. The SMTP server is smtp.my.com.
smcli mkevtactemail -P -s "Server down" "E-Mail admin mobile phone" 5552255555@vtext.com admin@my.com smtp.my.com

mkevtactstpgm command
Use the mkevtactstpgm command to create a customized event action that starts a program.

Chapter 1. smcli

229

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] mkevtactstpgm options For information about the options listed above that are specific to smcli, enter smcli -?. smcli mkevtactstpgm [-h | -? | --help] [-L language] smcli mkevtactstpgm [-L language] [-v] {-s | -e | -i ip_address [-p protocol]} [-D description] {action_name program path}

Description
This command creates an customized event action that starts a program on the management server, a specific system, or the system on which the event occurred.

Operands
This command uses an event-action name, program name, and program path as operands. action_name Creates an event action with the specified name. This name must be unique. program Specifies the name of the executable file to run. path Specifies the full path where the executable file is located.

Flags
-D | --description {description} Specifies a description of the event action. If the description contains special characters (such as a space or comma) enclose it in double quotation marks. -e | --eventsystem Starts the program on the system on which the event occurred. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name} Starts the program on the system, specified by IP address or host name.

230

IBM Systems Director Commands Reference

ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -p | --protocol [i | n | t] Specifies the communication protocol. You can specify one of these values: v i - IPX (Internet packet exchange) v n - NETBIOS v t - TCP/IP (Transmission Control Protocol/Internet Protocol); This is the default protocol.

Chapter 1. smcli

231

-s | --server Starts the program on the management server running IBM Systems Director Server. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 29: The specified locale is not valid or not supported. v 50: An event-automation plan already exists with the specified name.

Examples
1. Create an event action that starts a program on the management server This example illustrates how to create an event action named Run Backup that starts the c:\backup\backup.exe program on the management server on which IBM Systems Director Server runs.
smcli mkevtactstpgm -s "Run Backup" backup.exe C:\backup\

2. Create an event action that starts a program on a remote system This example illustrates how to create an event action named Reboot system that starts the c:\reboot.exe program on a remote system with host name system1.ibm.com.
smcli mkevtactstpgm -i system1.ibm.com -p t "Reboot system" reboot.exe C:\

mkevtactsttask command
Use the mkevtactsttask command to create a customized event action that starts a noninteractive task.

Syntax
smcli [-c] options [-prompt] [-user user_name] [-pw password] mkevtactsttask

For information about the options listed above that are specific to smcli, enter smcli -?. smcli mkevtactsttask [-h | -? | --help] [-L language] smcli mkevtactsttask [-L language] [-v] [-D description] {action_name} {-T task}

Description
This command creates a customized event action that starts a noninteractive task on either the system on which the event occurred or another specified system.

Operands
This command uses a unique event-action name as an operand. This operand creates an event action with the specified name.

232

IBM Systems Director Commands Reference

Flags
-D | --description {description} Specifies a description of the event action. If the description contains special characters (such as a space or comma), enclose it in quotes. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -T | --task {task_oid | task_id_string | task_title} Runs the task, specified by title, unique ID or ID string. task_oid The unique ID of the task, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lstask -o -r command to list all task IDs that are valid for the targeted system.
Chapter 1. smcli

233

task_id_string The unique ID string of the task, prefixed with a percent sign (%) (for example, %BladeServerCfgTask). If the string ID contains a comma, prefix the comma with a backslash (\). Tip: You can use the lstask -I command to list all task ID strings that are valid for the targeted system. task_title The title of the task. The task title must be fully qualified with the parent task (for example, grandparent_task_title/parent_task_title/task_title). If the task name contains a comma, prefix the comma with a backslash (\). Enclose the task title in quotation marks if it contains a space character. Tips: v Task names might not be unique. This command acts on all tasks with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple tasks with the same name. To target a task that has a name that is not unique, identify the task by specifying its unique, hexadecimal task ID, or use additional target options to refine the selection. v Locale-specific task names might not exist for every noninteractive task. The name specified must match the locale being used by the command line interface. v Use the lstask -r command to list all tasks that are valid for the targeted system. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 29: The specified locale is not valid or not supported. v 50: An event-automation plan already exists with the specified name. v 51: The task name or ID is not unique or valid. v 52: The task or subtask is interactive.

Examples
1. Create an event action that starts a task on the system on which the event occurred This example illustrates how to create an event action named Discover that runs the Run Discovery task on the system on which the event occurred.
smcli mkevtactsttask -T "Discover" "Run Discovery"

2. Create an event action that starts a task on the system on a specified system This example illustrates how to create an event action named Discover that runs the Run Discovery task on the system on specified system "MySystem".
smcli mkevtactsttask -n MySystem -T "Discover" "Run Discovery"

rmevtact command
Use the rmevtact command to remove customized event actions.

234

IBM Systems Director Commands Reference

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] rmevtact options For information about the options listed above that are specific to smcli, enter smcli -?. smcli rmevtact [-h | -? | --help] [-L language] smcli rmevtact [-L language] [-v] [-c] {-f file_name | [-x] action_list}

Description
None

Operands
This command uses a list of actions as an operand. The list can optionally be preceded by the -x | --actions option.

Flags
-c | --confirm Confirms the removal of an event action that is used by an event-automation plan. Tip: This is equivalent to forced removal. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data must contain one or more event actions to be removed, specified by name or ID. This list can be a mixture of event-action names and IDs, separated by a comma. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command.
Chapter 1. smcli

235

The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -x | --action {action_oid | action_name}[,{action_oid | action_name}...] Removes one or more event actions, specified by name or ID. This list can be a mixture of event-action names and IDs, separated by a comma. action_oid The unique ID of the event-action, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lsevtact -o command to list the event-action IDs. action_name The name of the event-action. If the name contains a comma, prefix the comma with a backslash (\). Tips: v If the name contains a comma, prefix the comma with a backslash (\). v If the name contains a space, enclose the name in quotation marks. v The event-action name can be locale specific. The name specified must match the locale being used by the command line interface. v You can use the lsevtact command without any options to list the event-action names.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 25: A number-formatting error occurred.

236

IBM Systems Director Commands Reference

v v v v

29: The specified locale is not valid or not supported. 50: A specified event-action name or ID is not valid. 52: A specified event action was not found. 53: A specified action is used by an event automation plan.

Examples
1. Remove an event action This example illustrates how to remove an event action named E-mail admin.
smcli rmevtact "E-Mail admin"

2. Remove multiple event actions This example illustrates how to remove event actions with IDs 0x1d, 0x2f, and 0x1a.
smcli rmevtact 0x1d,0x2f,0x1a

testevtact command
Use the testevtact command to test customized event actions.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] testevtact options For information about the options listed above that are specific to smcli, enter smcli -?. smcli testevtact [-h | -? | --help] [-L language] smcli testevtact [-L language] [-v] {-f file_name | [-x] action_list}

Description
This command verifies that the targeted customized event action was previously created. This command only launches the event action. The return status is the action launch status. Note: The actual action completion status is available in the event action history log only if the history is activated for the action. Use the lsevtacthist command to activate the history.

Operands
This command uses a list of event actions as an operand. The list can optionally be preceded by the -x | --action option.

Flags
-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored.

Chapter 1. smcli

237

--help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of event actions. This list can be a mixture of event-action names and IDs, separated by a command or end-of-line character. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -x | --action {action_oid | action_name}[,{action_oid | action_name}...] Targets one or more event actions, specified by name or ID. This list can be a mixture of event-action names and IDs, separated by a comma.

238

IBM Systems Director Commands Reference

action_oid The unique ID of the event-action, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lsevtact -o command to list the event-action IDs. action_name The name of the event-action. If the name contains a comma, prefix the comma with a backslash (\). Tips: v If the name contains a comma, prefix the comma with a backslash (\). v If the name contains a space, enclose the name in quotation marks. v The event-action name can be locale specific. The name specified must match the locale being used by the command line interface. v You can use the lsevtact command without any options to list the event-action names.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 50: A specified event-action name or ID is not valid. v 70: The event-action failed to launch.

Examples
Test multiple event actions This example illustrates how to test event actions with name E-Mail admin and ID 0x34.
smcli testevtact "E-Mail admin",0x34

Event filter commands


The smcli event filter commands list event types and filter and remove event filters.

smcli commands
These smcli event filter commands are available: lsevttype Use the lsevttype command to list all event types. lsevtfltr Use the lsevtfltr command to display information about the event filters. If you do not specify any display options, this command lists the names of all event filters. rmevtfltr Use the rmevtfltr command to remove event filters.

Chapter 1. smcli

239

lsevttype command
Use the lsevttype command to list all event types.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsevttype options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsevttype [-h | -? | --help] [-L language] smcli lsevttype [-L language] [-v] [-l]

Description
The event types are shown in the following format:
component_category[.component_category].component_type.[component_instance]

Operands
None

Flags
-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -l | --long Displays detailed information about each event type, including the component categories, component type, component instance, family, qualifiers and description. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean

240

IBM Systems Director Commands Reference

v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 29: The specified locale is not valid or not supported.

Examples
1. List all event types This example illustrates how to list all events types in IBM Systems Director.
smcli lsevttype Device.Processor.1 Devices.MediaAccessDevice.CDROMDrive.1 Systems.OperatingSystem.Unix.Linux.1

2. List detailed information for all event types This example illustrates how to list detailed information for all events types in IBM Systems Director.
smcli lsevttype -l Device.Processor.1 Component Category (0): Device Component Type: Processor Component Instance: 1 Family: Director Qualifier (0): Device Qualifier (1): Processor Description: device processor

lsevtfltr command
Use the lsevtfltr command to display information about the event filters. If you do not specify any display options, this command lists the names of all event filters.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsevtfltr options

Chapter 1. smcli

241

For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsevtfltr [-h | -? | --help] [-L language] smcli lsevtfltr [-L language] [-v] [-o | -p] [-l] [-f file_name | [-e] filter_list]

Description
If no options are specified, this command lists all event-filter names. If no event filters are specified, this command lists all available event filters. If no display options are specified, this command lists only the event-filter name.

Operands
This command uses a list of event filters as an operand. The list can optionally be preceded by the -e | --eventfilter option.

Flags
-e | --eventfilter {filter_oid | filter_name}[,{filter_oid | filter_name}...] Targets one or more event filters, specified by name or ID. This list can be a mixture of names and IDs, separated by a comma. filter_oid The unique ID of the event filter, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lsevtfltr -o command to list the event-filter IDs. filter_name The name of the event filter. If the name contains a comma, prefix the comma with a backslash (\). Tips: v Event-filter names might not be unique. This command acts on all event filters with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple event filters with the same name. To target an event filter that has a name that is not unique, identify the event filter by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v The event-filter name can be locale specific. The name specified must match the locale being used by the command line interface. v You can use the lsevtfltr command without any options to list the event-filter names. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks.

242

IBM Systems Director Commands Reference

The input data is the list of event filters. This list can be a mixture of names and IDs, separated by a comma or end-of-line character. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -l | --long Displays detailed information about the event filter. This option returns these attributes for each event filter: v Name: Name of the event filter v Description: Description of the event filter v Type: The filter type. These are the possible filter types: Simple: General-purpose filter Exclusion: Filter to activate a group of events and then exclude a subgroup of the events Duplication: Filter to ignore duplicate events Threshold: Filter to activate an event after it meets the filter criteria more than once within a specified time range Text: Event filter criteria Text Case: Flag indicating whether the event filter must match exactly, including the case, with the text of the incoming event. Possible values are: Sensitive: Case sensitive. Insensitive: Not case sensitive Text Type: Type of text filtering. These are the possible text types: Any word: The filter is matched if any of the specified words can be present in the incoming event. All words: The filter is matched if all of the specified words must be present in the incoming event. Exact phrase: The filter is matched if the specified text matches exactly with text of the incoming event. Default: Flag indicating whether the event filter is the default. Values are true (default) and false (not default) Read-only: Flag indicating whether the event filter is read-only. Values are true (read-only) and false (editable) Time Ranges: Day and time ranges as a filter criterion. Specifying a day and time range in a filter controls the time that actions are run and, therefore, not run.

v v

v v v

v Event Category: The mode of the event. Possible categories are:


Chapter 1. smcli

243

Alert: A problem has occurred. Resolution: A problem has been resolved and is no longer a problem. v Event Severity: The severity level of the event, which identifies potentially urgent problems requiring immediate attention. Possible severities are: Fatal: The source of the event has already caused the program to fail and should be resolved before the program is restarted. Critical: The source of the event might cause program failure and should be resolved immediately. Minor: The application that issued the event has assigned a severity level indicating that the source of the event should not cause immediate program failure, but should be resolved. Warning: The source of the event might not be problematic but warrants investigation. Informational: The event was generated only for informational purposes. Most events of this severity do not indicate potential problems; however, offline events are categorized as informational, and these events might indicate potential problems. Unknown: The application that generated the event did not assign a severity level. v Event Sender: The system that sent the event to IBM Systems Director Server. For example, SNMP events list the IP address of the trap source. Because most events are generated by IBM Systems Director Server, this field usually contains the name of the management server. v Server Zone: Time zone that applies to this filtering criterion. This is the time zone in which the management server is located. v Event Types: Event types on which to filter. v Excluded Event Types: The event types that are excluded from the filter. v Frequency Interval: The interval of time that begins when an event meets the filtering criteria. v Frequency Count: The number of times that an event must meet the criteria within the specified frequency interval before associated actions can be triggered. v Extended Attributes: The extended attribute ID, value, and operator. v Variables: The variable ID, value, and operator. v Use by Automation Plan: Event-automation plans that use the filter. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips:

244

IBM Systems Director Commands Reference

v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -o | -oid Displays the unique IDs associated with the targeted event filter in addition to other information. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x3e). Tip: This option cannot be used with the -p | --pipe option. -p | --pipe Displays only the unique IDs for the targeted event filter instead of the filter name. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x35). Tip: v When used alone, this option enables the output to be piped to other smcli commands. v This option cannot be used with the -o | --oid options. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 50: The specified event-filter name or ID is not valid.

Examples
1. List all event-filter names This example illustrates how to list the names of all event filters.
smcli lsevtfltr Critical Events Minor Events Warning Events

2. List all event-filter names and IDs This example illustrates how to list the names of all event filters.
smcli lsevtfltr -o Critical Events, 0x19 Minor Events, 0x2e Warning Events, 0x34
Chapter 1. smcli

245

3. List detailed information about an event filter This example illustrates how to list detailed information about the event filter with ID 0x19.
smcli lsevtfltr -l 0x1e Name: My Filter Description: My Filter Description Type: Simple Text: This is a sample text Text Case: insensitive Test Text Type: all words Default: false Read Only: false Time Ranges: Day and time [0] = Sunday 1:30 AM - 10:00 AM Category:alert Severity: critical, fatal Sender: director.server.abc.com Server Zone: America/New_York Event Types: ManagedElement.ManagedSystemElement.LogicalElement.System.OperatingSystem ManagedElement.ManagedSystemElement.LogicalElement.ServiceAccessPoint .RemoteServiceAccessPoint Extended Attributes: Threshold Name equal to CPU Threshold Name equal to (Case Sensitive) Fan Threshold Name not equal to Memory Usage Threshold Name not equal to (Case Sensitive) Memory Usage Monitor Resource equal to CPU Monitor Resource equal to (Case Sensitive) Fan Monitor Resource not equal to Memory Usage Monitor Resource not equal to (Case Sensitive) Memory Usage Variables: ServerRebootedState equal to PowerOff ServerRebootedState equal to (Case Sensitive) PowerOn Fan equal to PowerOff Fan equal to (Case Sensitive) PowerOn Used by plan: MyPlan

rmevtfltr command
Use the rmevtfltr command to remove event filters.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] rmevtfltr options For information about the options listed above that are specific to smcli, enter smcli -?. smcli rmevtfltr [-h | -? | --help] [-L language] smcli rmevtfltr [-L language] [-v] [-c] {-f file_name | [-e] filter_list}

Description
None.

Operands
This command uses a list of event filters as an operand. The list can optionally be preceded by the -e | --eventfilter option.

246

IBM Systems Director Commands Reference

Flags
-c | --confirm Confirms the removal of event actions that are used by an event-action plan. Tip: This is equivalent to a forced removal. -e | -eventfilter {filter_oid |filter_name[filter_oid, | filter_name...]} Targets one or more event filters, specified by name or ID. This list can be a mixture of event filter names and ID, separated by a comma. filter_oid The unique ID of the event filter, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lsevtfltr -o command to list the event-filter IDs. filter_name The name of the event filter. If the name contains a comma, prefix the comma with a backslash (\). Tips: v Event-filter names might not be unique. This command acts on all event filters with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple event filters with the same name. To target an event filter that has a name that is not unique, identify the event filter by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v The event-filter name can be locale specific. The name specified must match the locale being used by the command line interface. v You can use the lsevtfltr command without any options to list the event-filter names. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of event filters to remove. This list can be a mixture of names and IDs, separated by a comma or end-of-line character. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored.
Chapter 1. smcli

247

v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 50: The specified event-filter name or ID is not valid. v 52: A specified event filter cannot be removed. v 53: A specified event filter is used by the event automation plan.

Examples
1. Remove an event filter using the filter name This example illustrates how to remove an event filter named My Critical Events.
smcli rmevtfltr "My Critical Events"

2. Remove multiple event filters using the filter ID This example illustrates how to remove event filters with IDs 0x70, 0x78, and 0x79.
smcli rmevtfltr 0x70,0x78,0x79

248

IBM Systems Director Commands Reference

Remote access commands


Use the commands in this section to work with remote systems.

smcli commands
The following smcli commands are available for remote access: dconsole Use the dconsole command to run a remote serial console from the IBM Systems Director Server CLI with the purpose of opening the serial console to IBM Power managed systems. This command runs on IBM Systems Director Server for AIX V6.1F or later. dsh Use the dsh command to run Distributed Shell from the IBM Systems Director Server CLI with the purpose of running commands on remote systems. This command applies to IBM Systems Director Server for AIX only.

dconsole command
Use the dconsole command to run a remote serial console from the IBM Systems Director Server CLI with the purpose of opening the serial console to IBM Power managed systems. This command runs on IBM Systems Director Server for AIX V6.1F or later.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] dconsole options For information about the options listed above that are specific to smcli, enter smcli -?. smcli dconsole [-h | -? | --help] [-L language] smcli dconsole {-n system_name | -i ipaddress | -N nodegroup_name} [-L | --lang language] [-c | --close ] [-o | --force] [-l | --log] [-r | --read] [-v | --verbose]

Description
The dconsole command opens a console window to one or more Power Architecture blade server or Power Systems virtual server systems. Each window provides access to the system's serial console, accessed out-of-band. Since the console is displayed in a separate xterm window, the DISPLAY environment variable needs to be set prior to invoking the smcli dconsole command. Specify targets as a comma separated list of individual systems or as a comma separated list of groups. You can list individual systems using their names, object IDs, or TCP/IP addresses or host names. Groups are listed using their names. If a group is listed, the command is executed on all members of that group.

Flags
-c | --close Forces an existing virtual terminal session to be closed before opening a new session. This flag is used when another remote system (such as an HMC or

Chapter 1. smcli

249

another AIX server running dconsole) has a remote session open to the same managed system, causing the system's virtual terminal session to be unavailable. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more systems, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian

250

IBM Systems Director Commands Reference

v v v v v

ja: Japanese ko: Korean pt_BR: Brazilian Portuguese zh_CN: Simplified Chinese zh_TW: Traditional Chinese

Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -l | --log Enables console logging (no logging if omitted). By default, the console logs are written to the /var/ibm/sysmgt/dsm/log/ console directory. The location and subdirectory can be changed by overriding "Log_File_Location" and "dconsole_log_File_Subdirectory." -N | --groups {group_name}[,{group_name}...] Targets all systems in one or more specified groups that are identified by name. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more systems specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. If the -n option is not specified, then a customized event action that starts a noninteractive task on the system on which the event occurred is created. If the -n option is specified, then a customized event action that starts a noninteractive task on a specified system is created. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: Use the lssys -o command to list all system IDs.
Chapter 1. smcli

251

system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -o | --force Forces a new session to be opened as a read-write session. By default, the command opens the first session to a specified server as read-write and opens subsequent sessions as read-only. This flag forces the new session to be read-write, and any existing read-write session are changed to read-only. -r | --read Opens a console as read-only. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 200: The command execution failed. The exit value is increased by 1 for each successive failed attempt to start the console or target that is not valid.

Examples
1. Open a remote console to specific managed servers This command illustrates how to open a remote serial console to managed servers Server1 and Server2.
smcli dconsole n Server1DisplayName,Server2DisplayName

2. Open a remote console to all managed servers in a group This command illustrates how to open a remote serial console to all managed servers in the "AIX/Linux Virtual Servers" group.
smcli dconsole N "AIX/Linux Virtual Servers"

dsh command
Use the dsh command to run Distributed Shell from the IBM Systems Director Server CLI with the purpose of running commands on remote systems. This command applies to IBM Systems Director Server for AIX only.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] dsh options

252

IBM Systems Director Commands Reference

For information about the options listed above that are specific to smcli, enter smcli -?. smcli dsh {-h | -? | --help} smcli dsh {-n system_name | -i ipaddress | -N nodegroup_name} [-O | --fanout fanout_value] [-m | --format {c|g}] [-o | --output output_path] [-L | --lang language] [-l | --log log_file] [-c | --no-locale] [-r | --report report_path] [-e | --report-name report-name] [-Q] [-S csh|ksh] [-M | --timeout seconds] [-v] [-V] [-z] command_list

Description
The dsh command runs commands concurrently on remote targets. It issues a remote shell command for each specified target and returns the output from all targets. The output is formatted so that you can easily manage the command results from all targets. Specify targets as a comma separated list of individual systems or as a comma separated list of groups. You can list individual systems using their names, object IDs, or TCP/IP addresses or host names. Groups are listed using their names. If a group is listed, the command is executed on all members of that group.

Flags
-c | --no-locale Specifies to not send locale information to the target machine. -e | --report-name Specifies the name to use when generating the report. If not specified, the name defaults to Unspecified. This flag can only be used with the --report flag. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more systems, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips:
Chapter 1. smcli

253

v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -l | --log Enables logging to the specified log_file. Output is appended to the file each time the smcli dsh command runs. -m | --format c|g Specifies an output formatting option for system information. One of either the c or g flags must be specified. Without --format, the smcli dsh command will display the output from each managed system as soon as it arrives. Each line of the output is preceded with the managed system name, OID, or hostname. With --format, the smcli dsh command will wait for all the output from each managed system to arrive before displaying it. The output is displayed as follows:

254

IBM Systems Director Commands Reference

c g

Compresses the output. Collapses identical output from more than one managed system so that it is displayed only once. Groups the output from each managed system together.

-M | --timeout Specifies the time, in seconds, to wait for the output from any command currently running on a remote managed system. If no output is available from any managed system in the specified timeout, smcli dsh displays an error and terminates the command for the remote managed system that failed to respond. If timeout is not specified, smcli dsh waits indefinitely to continue processing output from all remote managed systems. -N | --groups {group_name}[,{group_name}...] Targets all systems in one or more specified groups that are identified by name. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more systems specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. If the -n option is not specified, then a customized event action that starts a noninteractive task on the system on which the event occurred is created. If the -n option is specified, then a customized event action that starts a noninteractive task on a specified system is created. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection.
Chapter 1. smcli

255

v Use the lssys command without any options to list all system names. v The system names are not locale specific. -O | --fanout Specifies a maximum number of target systems on which to run the command in parallel. Serial execution can be specified by indicating a fanout value of 1. If --fanout is not specified, a default value of 16 is used. -o | --output Copies the standard output to output_path/target_name.output and the standard error to output_path/target_name.error. Output continues to be sent to the standard output and standard error. Use the -Q flag to suppress standard output and standard error. When used together with the --report-name option, the output is placed into the directory specified by --report-name. -Q | --silent Specifies silent mode. No remote command output is written to standard output or standard error. -r | --report Enables report generation and specifies the path to the directory where reports are saved. -S | --syntax csh | ksh Specifies the shell syntax to be used. The default flag is ksh. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -V | --version Display DSH command version information. -z | --exit-status Displays exit status of the last remotely run command on each managed system. If the command issued on the remote system is run in the background, the exit status is not displayed. command_list "command[;command;...]" Specifies a list of commands to execute on the remote managed system. Quotation marks around the command are required to ensure that all commands in the list are executed remotely and that any special characters are interpreted correctly on the remote managed system.

Exit status
The smcli dsh command exit code is 0 if the command runs without errors and all remote shell commands finished with exit codes of 0. If internal smcli dsh errors occur or if the remote shell commands do not complete successfully, the smcli dsh command exit value is greater than 0. The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 200: The command execution failed. The exit value is increased by 1 for each successive instance of an unsuccessful remote command instance or target that is not valid.

256

IBM Systems Director Commands Reference

Examples
1. Run a command on managed systems This example illustrates how to run the date command on managed systems Node1 and Node2.
smcli dsh n Node1DisplayName,Node2DisplayName "date"

2. Display users on all systems in a group This example illustrates how to display the number of users on all managed systems in the "All Operating Systems" group.
smcli dsh N "All Operating Systems" "who | wc l"

Tasks and scheduled jobs commands


Use the commands in this section to list or run IBM Systems Director tasks, and to schedule one or more noninteractive tasks to run at a later time. You can specify an exact date and time that you want the scheduled task start, or you can set the scheduled task to repeat automatically at a specified interval. You can schedule only noninteractive tasks, which are tasks that do not require any user input or interaction. Scheduled tasks are referred to as jobs. Tip: The following functions are not available through the command-line interface. Use the IBM Systems Director Web interface instead. v Creating a job v Suspending and resuming a job v Clearing all jobs in the job history log v Listing jobs in calendar view

smcli commands
These smcli task and scheduled job commands are available: lstask Use the lstask command to list information about one or more tasks. runtask Use the runtask command to run a non-interactive IBM Systems Director task on a specific system. lsjob Use the lsjob command to list information about scheduled tasks (called jobs).

lsjobhistory Use the lsjobhistory command to list information about job instances and history data. rmjob Use the rmjob command to delete one or more jobs. rmjobhistory Use the rmjobhistory command to delete job instances or history. runjob Use the runjob command to run one or more jobs immediately or schedule jobs to run at a specific date and time. You can also schedule a job to repeat automatically at a specified interval.

Chapter 1. smcli

257

dircli commands
Using the new smcli scheduler commands is recommended; however, the dircli scheduler commands listed in the following table are supported in this release for compatibility with IBM Systems Director version 5.20. For information about the dircli commands, see the commands reference in the IBM Director v5.20 information center at publib.boulder.ibm.com/infocenter/ eserver/v1r2/topic/diricinfo_5.20/fqm0_r_dircli_task_commands.html and publib.boulder.ibm.com/infocenter/eserver/v1r2/topic/diricinfo_5.20/ fqm0_r_dircli_scheduler_commands.html. Important: v The cancelrdmtaskactivation command is no longer supported. v You must enter the dircli commands in lower case. v To use a dircli command with the same name as an smcli command, you must define the CLILEGACY environment variable and set it to a value of 1.
Table 5. Supported dircli commands dircli command canceljobactivation Description and supported syntax Cancels instances of the specified job Syntax: canceljobactivation job_id activation_id getjobactivationlog Lists the log for the specified job instance Syntax: getjobactivationlog job_id activation_id [object_id] getjobstatus Lists the job status Syntax: getjobstatus job_id listjobactivations Lists job instances Syntax: listjobactivations job_id object_id listjobactivationsbysystem Lists all job activations for the specified systems Syntax: listjobactivationsbysystem object_id listjobs Lists scheduled jobs Syntax: listjobs lsjob lsjob lsjobhistory lsjob lsjobhistory Equivalent smcli command rmjobhistory

258

IBM Systems Director Commands Reference

Table 5. Supported dircli commands (continued) dircli command lstask Description and supported syntax Lists tasks Syntax: lstask [-p | [-I] [-o]] [-l] [-s task [-e execution_id {-f file_name | -w query | -t system_type | -N group_list | -n system_list}]] [-T task_list] [-f file_name] [-E] runtask Run a non-interactive tasks or profiles Syntax: runtask [-t system_type] [-W seconds] {-a | -f file_name | -w query | -N group_list | -n system_list} noninteractive_task runtask Equivalent smcli command lstask

lstask command
Use the lstask command to list information about one or more tasks.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lstask options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lstask [-h | -? | --help] [-L language] smcli lstask [-L language] [-v] [-p | [-I] [-o]] {-s task} [-A instance [-t type_list] [-f file_name | -w query | -i ip_address_list | -N group_list | [-n] system_list] ] smcli lstask [-L language] [-v] [-p | [-I] [-o]] [-l] [-f file_name | [-T] task_list] smcli lstask [-L language] [-v] [-o] [-I] [-r]

Description
If you do not specify a task name or ID, this command lists information about all defined tasks. If you do not specify any options, this command lists only the task names. If this command targets systems, it displays all tasks that run on the specified systems. If the command targets tasks, it displays information about the tasks including on which systems the task runs. Important: v The -e | --exec option used in IBM Systems Director v5.20 to list the job-instance status for the specified systems and subtasks has been replaced with -A | --instance in this release.

Chapter 1. smcli

259

v The -E | --executable option used in IBM Systems Director v5.20 to list noninteractive subtasks that can be scheduled has been replaced with to -r | --runnable in this release.

Operands
This command uses a list of tasks as an operand. The list can optionally be preceded by the -T | --task option. If you specify the -s| --task and -A | --instance options, this command optionally uses a list of systems as an operand. The list can optionally be preceded by the -n | --names option.

Flags
-A | --instance instance_id Displays the status of the specified task or subtask instance, identified by ID. The ID is an integer that is incremented each time the task or subtask is run. Tips: v If you omit this option, all task instances are listed. v You can use the lstask -l command to get a list of all task instance IDs. v If you specify this option, you must also specify the -s | --status option. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. If you do not specify the -s | --task option, the input data is the list of tasks, specified by name or ID. This list can be a mixture of task names and ID, separated by a comma or end-of-line character. If you specify the -s | --task option, the input data is the list of systems on which the specified tasks run. This list can be a mixture of system names and IDs, separated by a comma or end-of-line character. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command.

260

IBM Systems Director Commands Reference

-i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more tasks that run on the specified systems, identified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma or end-of-line character. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. Tip: You can use this option only with the -s | --task task and -A | --instance options. -I | --id Displays the unique task name or task ID string of the targeted task. Tip: You cannot use this option with the -p | --pipe option. -l | --long Displays detailed information about each task with the specified name or ID string. This option returns these attributes for each task: v Task title v Full parent structure v Task interactive flag v Task status v ID and status of each task instance Tip: Data is not displayed for interactive tasks. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese
Chapter 1. smcli

261

v v v v

ko: Korean pt_BR: Brazilian Portuguese zh_CN: Simplified Chinese zh_TW: Traditional Chinese

Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more tasks that run on the specified systems, identified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. Tip: You can use this option only with the -s | --task and -A | --instance options. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets one or more tasks that run on members of the specified groups, identified by name or ID. The list can be a mixture of group names and IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group.

262

IBM Systems Director Commands Reference

group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. Tip: You can use this option only with the -s | --task and -A | --instance options. -o | --oid Displays the names and unique IDs for the targeted tasks and for the systems on which the tasks run. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x3e). A task job ID of 0x0 indicates an interactive task. Tip: You cannot use this option with the -p | --pipe option. -p | --pipe Displays the unique ID of the task. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x3e7). No other information is displayed. Tip: v When used alone, this option enables the output to be piped to other smcli commands. v This option cannot be used with the -o | oid option. -r | --runnable Lists the noninteractive tasks that can run on the targeted system. -s | --status {task_ oid | task_string_id | task_title} Displays the status for a noninteractive task, specified by name, ID or string ID. Tips: v This option cannot be used with the -T | --tasks option. v An error is displayed if the specified task name or task string ID does not uniquely identify the task. v An error is displayed if the specified task is not a noninteractive task. task_oid The unique ID of the task, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lstask -o -r command to list all task IDs that are valid for the targeted system.

Chapter 1. smcli

263

task_id_string The unique ID string of the task, prefixed with a percent sign (%) (for example, %BladeServerCfgTask). If the string ID contains a comma, prefix the comma with a backslash (\). Tip: You can use the lstask -I command to list all task ID strings that are valid for the targeted system. task_title The title of the task. The task title must be fully qualified with the parent task (for example, grandparent_task_title/parent_task_title/task_title). If the task name contains a comma, prefix the comma with a backslash (\). Enclose the task title in quotation marks if it contains a space character. Tips: v Task names might not be unique. This command acts on all tasks with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple tasks with the same name. To target a task that has a name that is not unique, identify the task by specifying its unique, hexadecimal task ID, or use additional target options to refine the selection. v Locale-specific task names might not exist for every noninteractive task. The name specified must match the locale being used by the command line interface. v Use the lstask -r command to list all tasks that are valid for the targeted system. -t | --type system_type Targets tasks that run on systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -T | --tasks {task_oid | task_id_string | task_title}[,{task_oid | task_id_string | task_title}...] Targets one or more tasks, specified by title, unique ID, or ID string. The list can be a mixture of titles, IDs, and ID strings, separated by a comma. The list is delimited by the end-of-line character when read from a file. task_oid The unique ID of the task, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lstask -o -r command to list all task IDs that are valid for the targeted system.

264

IBM Systems Director Commands Reference

task_id_string The unique ID string of the task, prefixed with a percent sign (%) (for example, %BladeServerCfgTask). If the string ID contains a comma, prefix the comma with a backslash (\). Tip: You can use the lstask -I command to list all task ID strings that are valid for the targeted system. task_title The title of the task. The task title must be fully qualified with the parent task (for example, grandparent_task_title/parent_task_title/task_title). If the task name contains a comma, prefix the comma with a backslash (\). Enclose the task title in quotation marks if it contains a space character. Tips: v Task names might not be unique. This command acts on all tasks with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple tasks with the same name. To target a task that has a name that is not unique, identify the task by specifying its unique, hexadecimal task ID, or use additional target options to refine the selection. v Locale-specific task names might not exist for every noninteractive task. The name specified must match the locale being used by the command line interface. v Use the lstask -r command to list all tasks that are valid for the targeted system.

Tip: This option cannot be used with the -s | --status option. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more tasks that run on systems that are based on attribute values specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Chapter 1. smcli

265

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 22: A specified task is not valid. v 25: A number-formatting error occurred. v 26: A specified system type is not valid. v 29: The specified locale is not valid or not supported. v 51: The task name or ID is not unique or valid. v 52: The task or subtask is interactive. v 53: The task ID was not found.

Examples
1. List all defined tasks This example illustrates how to list all define tasks.
smcli lstask

2. List the task ID for a specific task This example illustrates how to list the name and ID for the task named BladeCenter Assistant/BladeCenter Configuration.
smcli lstask -oT "BladeCenter Assistant/BladeCenter Configuration" BladeCenter Assistant/BladeCenter Configuration, 0x3D

3. List a task with a specific ID This example illustrates how to list detailed information about a task with the task ID 0x40.
smcli lstask -olT 0x40 Power management/ShutDown, 0x40: ST.1.name = Power management/ShutDown, 0x40 ST.1.targeted = true ST.1.interactive = false ST.1.exec.1.stat = Active ST.1.exec.1.stat.client.0 = {Sys1, 0x1A} Pending ST.1.exec.1.stat.client.1 = {Sys2, 0x2B} Failed ST.1.exec.2.stat = Complete ST.1.exec.2.stat.client.0 = {ServerA, 0x5F}, Complete ST.1.exec.2.stat.client.1 = {ServerB, 0x6B}, Failed

4. List job status for a subtask This example illustrates how to list the job-instance status for the subtask with the ID string %com.ibm.sysmgt.powerapi.ShutDown.
smcli lstask -os "%com.ibm.sysmgt.powerapi.ShutDown" Power management/ShutDown, 0x40: ST.targeted = true ST.interactive = false ST.1.exec.1.stat = Active ST.1.exec.1.stat.client.0 = {Sys1, 0x1A}, Pending ST.1.exec.1.stat.client.1 = {Sys2, 0x2B}, Failed ST.1.exec.2.stat = Complete ST.1.exec.2.stat.client.0 = (ServerA, 0x5F}, Complete ST.1.exec.2.stat.client.1 = (ServerB, 0x6B}, Failed

5. Display the status of a job using its job ID and instance This example illustrates how to display the status of job using the job ID 0x15 and instance 1.

266

IBM Systems Director Commands Reference

smcli lstask -s 0x15 -A 1 ST.1.exec.1.stat = Active ST.1.exec.1.stat.client.0 = system1, Pending ST.1.exec.1.stat.client.1 = system2, Failed

6. Display the status of a job using its job ID string and instance This example illustrates how to displays the status of a job with the ID string com.ibm.sysmgt.powerapi.ShutDown/com.ibm.sysmgt.powerapi.PowerOn and instance 1. Notice that the task ID and subtask ID strings match.
smcli lstask -s %com.ibm.sysmgt.powerapi.PowerOn/com.ibm.sysmgt.powerapi.PowerOn -A 1 ST.1.exec.1.stat = Active ST.1.exec.1.stat.client.0 = system1, Pending ST.1.exec.1.stat.client.1 = system2, Failed

7. Display the status of a job, using its job ID string and execution ID, that is running on a specific system This example illustrates how to display the status of a job with the job ID 0x15, job instance ID 1, running on the system named system1.
smcli lstask -s 0x15 -A 1 -n system1 Sys1, Pending

runtask command
Use the runtask command to run a non-interactive IBM Systems Director task on a specific system.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] runtask options For information about the options listed above that are specific to smcli, enter smcli -?. smcli runtask [-h | -? | --help] [-L language] smcli runtask [-L language] [-v] [-t system_type] [-W seconds] {-a | -f file_name | -w query | -i ip_address_list | -N group_list | [-n] system_list} noninteractive_task

Description
None.

Operands
This command uses a noninteractive task title, ID or string ID as an operand. task_oid The unique ID of the task, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: You can use the lstask -o -r command to list all task IDs that are valid for the targeted system.

Chapter 1. smcli

267

task_id_string The unique ID string of the task, prefixed with a percent sign (%) (for example, %BladeServerCfgTask). If the string ID contains a comma, prefix the comma with a backslash (\). Tip: You can use the lstask -I command to list all task ID strings that are valid for the targeted system. task_title The title of the task. The task title must be fully qualified with the parent task (for example, grandparent_task_title/parent_task_title/task_title). If the task name contains a comma, prefix the comma with a backslash (\). Enclose the task title in quotation marks if it contains a space character. Tips: v Task names might not be unique. This command acts on all tasks with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple tasks with the same name. To target a task that has a name that is not unique, identify the task by specifying its unique, hexadecimal task ID, or use additional target options to refine the selection. v Locale-specific task names might not exist for every noninteractive task. The name specified must match the locale being used by the command line interface. v Use the lstask -r command to list all tasks that are valid for the targeted system. Tip: v This option cannot be used with the -s | --task option. v An error is displayed if the specified task is not a noninteractive task.

Flags
-a | --all Targets all systems. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of noninteractive tasks. This list can be a mixture of task titles, IDs, and string IDs, separated by a comma and delimited by an end-of-line character. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples.

268

IBM Systems Director Commands Reference

Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more noninteractive targets that can be run on the specified systems, identified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed.
Chapter 1. smcli

269

v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more noninteractive tasks that run on the specified systems, identified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets one or more noninteractive tasks that run on the specified groups, identified by name or ID. The list can be a mixture of group names and IDs, separated by a comma. If the same systems are members of more than one group, they are targeted only once. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -t | --type system_type Narrows the specified targeted systems to all systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted.

270

IBM Systems Director Commands Reference

Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -W | --wait seconds Displays the results of the command after waiting the specified number of seconds, regardless of whether or not the task has been completed. Possible values for seconds are: v -1: Waits indefinitely for the task to finish before exiting and displaying the results. This value is the default if this option is not specified. v 0: Exits immediately, and the task continues to run in the background. Use the lsjob or lsjobhistory command to check the status. v 1 or greater: Exits after the specified number of seconds. If the task is completed before the specified wait period, this command displays the results. If the task is not completed before the specified wait period, the command exits and the task continues to run in the background. Use the lsjob or lsjobhistory command to check the status.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 26: A specified system type is not valid. v 27: A specified attribute is not valid. v 29: The specified locale is not valid or not supported. v 50: The specified task or subtask is not valid. v 51: The task name or ID is not unique or valid. v 52: The task or subtask is interactive. v 53: The task ID was not found. v 54: The task failed to start. v 126: The task did not complete before the specified wait time. The command is still running in the background. v 127: The command timed out.

Examples
1. Run a task on a system using the task ID string This example illustrates how to run a non-interactive task with ID string bluelight_ON on the system named websvr.
smcli runtask -n websvr %bluelight_ON

2. Collect inventory on multiple groups


Chapter 1. smcli

271

This example illustrates how to run the collect-inventory task on systems that are members of the payrollgroup and financegroup groups.
smcli runtask -N payrollgroup, financegroup "Inventory/Collect Inventory"

3. Apply a configuration profile This example illustrates how to apply a configuration-profile task named mybladeprofile to all systems that are members of the myblades group.
smcli runtask -N myblades mybladesprofile

4. Shut down a system This example illustrates how to gracefully quiesce all running processes and then shut down the operating system on systems that are members of the myblades group.
smcli runtask -N myblades "shutdown"

5. Power off a system This example illustrates how to gracefully quiesce all running processes, shut down the operating system, and then power off the system named blade1.
smcli runtask -n blade1 "power off"

6. Power off all virtual servers This example illustrates how to gracefully quiesce all running processes, shut down the operating system, and then power off all virtual servers.
smcli runtask -a "power off"

7. Power on a system This example illustrates how to power on a system named blade1.
smcli runtask -n blade1 "power on"

8. Restart a system This example illustrates how to restart a system named blade1.
smcli runtask -n blade1 "restart"

9. Turn on the LED on a system This example illustrates how to cause the LED to start blinking on a System x server named systemx_1.
smcli runtask -n systemx_1 %BlueLight_BLINK

10. Turn off the LED on a system This example illustrates how to cause the LED to stop blinking on a System x server named systemx_1.
smcli runtask -n systemx_1 %BlueLight_OFF

lsjob command
Use the lsjob command to list information about scheduled tasks (called jobs).

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsjob options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsjob [-h | -? | --help] [-L language] smcli lsjob [-L language] [-v] -J {low | medium | high} job

272

IBM Systems Director Commands Reference

smcli lsjob [-L language] [-v] [-m] [-s {status}] [-t system_type] [-o | -p] [-l] [-f file_name | -w query | -i ip_address_list | -N group_list | [-n] system_list| [-j] job_list]

Description
If no options are specified, this command displays the job name for all jobs. If this command targets systems, it displays all jobs scheduled for those systems. If the command targets jobs, it displays information about the jobs, including on which systems a job is scheduled.

Operands
This command optionally uses a list of job names or ID as an operand. The list can optionally be preceded by the -j | --jobs option.

Flags
-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of jobs to be displayed. This list can be a mixture of job names and ID, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more systems, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses.
Chapter 1. smcli

273

v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -j | --jobs {job_oid | job_name}[,{job_oid | job_name}...] Targets one or more jobs, specified by names or ID. This list can be a mixture of job names and ID, separated by a comma. job_oid The unique job ID, specified as a hexadecimal value prefixed with 0x (for example, 0x54). Tip: You can use the lsjob -o command to get a list of all job IDs. job_name The name of the job. Tips: v Job names might not be unique. This command acts on all jobs with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple jobs with the same name. To target a job that has a name that is not unique, identify the job by specifying its unique, hexadecimal group ID, or use additional target options to refine the selection. v The job name can be locale specific. The name specified must match the locale being used by the command line interface. v If the job name contains a comma, prefix the comma with a backslash (\). v You can use the lsjob command with no options to get a list of all job names. -J | --joblog [low | med | high] Displays the job log for the specified job. You display the log for only one job at a time. Specify low, med (medium), or high to identify the level of detail to display in the job log. The default value is low. -l | --long Displays detailed information about the specified jobs. This option returns these attributes for each job: v Job name and ID v Task performed v Targeted system names v Name of the user that created the job

274

IBM Systems Director Commands Reference

v v v v v v v v v

Email address of the user that created the job Notification condition Notification server Last run date and time Next scheduled run date and time Tasks Status of the job. Values are Completed and Scheduled. Next scheduled date and time. This field is empty if the job does not repeat. Status

-L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -m | --summary Displays scheduled jobs that ran in the last 30 days. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more jobs scheduled for the specified systems, identified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with
Chapter 1. smcli

275

the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets one or more jobs scheduled for the specified groups, identified by name or ID. The list can be a mixture of group names and IDs, separated by a comma. If the same systems are members of more than one group, they are targeted only once. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -o | --oid Displays the unique IDs associated with the targeted jobs. The IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x3e). Tip: You cannot use this option with the -p | --pipe option. -p | --pipe Displays only the unique IDs for the targeted jobs. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x37). Tips: v Use this option to pipe output from this command into other smcli commands. v This option cannot be used with the -o | --oid options. -s | --status {scheduled |running | inactive | complete } Lists all the jobs with the specified status. You can specify one of these values: v scheduled - Scheduled status lists all jobs that have not run before and are currently scheduled. v running - Running status shows all jobs that have future scheduled runs and are enabled. v inactive - Inactive status shows all jobs that have been disabled. v complete - Completed status shows all jobs that have completed and with no future scheduled runs -t | --type system_type Targets jobs that run on systems of the specified type.

276

IBM Systems Director Commands Reference

The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets jobs that run on one or more systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the values returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 26: A specified system type is not valid. v 29: The specified locale is not valid or not supported.

Examples
1. List all scheduled jobs This example illustrates how to list all scheduled jobs.

Chapter 1. smcli

277

smcli lsjob cleareventlog download updates collectinventory powerdown

2. Display detailed information about a specific job using the job ID This example illustrates how to display detailed information about a job with job ID 0x7d. Tip: For jobs that are yet to be run, the status would be scheduled. The Next Run attribute is blank for jobs that do not repeat.
smcli lsjob -l 0x7d Job: collectinventory, 0x7d Tasks: Collect Inventory Targets: dbserver, dataBK, bobmachine Creator Name: ibm user Creator E-mail: ibmUser@server.ibm.com Notification Condition: None Notification Server: localhost.austin.ibm.com Notification Server Port: 9090 Last Run: June 20, 2007 8:00:00 AM CDT Next Run: June 20, 2007 9:00:00 AM CDT Status: Active

3. List all completed jobs This example illustrates how to list all completed jobs with the status complete.
smcli lsjob -s complete cleareventlog download updates collectinventory

4. List jobs scheduled to run on a specific type of system This example illustrates how to list all jobs that are scheduled on systems with a type of Clusters.
smcli lsjob -t Clusters cleareventlog download updates

5. Display a job log This example illustrates how to display the job log for the job with job ID 0x50:
smcli lsjob JobLog for 11/30/2006 11/30/2006 11/30/2006 11/30/2006 11/30/2006 11/30/2006 11/30/2006 11/30/2006 11/30/2006 11/30/2006 11/30/2006 11/30/2006 -J high 0x50 job: 0x50 6:08:35 PM 6:08:35 PM 6:08:35 PM 6:08:35 PM 6:08:35 PM 6:08:36 PM 6:08:36 PM 6:08:36 PM 6:08:36 6:08:36 6:08:36 6:08:36 PM PM PM PM Job "MakeError" activated. Subtask "Collect Inventory" activated. Starting clients Clients started for task "Collect Inventory" Subtask instance status changed to "Active". Job instance status changed to "Active". 2FDIBM407 client job status changed to "Pending". The collection failed due to a security failure for client 2FDIBM407. 2FDIBM407 client job status changed to "Error". Subtask instance status changed to "Complete". Job instance status changed to "Active with errors". Job instance status changed to "Complete with errors".

6. List jobs running on a system

278

IBM Systems Director Commands Reference

This example illustrates how to list all jobs that can run on the system named system1.
smcli lsjob -n system1 cleareventlog download updates collectinventory

7. List job summary This example illustrates how to list a summary of scheduled jobs in the last 30 days.
smcli lsjob -m Number of jobs scheduled: 3 Number of jobs complete successfully: 0 Number of jobs failed with errors: 19 Upcoming job 1/24/08 3:22 1/24/08 3?50 1/24/08 4:06 runs: PM, Task1 PM, Task3 PM, Task4 Active Completed

Most recent job runs: 1/24/08 3:06 PM, Task1 1/24/08 2:50 PM, Task1

lsjobhistory command
Use the lsjobhistory command to list information about job instances and history data.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsjobhistory options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsjobhistory [-h | -? | --help] [-L language] smcli lsjobhistory [-L language] [-v] [-o | -p] [-l] [-s status] {-a | -f file_name | [-j] job_list}

Description
None.

Operands
This command uses a list of jobs as an operand. The list can optionally be preceded by the -j | --jobs option.

Flags
-a | --all Lists all job instances. Tip: If you do not specify this option, you must specify a job ID.

Chapter 1. smcli

279

-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of jobs to be displayed. This list can be a mixture of job names and ID, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -j | --jobs {job_oid | job_name}[,{job_oid | job_name}...] Targets one or more jobs, specified by names or ID. This list can be a mixture of job names and ID, separated by a comma. job_oid The unique job ID, specified as a hexadecimal value prefixed with 0x (for example, 0x54). Tip: You can use the lsjob -o command to get a list of all job IDs. job_name The name of the job. Tips: v Job names might not be unique. This command acts on all jobs with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple jobs with the same name. To target a job that has a name that is not unique, identify the job by specifying its unique, hexadecimal group ID, or use additional target options to refine the selection. v The job name can be locale specific. The name specified must match the locale being used by the command line interface. v If the job name contains a comma, prefix the comma with a backslash (\). v You can use the lsjob command with no options to get a list of all job names. -L | --lang language Specifies the language to use for the command.

280

IBM Systems Director Commands Reference

The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -l | --long Displays detailed information about the job. This option returns these attributes for each job: v Job: Name of the job v Tasks: Tasks that are associated with this job. v Instance ID: ID of the job instances v Status: Status of the job instance running on the system v Pending: A flag indicating whether the job instance is waiting for a resource to become available. v In Progress: A flag indicating whether the job instance is currently running. v Suspend: A flag indicating whether the job has been deactivated. v Managed Elements: The systems on which the job runs. v Completed: A flag indicating whether the job instance has completed. v Failed: The job failed on the a specific system. v Unavailable: The job status could not be determined on the system. The system might be offline. v Skipped: The job did not run on the system -o | --oid Displays the unique IDs associated with the targeted systems in addition to other information. Tips: v This option cannot be used with the -p | --pipe option. v You can combine this option with the -l | --long option. -p | --pipe Displays the unique IDs associated with the targeted systems in addition to other information. Tips:
Chapter 1. smcli

281

v When used alone, this option enables the output to be piped to other smcli commands. v This option cannot be used with the -o | --oid options. v You can combine this option with the -l | --long option. -s | --status {running | complete | wait | error} Lists all the job instances with the specified status. You can specify one of these states: v running - Running state. Lists all job instances that are currently running (in progress) v complete - Completed state. Lists all job instances that have completed. v wait - Waiting state. Lists all job instances that are waiting for a resource to become available. v error - Running with Errors, Complete with Errors, or Waiting with Errors states. Lists all job instances that produced errors while running, completed, or waiting. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 25: A number-formatting error occurred. v 26: An invalid job name or ID was specified. v 29: The specified locale is not valid or not supported.

Examples
1. List all instances IDs This example illustrates how to list all job-instance IDs for a specific job.
smcli lsjobhistory -a cleareventlog: [0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17]

2. List all job-instance IDs for a specific job This example illustrates how to list all job-instance IDs for a specific job.
smcli lsjobhistory cleareventlog cleareventlog: 43,45,46

3. Display detailed information about a job-instance This example illustrates how to display detailed information about job-instance for a job with ID 0x7df.
smcli lsjobhistory -l 0x7d

Job: collectinventory Tasks: Collect Inventory Instance ID: 0xf Status: Completed with error Pending: 0 In Progress: 0 Suspended: 1-

282

IBM Systems Director Commands Reference

Managed Resources: myhostname Complete: 0 Failed: 0 Unavailable: 0 Skipped: 0 Instance ID: 0x10 Status: Completed with error Pending: 0 In Progress: 0 Suspended: 1Managed Resource: myhostname Complete: 0 Failed: 0 Unavailable: 0 Skipped: 0

rmjob command
Use the rmjob command to delete one or more jobs. If more than one job has the same name, all jobs with that name are deleted.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] rmjob options For information about the options listed above that are specific to smcli, enter smcli -?. smcli rmjob [-h | -? | --help] [-L language] smcli rmjob [-L language] [-v] {-f file_name | [-j] job_list}

Description
None.

Operands
This command uses a list of jobs as an operand. The list can optionally be preceded by the -j | --jobs option.

Flags
-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of jobs to be deleted. This list can be a mixture of job names and IDs, separated by a comma or end-of-line character. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored.
Chapter 1. smcli

283

--help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -j | --jobs {job_oid | job_name}[,{job_oid | job_name}...] Targets one or more jobs, specified by names or ID. This list can be a mixture of job names and ID, separated by a comma. job_oid The unique job ID, specified as a hexadecimal value prefixed with 0x (for example, 0x54). Tip: You can use the lsjob -o command to get a list of all job IDs. job_name The name of the job. Tips: v Job names might not be unique. This command acts on all jobs with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple jobs with the same name. To target a job that has a name that is not unique, identify the job by specifying its unique, hexadecimal group ID, or use additional target options to refine the selection. v The job name can be locale specific. The name specified must match the locale being used by the command line interface. v If the job name contains a comma, prefix the comma with a backslash (\). v You can use the lsjob command with no options to get a list of all job names. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings.

284

IBM Systems Director Commands Reference

v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 25: A number-formatting error occurred. v 26: An invalid job name or ID was specified. v 29: The specified locale is not valid or not supported. v 63: Job could not be deleted.

Examples
1. Remove a job This example illustrates how to remove a job named myJob.
smcli rmjob myjob

2. Remove multiple jobs This example illustrates how to remove three jobs with job IDs 0x54 and 0x43 and name myJob.
smcli rmjob -j 0x54, myjob1, 0x43

rmjobhistory command
Use the rmjobhistory command to delete job instances or history.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] rmjobhistory options For information about the options listed above that are specific to smcli, enter smcli -?. smcli rmjobhistory [-h | -? | --help] [-L language] smcli rmjobhistory [-L language] [-v] [-I instance_list] {-f file_name | [-j] job_list}

Description
If more than one job has the same name, this command deletes job instances for all jobs with the same name. If no instance IDs are specified, this command deletes all job instances for the specified jobs.

Chapter 1. smcli

285

Operands
This command uses a list job names and ID as an operand. The list can optionally be preceded by the -j | --jobs option.

Flags
-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of jobs to be displayed. This list can be a mixture of job names and ID, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -I | --instance {instance_id [,instance_id...]} Deletes one or more job instances, specified by ID. The unique ID is specified as a hexadecimal value prefixed with 0x (for example, 0x37). If you do not specify this option, all job instances are deleted for the specified job. Tip: You can use the lsjobhistory -a command to get a list of all job-instance IDs for each job. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese

286

IBM Systems Director Commands Reference

Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -j | --jobs {job_oid | job_name}[,{job_oid | job_name}...] Targets one or more jobs, specified by names or ID. This list can be a mixture of job names and ID, separated by a comma. job_oid The unique job ID, specified as a hexadecimal value prefixed with 0x (for example, 0x54). Tip: You can use the lsjob -o command to get a list of all job IDs. job_name The name of the job. Tips: v Job names might not be unique. This command acts on all jobs with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple jobs with the same name. To target a job that has a name that is not unique, identify the job by specifying its unique, hexadecimal group ID, or use additional target options to refine the selection. v The job name can be locale specific. The name specified must match the locale being used by the command line interface. v If the job name contains a comma, prefix the comma with a backslash (\). v You can use the lsjob command with no options to get a list of all job names. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 25: A number-formatting error occurred. v 26: An invalid job name or ID was specified. v 29: The specified locale is not valid or not supported. v 60: The job-instance ID was not found.

Chapter 1. smcli

287

Examples
1. Remove all instances for a specific job This example illustrates how to remove all instances for the job myjob.
smcli rmjobhistory myjob

2. Removes multiple job instances This example illustrates how to removes job instances 0x23 and 0x43 for jobs 0x54, myjob1, and 0x43.
smcli rmjobhistory -I 0x43,0x23 -j 0x54,myjob1,0x43

runjob command
Use the runjob command to run one or more jobs immediately or schedule jobs to run at a specific date and time. You can also schedule a job to repeat automatically at a specified interval. Important: You can schedule only noninteractive tasks, which do not require any user input or interaction.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] runjob options For information about the options listed above that are specific to smcli, enter smcli -?. smcli runjob [-h | -? | --help] [-L language] smcli runjob [-L language] [-v] [-o | -p] {-f file_name | [-j] job_list} [-W wait_time]

Description
Running this command is the equivalent to using the Run Now from the action from the Web interface. If more than one job with the same name exists, the command runs all of the jobs. By default a job is run indefinitely until complete. When you run a job, the instance IDs of the jobs are displayed. You can use the instance ID to get the status of job using the lsjobhistory command. You can also us the instance ID to cancel the job using the rmjobhistory command.

Operands
This command uses a list of jobs as an operand. The list can optionally be preceded by the -j | --jobs option.

Flags
-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command.

288

IBM Systems Director Commands Reference

To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of jobs to run. This list can be a mixture of job names and IDs, separated by a comma or end-of-line character. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -j | --jobs {job_oid | job_name}[,{job_oid | job_name}...] Targets one or more jobs, specified by names or ID. This list can be a mixture of job names and ID, separated by a comma. job_oid The unique job ID, specified as a hexadecimal value prefixed with 0x (for example, 0x54). Tip: You can use the lsjob -o command to get a list of all job IDs. job_name The name of the job. Tips: v Job names might not be unique. This command acts on all jobs with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple jobs with the same name. To target a job that has a name that is not unique, identify the job by specifying its unique, hexadecimal group ID, or use additional target options to refine the selection. v The job name can be locale specific. The name specified must match the locale being used by the command line interface. v If the job name contains a comma, prefix the comma with a backslash (\). v You can use the lsjob command with no options to get a list of all job names. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English
Chapter 1. smcli

289

v v v v v v v v

es: Spanish fr: French it: Italian ja: Japanese ko: Korean pt_BR: Brazilian Portuguese zh_CN: Simplified Chinese zh_TW: Traditional Chinese

Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -o | --oid Displays the unique IDs associated with the targeted jobs in addition to other information. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x3e). Tip: This option cannot be used with the -p | --pipe option. -p | --pipe Displays only the unique IDs for the targeted jobs instead of the name. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x37). Tips: v When used alone, this option enables the output to be piped to other smcli commands. v This option cannot be used with the -o | --oid options. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -W | --wait seconds Displays the results of the command after waiting the specified number of seconds, regardless of whether or not the task has been completed. Possible values for seconds are: v -1: Waits indefinitely for the task to finish before exiting and displaying the results. This value is the default if this option is not specified. v 0: Exits immediately, and the task continues to run in the background. Use the lsjob or lsjobhistory command to check the status. v 1 or greater: Exits after the specified number of seconds. If the task is completed before the specified wait period, this command displays the results. If the task is not completed before the specified wait period, the command exits and the task continues to run in the background. Use the lsjob or lsjobhistory command to check the status.

290

IBM Systems Director Commands Reference

Exit status
The following table contains the values returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 25: A number-formatting error occurred. v 26: An invalid job name or ID was specified. v 29: The specified locale is not valid or not supported. v 80: The task completed successfully. v 81: The task completed with errors. v 82: None of the tasks completed. v 83: v All tasks completed successfully. v 84: All tasks completed with errors. v 85: All the tasks completed with errors. v 86: Some tasks completed, and all of those completely successfully. v 87: Some tasks completed, and all of those completed with errors. v 88: Submission Error v 126: The task did not complete before the specified wait time. The command is still running in the background. v 127: The command timed out.

Examples
1. Run a job This example illustrates how to run the job myJob.
smcli runjob myjob Job myJob submitted with job instance ID 0x8

2. Run a job and display results immediately This example illustrates how to run a long-running job with job ID 0x45. The command exists immediately and the job continues to run in the background.
smcli runjob -W 0 myjob Job myJob submitted with job instance ID 0x8

Update commands
Use the commands in this section to manage updates for systems. Note: The IBM Director v5.20 update commands are not supported in this release.

smcli commands
These smcli task and scheduled job commands are available: checkupd Use the checkupd command to check for new, changed, and superseding updates. cleanupd Use the cleanupd command to clean (that is, delete) update files and information in the update library. lsupd Use the lsupd command to list updates and their attributes.

Chapter 1. smcli

291

importupd Use the importupd command to import update information and installable files into the update library on the management server. installupd Use the installupd command to install one or more updates on one or more systems. uninstallupd Use the uninstallupd command to uninstall (roll back) an update on specified systems.

checkupd command
Use the checkupd command to check for new, changed, and superseding updates.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] checkupd options For information about the options listed above that are specific to smcli, enter smcli -?. smcli checkupd [-h | -? | --help] [-L language] smcli checkupd [-L language] [-v] {-a} [-W seconds] smcli checkupd [-L language] [-v] [-c] [-W seconds] [-t system_type] [-f file_name | -w query | -i ip_address_list | -N group_list | [-n] system_list]

Description
By default, this command queries for new, changed, or superseding updates for the specified systems and for systems that are members of specified groups. It also checks for requisite updates that are needed for known updates. If updates are found, this command downloads the descriptor files, which describe the updates, into the update library and imports the metadata. You can also download installable files for the found updates using the -d | --download option.

Operands
This command optionally uses a list of systems as an operand. The list can optionally be preceded by the -n | --names option.

Flags
-a | --all Acquires update information for all supported criteria, regardless of which platforms or systems are currently being managed. Tip: This option cannot be used with options that target systems. Attention: Use this option with care. This option attempts to acquire information for all known updates and might take a long time to complete.

292

IBM Systems Director Commands Reference

-c | --criteria Uses the default criteria for systems rather than update criteria associated with the compliance checks for each system. If you specify this option, the default criteria for the targeted systems is used. If you do not specify this option: v And a compliance policy that is assigned to the targeted systems or groups exists , the criteria from that compliance policy is used to check for updates. v And a compliance policy does not exist, no updates will be found. This is not considered an error condition. Tip: If you specify this option, you must also specify one or more systems or groups. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of systems to be considered for the check for updates. This list can be a mixture of names and IDs, separated by a comma or end-of-line character. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more systems, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS)
Chapter 1. smcli

293

suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more systems specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. If the -n option is not specified, then a customized event action that starts a noninteractive task on the system on which the event occurred is created. If the -n option is specified, then a customized event action that starts a noninteractive task on a specified system is created. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\).

294

IBM Systems Director Commands Reference

Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all systems in one or more specified groups that are identified by name or ID. The list can be a mixture of group names and IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -t | --type system_type Narrows the specified targeted systems to all systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.
Chapter 1. smcli

295

-w | --where "query" Targets one or more systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes. -W | --wait seconds Displays the results of the command after waiting the specified number of seconds, regardless of whether or not the task has been completed. Possible values for seconds are: v -1: Waits indefinitely for the task to finish before exiting and displaying the results. This value is the default if this option is not specified. v 0: Exits immediately, and the task continues to run in the background. Use the lsjob or lsjobhistory command to check the status. v 1 or greater: Exits after the specified number of seconds. If the task is completed before the specified wait period, this command displays the results. If the task is not completed before the specified wait period, the command exits and the task continues to run in the background. Use the lsjob or lsjobhistory command to check the status.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 26: A specified system type is not valid. v 29: The specified locale is not valid or not supported. v 81: An internal acquisition error occurred. v 86: A server representing the local machine could not be found. v 126: The task did not complete before the specified wait time. The command is still running in the background.

Examples
1. Check for updates on a single platforms using default criteria This example illustrates how to check for updates for all switches using default criteria.

296

IBM Systems Director Commands Reference

smcli checkupd -c -a -t Switch

2. Check for updates on a system using update criteria This example illustrates how to check for updates for the system named system1 using update criteria associated with the system's compliance checks.
smcli checkupd -n system1

3. Check for updates on all known systems This example illustrates how to check for new updates using all supported criteria, regardless of which platforms or systems are currently being managed. Important: This might take a very long time to complete.
smcli checkupd -a

cleanupd command
Use the cleanupd command to clean (that is, delete) update files and information in the update library.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] cleanupd options For information about the options listed above that are specific to smcli, enter smcli -?. smcli cleanupd [-h | -? | --help] [-L language] smcli cleanupd [-L language] [-v] [-m] [-F] {-a | -f file_name | -P query | [-u] update_list}

Description
This command cleans up the update library. By default, only the installable files in the update library are deleted. Deleting the update information is optional. Important: v An update might have physical files and corresponding information in locations other than the update library on the management server. These files are not cleaned up. v You cannot delete update information without also deleting the installable files. If you want to keep the installable update files, create a copy in another location before cleaning in the library.

Operands
This command optionally uses a list of updates as an operand. The list can optionally be preceded by the -u | --update option.

Flags
-a | --all Cleans (deletes) all installable files from the update library. Tip: If the -m | --metadata option is specified, all update information (metadata) is also deleted.

Chapter 1. smcli

297

-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of IDs or fix IDs for the update, separated by commas or line breaks. See the -u | --updates option for more information. -F | --force Forces the deletion of update information (metadata) for updates that require, supersede, or contain member updates, and also deletes required updates, superseded updates, and updates that are members of another update. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed.

298

IBM Systems Director Commands Reference

v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -m | --metadata Deletes update information (metadata) in addition to installable files and update descriptor files in the update library. Tip: If this option is specified without the -F | --force option, and update information (metadata) is for an update that is required, superseded, or a member of another update, the cleanup for that update will fail. -P | --patchfilter "query" Targets one or more updates (patches) based on update attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

Where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type string, a string must be specified. Tips: v Use the logical operators =, !=, >, <, >=, or >= between the key and value v Use logical operators AND or OR to combine attributes. v Use parenthesis to create nested logical constructs. v Only update attributes can be specified. Use the lsupd -l command to list the available update attributes. v Always enclose query in double quotation marks (for example, "Severity=0"). Do not use quotation marks within the query. v Enclose the value in single quotation marks if it contain special characters, including space, =, <, >, !, ), and (. v Only update attributes can be specified. Use the lsupd -l command to list the available update attributes. -u | --updates {update_oid | update_fix_id}[,{update_oid | update_fix_id}...] Targets one or more valid updates, specified by ID or fix ID (also called update ID). The list can be a mixture of IDs and fix IDs, separated by a comma. The list is delimited by the end-of-line character when read from a file. update_oid Specifies the unique ID of an update, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: Use the lsupd -o command to list all update IDs. update_fix_id Specifies the unique fix ID of an update (for example, SF99001G-47). Tip: Use lsupd -A DisplayName,UpdateId to list the current fix IDs. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.
Chapter 1. smcli

299

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 29: The specified locale is not valid or not supported. v 55: An error occurred while cleaning one or more updates. v 101: An update being cleaned is dependent on another update. The -F|--force option must be specified for a successful deletion. v 102: Command could not complete because a database error occurred.

Examples
1. Clean all update files and information This example illustrates how to delete all installable files, update descriptor files, and information from the update library. Important: Use this command with care. It cannot be undone.
smcli cleanupd -am

2. Clean update files for multiple updates This example illustrates how to delete the installable files for the updates with fix ID brcm_fw_nic_1.0.0_windows_32-64 and ID 0x78 from the update library. The update information is not deleted, so the installable files can be downloaded again. This command also displays verbose messages.
smcli cleanupd -v brcm_fw_nic_1.0.0_windows_32-64,0x78

lsupd command
Use the lsupd command to list updates and their attributes.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsupd options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsupd [-h | -? | --help] [-L language] smcli lsupd [-L language] [-v] [-a ] [-d symbol] [-o | -p] [-A attribute_list] [-s] | [{-l [-e]} | -m] [-f file_name | -P query | -U update_group_list | [-u] update_list]

Description
You can use this command list the update files, requisite updates, and superseding updates. If you do not specify any options, this command lists all fix ID (update IDs). By default, updates are listed one per update per line, and only the update ID is displayed. You can list additional attributes using the -A | --attribute options or list all attributes using the -l | --long option.

300

IBM Systems Director Commands Reference

Operands
This command uses a list of updates as an operand. The list can optionally be preceded by the -u | --updates option.

Flags
-a | --all Lists information about the update in addition to the specified update attributes, including: v The documentation files (such as readme files) and installable files that make up the update v Requisite updates and software v Superseding updates v Restart actions -A | --attribute key[,key ... ] Displays values for one or more specified attributes, where key is the attribute key. Tip: v The attributes and attributes values can be locale specific. v You can use the lsupd -l command to list all attributes associated with the targeted updates. -d | --delimiter symbol Specifies the character or set of characters that separates output data, where symbol is a string of one or more characters. The behavior of this option depends on the use of other options in the command, as shown below. v If you specify this option without the -A | --attribute option, this command separates data fields in a record by a comma followed by a space. Data records are separated by the specified delimiter symbol. v If you specify this option with the -A | --attribute option, this command separates data fields in a record by the specified delimiter symbol. Data records are separated by a line break. v If you specify this option with the -l | --long option, the delimiter option is ignored. -e | --expand Expands the long listing to also display a description of the attribute keys. Note: If you specify this option, you must also specify the -l | --long option. The information is displayed in this format:
key1 (key_string) : value1 key2 (key_string) : value2 ...

-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks.
Chapter 1. smcli

301

The input data is the list of IDs or fix IDs for the update, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -l | --long Display detailed information about each targeted update. This option lists these values for each update: v DisplayName: The displayable name of the update v Description: The description of the update v Version: The version of the update. The version is not applicable to patches or temporary fixes. v UpdateID: The unique fix ID of all updates of the same provider type. v Severity: The severity of the update, which helps determine the importance of the update. Possible values are Critical, High, Medium, Low and None. v ComponentName: The identifier of the product that would be updated. v Vendor: The organization that created the update. v RestartType: The kind of restart required if the update is installed. v Superseded: A flag indicating whether this update has been superseded by another update. v Platform: The hardware platform to which the update applies. v Uninstallable: A flag indicating whether this update can be uninstalled. v BuildDate: The build date for the update as stated in the update's descriptor (SDD). v BuildNumber: The build number for this update as stated in the update's descriptor (SDD). v FixType: The type of fix, such as an individual update, a collection of updates, or an information-only update. v PackageType: The update package type as defined by the Solution Deployment Descriptor standard (for example, base installation or maintenance) v SoftwareID: The identifier of the software product to which the update applies v Category : The category (type) of update as defined by the vendor v ImpactStatement: The affect of this update after it is installed v AcquiredDate: The date when the update was downloaded

302

IBM Systems Director Commands Reference

v TotalSize: The total size, in bytes, of all files that belong to this update v Downloaded: A flag that indicates whether all installable files for the update have been downloaded v Filenames: The names of the files that belong to the update -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -m | --members Lists all updates that are members of each targeted update collection. Note: This option cannot be used with the -l | --long, -e | --expand, or --a | --all option. -o | --oid Displays the unique IDs associated with the targeted updates in addition to other information. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x3e). Tips: v This option cannot be used with the -p | --pipe option. v You can combine this option with the -l | --long and -A | --attribute options. -P | --patchfilter "query" Targets one or more updates (patches) based on update attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

Where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type string, a string must be specified.
Chapter 1. smcli

303

Tips: v Use the logical operators =, !=, >, <, >=, or >= between the key and value v Use logical operators AND or OR to combine attributes. v Use parenthesis to create nested logical constructs. v Only update attributes can be specified. Use the lsupd -l command to list the available update attributes. v Always enclose query in double quotation marks (for example, "Severity=0"). Do not use quotation marks within the query. v Enclose the value in single quotation marks if it contain special characters, including space, =, <, >, !, ), and (. v Only update attributes can be specified. Use the lsupd -l command to list the available update attributes. -p | --pipe Displays only the unique IDs for the targeted systems instead of the name. Tips: v IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x37). v When used alone, this option enables the output to be piped to other smcli commands. v This option cannot be used with the -o | --oid options. v You can combine this option with the -l | --long and -A | --attribute options. -s | --sort Sorts the output by the first specified attribute. Tip: If you specify this option, you must also specify the -A | --attribute option. Otherwise, this option is ignored. -u | --updates {update_oid | update_fix_id}[,{update_oid | update_fix_id}...] Targets one or more valid updates, specified by ID or fix ID (also called update ID). The list can be a mixture of IDs and fix IDs, separated by a comma. The list is delimited by the end-of-line character when read from a file. update_oid Specifies the unique ID of an update, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: Use the lsupd -o command to list all update IDs. update_fix_id Specifies the unique fix ID of an update (for example, SF99001G-47). Tip: Use lsupd -A DisplayName,UpdateId to list the current fix IDs. -U | --updategroups {update_group_oid | update_group_name}[,{update_group_oid | update_group_name}...] Targets updates in one or more update groups, specified by name or ID. The list can be a mixture of names and ID, separated by a comma. The list is delimited by the end-of-line character when read from a file.

304

IBM Systems Director Commands Reference

update_group_oid Specifies the unique hexadecimal ID of an update group. Tip: Use the lsgp -o -m Update command to list all group IDs. update_group_name Specifies the name of an update group. Enclose the user name in quotation marks if it contains a space character. Tips: v The update-group names not locale specific. v Use the lsgp command without any options to list all group names. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 21: The specified update group is not valid. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 50: The specified update is not valid.

Examples
1. List all fix IDs This example illustrates how to list all update fix IDs (also called updates IDs).
smcli lsupd SA12345 com.ibm.usmi.services.updates_1.0.2 systemx_1.0.5

2. List all information of an update This example illustrates how to list all information for the update with fix ID SA12345.
smcli lsupd -l -a SA12345

3. List expanded attributes of an update This example illustrates how to list all attributes for the update with fix ID SA12345 and a description of those attributes.
smcli lsupd -l -e SA12345

4. List update that match a query This example illustrates how to list the fix IDs (also called updates IDs) of all updates with version 1.2 or 1.3.
smcli lsupd -P "Version==1.2 OR Version==1.3"

5. Sort output by update name This example illustrates how to list the update name and version and sort the output by update name.
smcli lsupd -sA Name,Version

6. List all update collections


Chapter 1. smcli

305

This example illustrates how to list the names of all updates that are collections containing multiple updates.
smcli lsupd -P "FixType=Collection"

lsver command
Use the lsver command to list the current version and, if you have updated the product, the previous version of IBM Systems Director that is or was installed on the system.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsver options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsver [-h | -? | --help] [-L language] smcli lsver [-L language] [-p]

Description
The lsver command lists the current version of IBM Systems Director. Specifying the -p option will instead list the previous version of IBM Systems Director, if applicable.

Operands
None.

Flags
-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian

306

IBM Systems Director Commands Reference

v v v v v

ja: Japanese ko: Korean pt_BR: Brazilian Portuguese zh_CN: Simplified Chinese zh_TW: Traditional Chinese

Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -p | --previous_version Lists the previous version of IBM Systems Director.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 73: The product version was not available.

Examples
1. List the currently-installed version of IBM Systems Director This example illustrates how to list the version of IBM Systems Director that is currently installed on the system.
smcli lsver

2. List the previously-installed version of IBM Systems Director This example illustrates how to list the version of IBM Systems Director that was on the system before the current version was installed.
smcli lsver -p

importupd command
Use the importupd command to import update information and installable files into the update library on the management server.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] importupd options For information about the options listed above that are specific to smcli, enter smcli -?. smcli importupd [-h | -? | --help] [-L language] smcli importupd [-L language] [-v] [-c] [-s] [-o] [-r] [-W seconds] {path}

smcli importupd [-L language] [-v] [-c] [-o] [-W seconds] [-u update] {path_list}
Chapter 1. smcli

307

Description
This command adds information and files for one or more updates to the update library on the management system. The update information comes from descriptor files identified by path (either specified directly or in the directory). Any update documentation or installable files in the specified path that are associated with the update are also copied to the update library.

Operands
This command uses one or more paths, separated by a comma, as an operand. If you do not specify an update, the path must be the full path and name of one or more update descriptor files (*.sdd) or the directory that contains one or more update descriptor files. By default, this command first attempts to create update descriptor files from existing update information at the given path. Specify the -s | --skipgenerate option to prevent generation of any update descriptor files (*.sdd). If you specify the -r | --recurse option, this command searches all subdirectories for update descriptor files and update information. Tip: If the directory or file name in the path contains spaces, enclose the path in quotation marks. Note: The specified path must be to a local directory. Network mounted directories cannot be used.

Flags
-c | --clean Cleans (deletes) the original files after the import completes successfully. Tip: If errors occur during the import, the files are not deleted. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French

308

IBM Systems Director Commands Reference

v v v v v v

it: Italian ja: Japanese ko: Korean pt_BR: Brazilian Portuguese zh_CN: Simplified Chinese zh_TW: Traditional Chinese

Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -o | --overwrite Overwrites the update if it already exists in the update library. Tip: If you do not specify this option and the update already exists, the update is not imported again. -r | --recurse Searches all subdirectories in the specified path for updates to import. Tip: You can specify this option only if the operand is a directory. This option is not valid if the operand is a directory and file name. -s | --skipgenerate Prevents the generation of any update descriptor files (*.sdd). Tip: Update descriptor files are generated by default if this option is not specified. -u | --updates {update_oid | update_fix_id} Imports one or more files for an existing update, specified by ID or fix ID (update ID), into an existing update. update_oid Specifies the unique ID of an update, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: Use the lsupd -o command to list all update IDs. update_fix_id Specifies the unique fix ID of an update (for example, SF99001G-47). Tip: Use lsupd -A DisplayName,UpdateId to list the current fix IDs. Tip: To import a new update that is not currently being managed, do not specify this option. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -W | --wait seconds
Chapter 1. smcli

309

Displays the results of the command after waiting the specified number of seconds, regardless of whether or not the task has been completed. Possible values for seconds are: v -1: Waits indefinitely for the task to finish before exiting and displaying the results. This value is the default if this option is not specified. v 0: Exits immediately, and the task continues to run in the background. Use the lsjob or lsjobhistory command to check the status. v 1 or greater: Exits after the specified number of seconds. If the task is completed before the specified wait period, this command displays the results. If the task is not completed before the specified wait period, the command exits and the task continues to run in the background. Use the lsjob or lsjobhistory command to check the status.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 29: The specified locale is not valid or not supported. v 50: The specified update is not valid. v 53: The specified update already exists in the update library on the management server. v 86: A server representing the local machine could not be found. v 93: An error occurred while parsing the update descriptor file. v 94: An error occurred while generating a descriptor file for this update. v 126: The task did not complete before the specified wait time. The command is still running in the background.

Examples
1. Import an update This example illustrates how to copy the d:\myupdates directory (because it is read-only media) to a temporary writable location on the management server. It searches that directory and all subdirectories for update descriptor files (*.sdd) and, if no files are found, automatically generates update descriptor files for platforms that are known to IBM Systems Director. Then, it imports installable files and the update information described in the update-package descriptor files into the update library. Finally, the files in the temporary location are deleted. Tip: If the d:\myupdates directory is on a read/write file system, the initial copy to a temporary location will not occur.
smcli importupd -c -r d:\myupdates

2. Import an update for IBM i This example illustrates how to import the SI01234.SAVF save file, which is an IBM i PTF binary, into the update library for the specified update.
smcli importupd -o -u SI01234 c:\SI01234.SAVF

installupd command
Use the installupd command to install one or more updates on one or more systems.

310

IBM Systems Director Commands Reference

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] installupd options For information about the options listed above that are specific to smcli, enter smcli -?. smcli installupd [-h | -? | --help] [-L language] smcli installupd [-L language] [-v] [-s function] [-F] [-W seconds] [-t system_type] {-f file_name | -w query | -i ip_address_list | -N group_list | -n system_list} {-P query | -U update_group_list | [-u] update_list}

Description
By default, this command: 1. Downloads the specified and requisite installable files if they do not exist in the update library. 2. Distributes the installable files to the systems. 3. Installs requisite updates and restarts the systems, operating system, or software if necessary. 4. Installs the specified update and restarts the systems, operating system, or software if necessary. 5. Performs an inventory discovery on the systems after installation completes. Inventory discovery obtains the latest software levels on the systems. You can use the --skip option to skip one or more of these steps. Important: The systems, operating system, or software might be restarted, even if you specify the --skip restart option, if the native installation mechanism performs the restart independent of the IBM Systems Director Server's control.

Operands
This command uses a list of update IDs and fix IDs as an operand. The list can optionally be preceded by the -u | --update option.

Flags
-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of system names and IDs, separated by commas or line breaks. -F | --force Attempts to install the updates regardless of whether they apply to the target systems. Only the specified updates are forced. Requisite updates that are not explicitly specified will be installed only if they apply to the target systems.

Chapter 1. smcli

311

Attention: Use this option with care. Installing updates that do not apply to the target system can cause the system to become unstable. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more systems, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese

312

IBM Systems Director Commands Reference

v v v v

ko: Korean pt_BR: Brazilian Portuguese zh_CN: Simplified Chinese zh_TW: Traditional Chinese

Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more systems specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. If the -n option is not specified, then a customized event action that starts a noninteractive task on the system on which the event occurred is created. If the -n option is specified, then a customized event action that starts a noninteractive task on a specified system is created. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all systems in one or more specified groups that are identified by name or ID. The list can be a mixture of group names and IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group.

Chapter 1. smcli

313

group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -P | --patchfilter "query" Targets one or more updates (patches) based on update attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

Where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type string, a string must be specified. Tips: v Use the logical operators =, !=, >, <, >=, or >= between the key and value v Use logical operators AND or OR to combine attributes. v Use parenthesis to create nested logical constructs. v Only update attributes can be specified. Use the lsupd -l command to list the available update attributes. v Always enclose query in double quotation marks (for example, "Severity=0"). Do not use quotation marks within the query. v Enclose the value in single quotation marks if it contain special characters, including space, =, <, >, !, ), and (. v Only update attributes can be specified. Use the lsupd -l command to list the available update attributes. -s | --skip {function}[,{function}...] Skips one or more default steps during installation. You can specify one or more of these values, separated by a comma: v distribution - Does not download or distribute the specified or requisite installable files. If you specify this function, the installable files must already exist on the targeted systems. v discovery - Does not perform an inventory discovery after the installation completes. Inventory discovery should be run on the targeted system when all updates are complete to obtain the latest software levels on the systems. v requisites - Does not install requisite updates. v restart - Does not restart the systems, operating system, or software during the installation. -t | --type system_type

314

IBM Systems Director Commands Reference

Narrows the specified targeted systems to all systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -u | --updates {update_oid | update_fix_id}[,{update_oid | update_fix_id}...] Targets one or more valid updates, specified by ID or fix ID (also called update ID). The list can be a mixture of IDs and fix IDs, separated by a comma. The list is delimited by the end-of-line character when read from a file. update_oid Specifies the unique ID of an update, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: Use the lsupd -o command to list all update IDs. update_fix_id Specifies the unique fix ID of an update (for example, SF99001G-47). Tip: Use lsupd -A DisplayName,UpdateId to list the current fix IDs. -U | --updategroups {update_group_oid | update_group_name}[,{update_group_oid | update_group_name}...] Targets updates in one or more update groups, specified by name or ID. The list can be a mixture of names and ID, separated by a comma. The list is delimited by the end-of-line character when read from a file. update_group_oid Specifies the unique hexadecimal ID of an update group. Tip: Use the lsgp -o -m Update command to list all group IDs. update_group_name Specifies the name of an update group. Enclose the user name in quotation marks if it contains a space character. Tips: v The update-group names not locale specific. v Use the lsgp command without any options to list all group names. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more systems based on system attributes specified by query.

Chapter 1. smcli

315

The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes. -W | --wait seconds Displays the results of the command after waiting the specified number of seconds, regardless of whether or not the task has been completed. Possible values for seconds are: v -1: Waits indefinitely for the task to finish before exiting and displaying the results. This value is the default if this option is not specified. v 0: Exits immediately, and the task continues to run in the background. Use the lsjob or lsjobhistory command to check the status. v 1 or greater: Exits after the specified number of seconds. If the task is completed before the specified wait period, this command displays the results. If the task is not completed before the specified wait period, the command exits and the task continues to run in the background. Use the lsjob or lsjobhistory command to check the status.

Exit status
The following table contains the codes returned by this command v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 22: The specified update group is not valid. v 26: A specified system type is not valid. v 29: The specified locale is not valid or not supported. v 50: The specified update is not valid. v 59: The installable files have not been downloaded. v 60: An error occurred during installation. v 63: A required restart could not be completed. v 65: Discovery could not be initiated. v 126: The task did not complete before the specified wait time. The command is still running in the background.

Examples
1. Install an update

316

IBM Systems Director Commands Reference

This example illustrates how to download, distribute, and install the update fix ID of com.ibm.foo_1.0.0 and any requisite updates on the system named system1, and then restart and perform an inventory discovery on the system.
smcli installupd -n system1 -u com.ibm.foo_1.0.0

2. Install an update, but skip distribution This example illustrates how to install the update with ID 0x83 and any requisite updates on the system with ID 0x92, and then restart and perform an inventory discovery on the system. The installable files are not downloaded or distributed.
smcli installupd -s distribution -n 0x92 0x83

3. Install an update and skip distribution, requisite updates, and restart This example illustrates how to install only the update with ID 0x83 on systems of type OperatingSystem with IP address 9.10.111.100, and then perform an inventory discovery on the system. The installable files are not downloaded or distributed, requisite updates are not installed, and the system is not restarted.
smcli installupd -s distribution,requisites,restarts -i 9.10.111.100 -t OperatingSystem -u 0x83

uninstallupd command
Use the uninstallupd command to uninstall (roll back) an update on specified systems.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] uninstallupd options For information about the options listed above that are specific to smcli, enter smcli -?. smcli uninstallupd [-h | -? | --help] [-L language] smcli uninstallupd [-L language] [-v] [-s function] [-W seconds] [-t resource_type] {-f file_name | -w query | -i ip_address_list | -N group_list | -n resource_list} {-U update_group_list | [-u] update_list}

Description
This command removes or rollbacks the specified updates from one or more systems. By default, this command: 1. Uninstalls the specified update, and restarts the systems, operating system, or software if necessary. 2. Uninstalls requisite updates, and restarts the systems, operating system, or software if necessary. 3. Performs an inventory discovery on the systems after update is removed. You can use the --skip option to skip one or more of these steps. Important: The systems, operating system, or software might be restarted, even if you specify the --skip restart option, if the native installation mechanism performs the restart independent of the IBM Systems Director Server's control.

Chapter 1. smcli

317

Operands
This command uses a list of update IDs and names as an operand. The list can optionally be preceded by the -u | --update option.

Flags
-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of system names and IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more systems, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific.

318

IBM Systems Director Commands Reference

v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more systems specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. If the -n option is not specified, then a customized event action that starts a noninteractive task on the system on which the event occurred is created. If the -n option is specified, then a customized event action that starts a noninteractive task on a specified system is created. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection.
Chapter 1. smcli

319

v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all systems in one or more specified groups that are identified by name or ID. The list can be a mixture of group names and IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -s | --skip function[,{function}...] Skips one or more default functions during installation. You can specify one or more of these values: v discovery - Does not perform an inventory discovery after the roll back completes. Inventory discovery should be run on the targeted system when all updates are uninstalled to obtain the latest software levels on the systems. v requisites - Does not uninstall requisite updates. v restart - Does not restart the systems, operating system, or software during the uninstallation. -t | --type system_type Narrows the specified targeted systems to all systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific.

320

IBM Systems Director Commands Reference

-u | --updates {update_oid | update_fix_id}[,{update_oid | update_fix_id}...] Targets one or more valid updates, specified by ID or fix ID (also called update ID). The list can be a mixture of IDs and fix IDs, separated by a comma. The list is delimited by the end-of-line character when read from a file. update_oid Specifies the unique ID of an update, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: Use the lsupd -o command to list all update IDs. update_fix_id Specifies the unique fix ID of an update (for example, SF99001G-47). Tip: Use lsupd -A DisplayName,UpdateId to list the current fix IDs. -U | --updategroups {update_group_oid | update_group_name}[,{update_group_oid | update_group_name}...] Targets updates in one or more update groups, specified by name or ID. The list can be a mixture of names and ID, separated by a comma. The list is delimited by the end-of-line character when read from a file. update_group_oid Specifies the unique hexadecimal ID of an update group. Tip: Use the lsgp -o -m Update command to list all group IDs. update_group_name Specifies the name of an update group. Enclose the user name in quotation marks if it contains a space character. Tips: v The update-group names not locale specific. v Use the lsgp command without any options to list all group names. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks.
Chapter 1. smcli

321

v Only system attributes can be specified. Use the lssys -l command to list the available system attributes. -W | --wait seconds Displays the results of the command after waiting the specified number of seconds, regardless of whether or not the task has been completed. Possible values for seconds are: v -1: Waits indefinitely for the task to finish before exiting and displaying the results. This value is the default if this option is not specified. v 0: Exits immediately, and the task continues to run in the background. Use the lsjob or lsjobhistory command to check the status. v 1 or greater: Exits after the specified number of seconds. If the task is completed before the specified wait period, this command displays the results. If the task is not completed before the specified wait period, the command exits and the task continues to run in the background. Use the lsjob or lsjobhistory command to check the status.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 22: The specified update group is not valid. v 26: A specified system type is not valid. v 29: The specified locale is not valid or not supported. v 50: The specified update is not valid. v 61: The specified or requisite update cannot be uninstalled. v 62: An error occurred during uninstallation. v 63: A required restart could not be completed. v 65: Discovery could not be initiated. v 126: The task did not complete before the specified wait time. The command is still running in the background.

Examples
1. Uninstall an update This example illustrates how to uninstall the update with fix ID com.ibm.foo_1.0.0 and any requisite updates on the system named system1, and then restarts and performs an inventory discovery on the system.
smcli uninstallupd -n system1 com.ibm.foo_1.0.0

2. Uninstall an update and skip discovery and restart This example illustrates how to uninstall the update with ID 0x83 and any requisite updates on the systems with IDs 0x92 and 0x123. The systems are not restart and inventory discovery is not performed after the uninstallation completes.
smcli uninstallupd -s discovery,restart -n 0x92,0x123 0x83

Security commands
Use the commands in this section to manage security certificates and authorizations for users and user-groups for IBM Systems Director.

322

IBM Systems Director Commands Reference

Note: The IBM Director v5.20 user-administration and security commands are not supported in this release.

smcli commands
These smcli security commands are available: authusergp Use the authusergp command to authorize an existing user group to access the IBM Systems Director Server. chusergp Use the chusergp command to change attributes and access privileges for a user group. lsusergp Use the lsusergp command to list the IBM Systems Director user groups. rmusergp Use the rmusergp command to remove a user group's authorization to access IBM Systems Director Server. chuser Use the chuser command to change the attributes and access settings for a specific user. lsuser Use the lsuser command to list IBM Systems Director users. chrole Use the chrole command to change the properties of a role. lsperm Use the lsperm command to list the permissions. lsrole mkrole Use the mkrole command to create roles that contain a list of permissions for authorization to access IBM Systems Director. rmrole Use the rmrole command to delete roles. Use the lsrole command to list the roles in IBM Systems Director.

authusergp command
Use the authusergp command to authorize an existing user group to access the IBM Systems Director Server.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] authusergp options For information about the options listed above that are specific to smcli, enter smcli -?. smcli authusergp [-h | -? | --help] [-L language] smcli authusergp [-L language] [-v] { -f file_name | [-U] user_group_list}

Description
By default, all the operating-system user groups are authorized for access. The authorization of all groups that are not explicitly specified is removed when you run this command. You must explicitly authorize operating-system user groups if you run this command.
Chapter 1. smcli

323

Values that are specified for the authusergp command are encrypted and stored until the group authorization is removed. Tip: You can use the lsusergp command to list user groups that are authorized to access IBM Systems Director Server.

Operands
This command uses a user-group list as an operand. The list can optionally be preceded by the -U | --usergroup option.

Flags
-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data must contain one or more user groups. This list can be a mixture of names and ID, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips:

324

IBM Systems Director Commands Reference

v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -U | --usergroup user_group_name[,user_group_name...] Targets one or more operating-system user groups, specified by name. The list is delimited by the end-of-line character when read from a file. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 51: The specified user group is not valid.

Examples
Authorize multiple user groups This example illustrates how to authorize the user groups named Administrator and Guests.
smcli authusergp Administrators,Guests

cfgcred command
Use the cfgcred command to configure credentials for systems managed by IBM Systems Director.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] cfgcred options For information about the options listed above that are specific to smcli, enter smcli -?. smcli cfgcred [-h | -? | --help] [-L language] smcli cfgcred [-L language] [-S Director_user] {-W Director_user_password} {-r rsap} {-c cred_type} {-U username} {[-K RSAKeyLocation [-A alias]] -P password} | {-C community -V version} | {-E authpassword -O authprotocol -R prvpwd -T prvprotocol -N profilename -X contextname -I contextengID -V version}}

Chapter 1. smcli

325

Description
The cfgcred command enables you to configure credentials for systems managed by IBM Systems Director.

Flags
-c PASSWORD | RSA | SNMPv1 | SNMPv3 | X509 Specifies the type of credentials to configure. Each type has additional options: PASSWORD -U username -P password RSA -U username -K RSAKeyLocation -P password SNMPv1 -U username -C community -V version SNMPv3 -U username -E authpassword -O authprotocol -R prvpwd -T prvprotocol -N profilename -X contextname -I contextengID -V version X509 -U username -K RSAKeyLocation -P password -A alias -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country

326

IBM Systems Director Commands Reference

code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -r rsap Specifies to list the credentials for the specified remote service access point. Tip: To determine the remote service access point, you can use the lsinv command with the -e option for the RemoteServiceAccessPoint inventory type. For example, you could specify smcli lsinv -e RemoteServiceAccessPoint -n system_name, where system_name is the name of the host system. Then, in the output, look for the value corresponding to RemoteServiceAccessPoint.AccessInfo. -S Director_user Specifies to configure credentials for a specified IBM Systems Director user if the command is used only by users with a role of SMAdministrator. -W Director_user_password Specifies the user password of the IBM Systems Director user to be used for identity creation.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 27: A specified attribute is not valid. v 29: The specified locale is not valid or not supported.

Examples
1. Configure credentials for the PASSWORD credential type This example illustrates how to create PASSWORD credentials for a remote service access point using the PASSWORD credential type. In this example: adminpwd is the Director_user_password https://9.126.88.222:22/ is the rsap root is the user_name rootpwd is the password
smcli cfgcred -W adminpwd -r https://9.126.88.222:22/ -c PASSWORD -U root -P rootpwd

2. Configure credentials for the X509 credential type for another user (from a user with a role of SMAdministrator) This example illustrates how to create X509 credentials for another user from a user with SMAdministrator authority. In this example: testuser is the Director_user testuserpwd is the Director_user_password https://9.126.88.222:22/ is the rsap root is the user_name C:\key.txt is the ras_key_location rootpwd is the password test is the alias

smcli cfgcred -S testuser -W testuserpwd -r https://9.126.88.222:22/ -c X509 -U root -K C:\key.


Chapter 1. smcli

327

chaudit command
Use the chaudit command to modify audit settings.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] chaudit options For information about the options listed above that are specific to smcli, enter smcli -?. smcli chaudit [-h | -? | --help] [-L language] [-e | -d] [-r | [[-a category_names] [-x category_names]]]

Description
You can use this command to change current audit settings, restore the default values, and modify the list of audit categories. At least one option is required.

Flags
-a category_name [,category_name...] Specifies the categories to be added to the list of enabled audit categories. Each category is separated by a comma. -d Specifies to disable auditing globally. -e Specifies to enable auditing globally. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese

328

IBM Systems Director Commands Reference

v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -r Specifies to restore audit settings to their default values.

-x category_name [, category_name...] Specifies the categories to be removed from the list of enabled audit categories. Each category is separated by a comma.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 27: A specified attribute is not valid. v 29: The specified locale is not valid or not supported.

Examples
1. Enable auditing This example illustrates how to enable auditing.
smcli chaudit -e

2. Add audit categories to the list of audit categories This example illustrates how to add FileRead and RemoteAccess to the list of enabled audit categories.
smcli chaudit -a FileRead,RemoteAccess

3. Remove audit categories from the list of audit categories This example illustrates how to remove FileWrite and Security from the list of enabled audit categories.
smcli chaudit -x FileWrite,Security

4. Restore default audit settings This example illustrates how to restore audit settings to the default values.
smcli chaudit -r

chcred command
Use the chcred command to change credentials for systems managed by IBM Systems Director.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] chcred options For information about the options listed above that are specific to smcli, enter smcli -?.

Chapter 1. smcli

329

smcli chcred [-h | -? | --help] [-L language] smcli chcred [-L language] {-t target_identity_ID} {-c cred_type} {{-P password {-K RSAKeyLocation [-A alias]]} | {-C community -V version} | {-E authpassword -O authprotocol -R prvpwd -T prvprotocol -N profilename -X contextname -I contextengID -V version}}

Description
The chcred command enables you to change existing credentials for systems managed by IBM Systems Director.

Flags
-c PASSWORD | RSA | SNMPv1 | SNMPv3 | X509 Specifies the type of credentials to change. Each type has additional options: PASSWORD -P password RSA -K RSAKeyLocation -P password SNMPv1 -C community -V version SNMPv3 -E authpassword -O authprotocol -R prvpwd -T prvprotocol -N profilename -X contextname -I contextengID -V version X509 -K RSAKeyLocation -P password -A alias -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese

330

IBM Systems Director Commands Reference

Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -t target_identity_ID Configure credentials for a specified target identity ID.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 27: A specified attribute is not valid. v 29: The specified locale is not valid or not supported.

Examples
1. Change credentials for the PASSWORD credential type fir the specified system This example illustrates how to change PASSWORD credentials for a system. In this example, 5A4066582C563AFF9976F80C54C0931D is the target_identity_ID, root is the user_name, and newpwd is the password.
smcli chcred -t 5A4066582C563AFF9976F80C54C0931D -c PASSWORD -U root -P newpwd

2. Change the key location for X509 credentials for a specified system This example illustrates how to change the key location for X509 credentials for a system. In this example, DD6A3F6008553876A883E40F5363B8BA is the target_identity_ID and C:\newloc\key.txt is the ras_key_location.
smcli chcred -t DD6A3F6008553876A883E40F5363B8BA -c X509 -K C:\newloc\key.txt

chusergp command
Use the chusergp command to change attributes and access privileges for a user group.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] chusergp options For information about the options listed above that are specific to smcli, enter smcli -?. smcli chusergp [-h | -? | --help] [-L language] smcli chusergp [-L language] [-v] {-f file_name} smcli chusergp [-L language] [-v] {-e extend_list | -r remove_list | -A attribute_list} user_group

Chapter 1. smcli

331

Description
You can use this command to add or remove roles from a user group. When adding the roles to a user group, you can specify a system group list to identify the systems on which the role is valid. You can also use this command to change the description and full name of the user group.

Operands
This command uses a user group as an operand. The user_group operand specifies the user group to be changed. Tip: You can use the lsusergp command without any options to list all user groups.

Flags
-A | --attribute {key=value}[,key=value...] Changes the value of one or more specified attributes, where key is the attribute name and value is the attribute value. The keys-value pairs are separated by a comma. Tip: The attributes and attribute values are not locale specific. You can specify any of the following attribute keys:
Key Description FullName Data type string string Description Description of the user. The full name of the user.

-e | --extend {role_oid | role_name[:group_oid | group_name[;group_oid | group_name]...]},{role_oid | role_name[:group_oid | group_name[;group_oid | group_name]... ]...} Assigns one or more roles, specified by name or IDs, to the user, and optionally applies the roles to one or more groups, also specified by name or ID. This list can be a mixture of names and IDs. If the role is followed by one or more system groups, role is assigned to user and is applied to the specified groups. If the role is not followed by one or more groups, the role is applied to all system groups. The role and the groups are separated by a colon (:). The groups are separated by a semicolon (;). Each role and group pair is separated by a comma (,) or a semicolon (;). Note: If the list contains a semicolon, enclose it in quotation marks. role_oid The unique ID of an IBM Systems Director role, specified as a hexadecimal value prefixed with 0x (for example, 0x7b). Tip: Use lsrole -o to list the current role IDs.

332

IBM Systems Director Commands Reference

role_name The name of a role. If the name contains a comma, prefix the comma with a backslash (\). If the member name contains space characters, enclose it in quotation marks. Tips: v Role names might not be unique. This command acts on all roles with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple roles with the same name. To target a role that has a name that is not unique, identify the role by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use lsrole -l to list the descriptions. v The role names are not locale specific. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data must contain one or more records which are separated by line breaks. Each record in the input data specifies the user-group name or ID, the action to take, and a list of required information for that action using one of these following formats:
user_group:extend:role_list:group_list user_group:remove:role_list:group_list user_group:attribute: key=value,key=value...

-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples.
Chapter 1. smcli

333

Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -r | --remove {role_oid | role_name} [, {role_oid | role_name}... ] Removes one or more roles, specified by name or ID, from the user group. This list can contain a mixture of role IDs and name, separated by a comma. For a description of the arguments, see the -e | --extend option. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 25: A number-formatting error occurred. v 27: A specified attribute is not valid. v 29: The specified locale is not valid or not supported. v 51: The specified user group is not valid. v 52 : A specified role was not found.

Examples
1. Add a role to a user group and apply to all system groups This example illustrates how to add the role role1 to user group Remove Desktop Users.
smcli chusergp -e role1 "Remote Desktop Users"

2. Add a role to a user group and apply that role to multiple user groups This example illustrates how to add the role role2 to the user group mygroup and apply that role to user groups group1 and group2.
smcli chusergp -e role2:group1;group2 mygroup

3. Remove a role from a user group This example illustrates how to removes the role role1 from the user group Guests.
smcli chusergp -r role1 Guests

4. Change a user-group attribute This example illustrates how to changes the description of the group Remote Desktop Users.
smcli chusergp -A Description="Remote users" "Remote Desktop Users"

5. Change multiple user groups' authorization and attributes using a file This example illustrates how to change authorization and attributes for multiple user groups using actions that are specified in the file /tmp/usergp.txt. The actions include adding the backup role to the group1 user group, and changing the description of the use group named user guest.
smcli chusergp -f /tmp/usergp.txt

This is an example of the /tmp/users.txt file:

334

IBM Systems Director Commands Reference

group1:extend:backup guests:attribute:Description="Group of guest users"

lsaudit command
Use the lsaudit command to list audit settings and categories.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsaudit options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsaudit [-h | -? | --help] [-L language] [-l category_names]

Description
You can use this command to list the current audit settings and view details for audit categories.

Flags
-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings.
Chapter 1. smcli

335

v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -l category_name [,category_name...] | ALL Specifies the categories for which information is displayed. Each category is separated by a comma. If you specify ALL, information for all categories is displayed.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 29: The specified locale is not valid or not supported.

Examples
1. List all audit settings and audit categories This example illustrates how to list all audit settings and categories.
smcli lsaudit

2. View information for specified audit categories This example illustrates how to list information for specified categories.
smcli lsaudit -l cat_1,cat_2

3. View information for all audit categories This example illustrates how to list information for all available categories.
smcli lsaudit -l ALL

lsauditlogs command
Use the lsauditlogs command to list a specific number of audit log messages for one or more audit categories.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsauditlogs options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsauditlogs [-h | -? | --help] [-L language] {-n numberOfMessages} [-c category_name]

Description
You can use this command to list a specific number of audit log messages. You can also list a specific number of log messages for a specific audit log category. The number of log messages to display.

336

IBM Systems Director Commands Reference

Flags
-c category_name [, category_name...] Specifies the categories for which information is displayed. Each category is separated by a comma. If you do not specify this option, information for all categories is displayed. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n numberOfMessages Specifies the number of audit log messages to be displayed. This option is required.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully.
Chapter 1. smcli

337

v 1: A usage error occurred. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported.

Examples
1. List a specific number of audit log messages This example illustrates how to list 25 messages from all audit log categories.
smcli lsauditlogs -n 25

2. List a specific number of log messages from one audit log This example illustrates how to list 25 messages from the Security audit log.
smcli lsauditlogs -n 25 -c Security

lscred command
Use the lscred command to list credentials for systems managed by IBM Systems Director.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lscred options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lscred [-h | -? | --help] [-L language] smcli lscred [-L language] [-n hostname] [-i IPaddress] [-r rsap]

Description
The lscred command lists credentials and other detailed information about systems managed by IBM Systems Director. If no options or operands are specified, this command lists all credentials to which the user is mapped. If the user is assigned to a role of SMAdministrator, all credentials are displayed.

Flags
-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command.

338

IBM Systems Director Commands Reference

-i IPaddress [,IPaddress...] Specifies to list the credentials for the specified IP address. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n hostname [,hostname...] Specifies to list the credentials for the specified host name. -r rsap [,rsap...] Specifies to list the credentials for the specified remote service access point. Tip: To determine the remote service access point, you can use the lsinv command with the -e option for the RemoteServiceAccessPoint inventory type. For example, you could specify smcli lsinv -e RemoteServiceAccessPoint -n system_name, where system_name is the name of the host system. Then, in the output, look for the value corresponding to RemoteServiceAccessPoint.AccessInfo.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 27: A specified attribute is not valid. v 29: The specified locale is not valid or not supported.

Examples
1. List all credentials This example illustrates how to list all credentials to which the user is mapped.
smcli lscred

2. List all credentials for one or more IP addresses

Chapter 1. smcli

339

This example illustrates how to list the credentials for two IP addresses, 9.124.29.152 and 9.124.33.174.
smcli lscred -i 9.124.29.152,9.124.33.174

3. List all credentials for one or more host names This example illustrates how to list the credentials for two host names, rev4.in.ibm.com and x206b.in.ibm.com.
smcli lscred -n rev4.in.ibm.com,x206b.in.ibm.com

4. List all credentials for one or more remote service access points This example illustrates how to list the credentials for two remote service access points, https://9.124.111.64:22/ and https://9.126.88.222:22/.
smcli lscred -r https://9.124.111.64:22/,https://9.126.88.222:22/

lsuser command
Use the lsuser command to list IBM Systems Director users.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsuser options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsuser [-h | -? | --help] [-L language] smcli lsuser [-L language] [-v] [-d delimiter] [-o | -p] [-A attribute_list [-s] | -l ] [-f file_name | -w query | [-u] user_list]

Description
The lsuser command lists the users authorized to access IBM Systems Director. If no options or operands are specified, this command lists all currently authorized users. If no display options are specified, only the user name is displayed.

Operands
This command uses a list of users as an operand. The list can optionally be preceded by the -u | --users option.

Flags
-A | --attribute key[,key ... ] Displays values for one or more specified attributes, where key is the attribute key. Tips: v Separate the keys with commas. v The attributes and attribute values are not locale specific. v You can use the lssys -l command to list all attributes associated with the targeted systems. You can specify any of the following attribute keys.

340

IBM Systems Director Commands Reference

Key ResourceType Name Description FullName Email TelephoneNumber MobilePhone HomePhone Pager AssignedRoles

Data type string string string string string string string string string string

Description User or user group. Name of the user. Description of the user. The full name of the user. E-mail address of the user. Work phone number of the user. Mobile phone number of the user. Home phone number of the user. Pager number of the user. List of roles to which this user is directly assigned. If the role is associated with any system group, the group is also listed. List of all roles to which this user is assigned based on membership in a user group. If this role is associated with any system group, the group is also listed. List user groups for which the user is a member.

ImpliedRoles

string

GroupMembership

string

-d | --delimiter symbol Specifies the character or set of characters that separates output data, where symbol is a string of one or more characters. Tip: If the delimiter contains spaces, enclose it in quotation marks. The behavior of this option depends on the use of other options in the command, as shown below. v If you specify this option without the -A | --attribute option, this command separates data fields in a record by a comma followed by a space. Data records are separated by the specified delimiter symbol. v If you specify this option with the -A | --attribute option, this command separates data fields in a record by the specified delimiter symbol. Data records are separated by a line break. v If you specify this option with the -F | --format or -l | --long option, the delimiter option is ignored. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data must contain one or more valid IBM Systems Director user names or IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command.

Chapter 1. smcli

341

Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -l | --long Display detailed information about each user. This option lists these attributes for each user: v Name v ResourceType v Description v FullName v Email v Pager v AssignedRoles v ImpliedRoles v GroupMembership -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -o | --oid Displays the unique IDs associated with the targeted users in addition to other information. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x3e)

342

IBM Systems Director Commands Reference

Tips: v This option cannot be used with the -p | --pipe option. v You can combine this option with the -l | --long and -A | --attribute options. -p | --pipe Displays only the unique IDs for the targeted users instead of the name. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x37). Tips: v IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x37). v When used alone, this option enables the output to be piped to other smcli commands. v This option cannot be used with the -o | --oid options. v You can combine this option with the -l | --long and -A | --attribute options. -s | --sort Sorts the output by the first attribute displayed in each row. Each row is preceded by the name of the user. Tip: Tip: If you specify this option, you must also specify the -A | --attribute option. Otherwise, this option is ignored. -u | --user {user_oid | user_name}[,{user_oid | user_name}...] Targets one or more valid IBM Systems Director user, specified by name or IDs. The list can be a mixture of names and ID, separated by a comma. The list is delimited by the end-of-line character when read from a file. user_oid Specifies the unique hexadecimal ID of an IBM Systems Director user. Tip: Use lsuser -o to list the current user IDs. user_name Specifies the name of an IBM Systems Director user. Enclose the user name in quotation marks if it contains a space character. Tips: v Use lsuser -l to list the current privilege names and descriptions. v The user names are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more users based on attribute values specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

Chapter 1. smcli

343

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Note: v Use logical operators AND or OR to combine attributes. v Use parenthesis to create nested logical constructs. v The query operand must be enclosed in double quotes. Do not use double-quotes in the query. v If the value contains spaces, enclose it in single quotation marks. v Only user attributes can be specified. Use the lsuser -l command to list the available system attributes. Important: The AssignedRoles, ImpliedRoles and GroupMembership attributes cannot be used with this option.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 25: A number-formatting error occurred. v 27: A specified attribute is not valid. v 29: The specified locale is not valid or not supported. v 50: A specified user is not valid.

Examples
1. List all authorized users This example illustrates how to list all users who are authorized to access IBM Systems Director.
smcli lsuser

2. List the description and e-mail address with a custom delimiter This example illustrates how to list the description and e-mail address for all members of the administrator group. The data records are separated using the ==> delimiter.
smcli lsuser -d " ==> " -A Description,Email Administrator: Administrator of the system ==> administrator@mycompany.com Guest: Guest user ==> guest@mycompany.com

3. List all attributes for the users specified in a file This example illustrates how to list all attributes for users specified in the /tmp/users file.
smcli lsuser -l -f /tmp/users Guest: Name: Guest ResourceType: User Description: Built-in account for guest access to the computer/domain FullName: Email: null Pager: null AssignedRoles: GroupRead applied to ImpliedRoles: 157 GroupMembership: {Guests}

344

IBM Systems Director Commands Reference

4. List specific attributes for a user This example illustrates how to list the value of the AssignedRoles attribute for user Guest.
smcli lsuser -A AssignedRoles Guest Guest: {role1 applied to group1, group2}, {role2}

5. List specific attributes and user ID for a user This example illustrates how to list the value of the AssignedRoles attribute and the user ID for user Guest.
smcli lsuser -o -A AssignedRoles Guest Guest, 0xffffffffffffffe2: {[role1, 0xffffffffffffffef] applied to [group1, 0xfffffffffffffe3e], [group2, 0xfffffffffffffe4e]}, {[role2, 0xfffffffffffffff0]}

lsusergp command
Use the lsusergp command to list the IBM Systems Director user groups.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsusergp options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsusergp [-h | -? | --help] [-L language] smcli lsusergp [-L language] [-v] [-d delimiter] [-o | -p] [-A attribute_list [-s] | -l] [-f file_name | -w query | [-U] user_group_list]

Description
If no options or operands are specified, this command lists all of the defined user groups. If no display options are specified, this command displays only user-group names.

Operands
This command uses a list of user groups as an operand. The list can optionally be preceded by the -U | --usergroup option.

Flags
-A | --attribute key[,key ... ] Displays values for one or more specified attributes, where key is the attribute key. Tips: v Separate the keys with commas. v The attributes and attribute values are not locale specific. v You can use the lssys -l command to list all attributes associated with the targeted systems. You can specify any of the following attribute keys.

Chapter 1. smcli

345

Key ResourceType Name Description AssignedRoles

Data type string string string string

Description User or user group. Name of the user. Description of the user. List of roles to which this user is directly assigned. If the role is associated with any system group, group is also displayed. List members of this user group.

Members

string

-d | --delimiter symbol Specifies the character or set of characters that separates output data, where symbol is a string of one or more characters. Tip: If the delimiter contains spaces, enclose it in quotation marks. The behavior of this option depends on the use of other options in the command, as shown below. v If you specify this option without the -A | --attribute option, this command separates data fields in a record by a comma followed by a space. Data records are separated by the specified delimiter symbol. v If you specify this option with the -A | --attribute option, this command separates data fields in a record by the specified delimiter symbol. Data records are separated by a line break. v If you specify this option with the -F | --format or -l | --long option, the delimiter option is ignored. The behavior of this option depends on the use of other options in the command, as shown below. v If you specify this option with the -A | --attribute option, this command separates data fields in a record by the specified delimiter symbol. Data records are separated by a line break. v If you specify this option without the -A | --attribute option, this command separates data fields in a record by a comma followed by a space. Data records are separated by the specified delimiter symbol. v If you specify this option with the -l | --long option, the delimiter option is ignored. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data must contain a one or more valid user group, specified by name or ID. This list can be a mixture of names and IDs, separated by a comma or line break. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored.

346

IBM Systems Director Commands Reference

--help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -l | --long Displays detailed information about the user group. This option lists these attributes for each user group: v Name v ResourceType v Description v AssignedRoles v Members -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -o | --oid Displays the unique IDs associated with the targeted user groups in addition to other information. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x3e). Tips: v This option cannot be used with the -p | --pipe option. v You can combine this option with the -l | --long and -A | --attribute options.
Chapter 1. smcli

347

-p | --pipe Displays only the unique IDs for the targeted user groups instead of the name. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x37). Tips: v IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x37). v When used alone, this option enables the output to be piped to other smcli commands. v This option cannot be used with the -o | --oid options. v You can combine this option with the -l | --long and -A | --attribute options. -s | --sort Sorts the output by the first attribute displayed in each row. Each row is preceded by the name of the user group. -U | --usergroup {user_group_oid | user_group_name}[,{user_group_oid | user_group_name}... ] Lists information for one or more IBM Systems Director user groups, specified by name or ID. user_group_oid Specifies the unique hexadecimal ID of an IBM Systems Director user group. Tip: Use the lsusergp -o command to list all user-group IDs. user_group_name Specifies the name of an IBM Systems Director user group. Enclose the user name in quotation marks if it contains a space character. Tips: v Use lsusergp -l to list the current names and descriptions. v The user-group names are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more user groups based on attribute values specified by query The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parenthesis to create nested logical constructs. v The query operand must be enclosed in double quotes. Do not use double-quotes in the query. v If the value contains spaces, enclose it in single quotation marks.

348

IBM Systems Director Commands Reference

v Only user-group attributes can be specified. Use the lsusergp -l command to list the available user-group attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 25: A number-formatting error occurred. v 27: A specified attribute is not valid. v 29: The specified locale is not valid or not supported. v 51: The specified user group is not valid.

Examples
1. List all user groups This example illustrates how to list all user groups in IBM Systems Director:
smcli lsusergp

2. List all attributes for users in a user group This example illustrates how to list all attributes for the users in the Remote Desktop Users user group.
smcli lsusergp -l "Remote Desktop Users" ResourceType: UserGroup Name: Remote Desktop Users Description: Users who access remotely ManagedAsGroup: false Assigned Roles: Members: ruser1, ruser2

3. List all attributes for multiple user groups specified in a file This example illustrates how to list all attributes for user groups specified in the /tmp/groups file.
smcli lsusergp -l -f /tmp/groups Replicator Guests

4. List an attribute for a user group This example illustrates how to list the AssignedRole attribute for the Guest user group.
smcli lsusergp -A AssignedRoles Guests Guests: {role1 applied to group1, group2}, {role2}

rmauditlogs command
Use the rmauditlogs command to remove the audit log for one or more audit categories.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] rmauditlogs options For information about the options listed above that are specific to smcli, enter smcli -?. smcli rmauditlogs [-h | -? | --help] [-L language] [-a] [-c category_names]
Chapter 1. smcli

349

Description
You can use this command to remove all audit logs or the audit logs for one or more audit categories. You can also specify that the audit log should be removed silently (no confirmation before the log is removed).

Flags
-a Specifies to delete one or more audit logs without asking for confirmation. -c category_name Specifies to delete the audit log for one or more audit categories. Each category is separated by a comma. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed.

350

IBM Systems Director Commands Reference

-n numberOfMessages Specifies the number of audit log messages to be displayed. This option is required.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 29: The specified locale is not valid or not supported.

Examples
1. Remove all audit logs after confirmation This example illustrates how to remove audit logs for all audit categories. You will be prompted to confirm removal before the audit log is deleted.
smcli rmauditlogs

2. Remove all audit logs with no confirmation This example illustrates how to remove audit logs for all audit categories. You will be not be prompted to confirm removal before the audit log is deleted.
smcli rmauditlogs -a

3. Remove the audit log for a specific audit category This example illustrates how remove the Security audit log.
smcli rmauditlogs -c Security

rmcred command
Use the rmcred command to remove credentials for systems managed by IBM Systems Director.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] rmcred options For information about the options listed above that are specific to smcli, enter smcli -?. smcli rmcred [-h | -? | --help] [-L language] smcli rmcred [-L language] [-S Director_user] {[[-i IPaddress] [-n host_name] [-r rsap,[rsap...]] | [-t target_id] | [-a]}

Description
The rmcred command removes credentials for systems managed by IBM Systems Director.

Flags
-a Specifies to remove all credentials to which the user is currently mapped. If the user belongs to the SMAdministrator role, all credentials for all systems will be removed. -h | -? Displays the syntax and a brief description of the command.

Chapter 1. smcli

351

Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i IPaddress [,IPaddress...] Specifies to remove the credentials for the specified IP address. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n hostname [,hostname...] Specifies to remove the credentials for the specified host name. -S Director_user Specifies to remove the credentials for the specified user is mapped. -r rsap [,rsap...] Specifies to remove the credentials for the specified remote service access point. Tip: To determine the remote service access point, you can use the lsinv command with the -e option for the RemoteServiceAccessPoint inventory type. For example, you could specify smcli lsinv -e RemoteServiceAccessPoint -n

352

IBM Systems Director Commands Reference

system_name, where system_name is the name of the host system. Then, in the output, look for the value corresponding to RemoteServiceAccessPoint.AccessInfo. -t target_ID [,target_ID...] Specifies to remove the credentials for the specified remote service access point.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 27: A specified attribute is not valid. v 29: The specified locale is not valid or not supported.

Examples
1. Remove all credentials This example illustrates how to remove all credentials to which the user is mapped. If the user belongs to the SMAdministrator user role, this example removes all credentials.
smcli rmcred -a

2. Remove credentials for one or more IP addresses This example illustrates how to remove the credentials for two IP addresses, 9.124.29.152 and 9.124.33.174.
smcli rmcred -i 9.124.29.152,9.124.33.174

3. Remove credentials for one or more remote service access points This example illustrates how to remove the credentials for two remote service access points, https://9.124.111.64:22/ and https://9.126.88.222:22/.
smcli rmcred -r https://9.124.111.64:22/,https://9.126.88.222:22/

4. Remove credentials for one or more specified target identity IDs This example illustrates how to remove the credentials for two target identity IDs, 5A4066582C563AFF9976F80C54C0931D and DD6A3F6008553876A883E40F5363B8BA.
smcli rmcred -t 5A4066582C563AFF9976F80C54C0931D,DD6A3F6008553876A883E40F5363B8BA

5. Remove credentials to which a user is mapped using a user belonging to the SMAdministrator role This example illustrates how to remove the credentials to which a user is mapped from a user belonging to the SMAdministrator role. In this example: testuser is the user_ID 9.124.29.152 and 9.124.33.174 are the IPaddress values https://9.124.111.64:22/ and https://9.126.88.222:22/ are the rsap values
smcli rmcred -S testuser smcli rmcred -S testuser -i 9.124.29.152,9.124.33.174 smcli rmcred -S testuser -r https://9.124.111.64:22/,https://9.126.88.222:22/

rmusergp command
Use the rmusergp command to remove a user group's authorization to access IBM Systems Director Server.

Chapter 1. smcli

353

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] rmusergp options For information about the options listed above that are specific to smcli, enter smcli -?. smcli rmusergp [-h | -? | --help] [-L language] smcli rmusergp [-L language] [-v] {-f file_name | [-U] user_group_list}

Description
This command does not delete the user group; it only removes the group's authorization.

Operands
This command uses a list of user groups as an operand. The list can optionally be preceded by the -U | --usergroup option.

Flags
-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data must contain one or more valid IBM Systems Director user group names, separated by commas or line breaks. This list can be a mixture of names and ID, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish

354

IBM Systems Director Commands Reference

v v v v v v v

fr: French it: Italian ja: Japanese ko: Korean pt_BR: Brazilian Portuguese zh_CN: Simplified Chinese zh_TW: Traditional Chinese

Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -U | --usergroup {user_group_oid | user_group_name}[,{user_group_oid | user_group_name}...] Targets one or more valid IBM Systems Director user groups, specified by name or IDs. The list can be a mixture of names and ID, separated by a comma. The list is delimited by the end-of-line character when read from a file. user_group_oid Specifies the unique hexadecimal ID of an IBM Systems Director user group. Tip: Use the lsusergp -o command to list all user-group IDs. user_group_name Specifies the name of an IBM Systems Director user group. Enclose the user name in quotation marks if it contains a space character. Tips: v Use lsusergp -l to list the current names and descriptions. v The user-group names are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 51: The specified user group is not valid.

Chapter 1. smcli

355

Examples
1. Remove authorization for multiple user groups This example illustrates how to remove authorization for user groups named Administrators and Guests to access IBM Systems Director Server:
smcli rmusergp Administrators,Guests

Users chuser command


Use the chuser command to change the attributes and access settings for a specific user.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] chuser options For information about the options listed above that are specific to smcli, enter smcli -?. smcli chuser [-h | -? | --help] [-L language] smcli chuser [-h | -? | --help] [-v] {-f file_name} smcli chuser [-L language] [-v] {-m {lock | unlock | reset} | -e extend_list | -r remove_list | -A attribute_list} user

Description
The chuser command changes the attributes and access settings for the user. This command can be used to lock and unlock a user ID, add or remove roles from a user ID, and change attributes such as the name, description, e-mail address and pager number. Important: The smcli chuser command for IBM Systems Director is not the same as the chusr command for AIX and UNIX operating systems.

Operands
This command uses a user name or ID as an operand. It is required if you do not specify a user-definition file using the -f | --file option. The user name (user_name) or ID (user_oid) identifies the user being modified. user_oid Specifies the unique hexadecimal ID of an IBM Systems Director user. Tip: Use lsuser -o to list the current user IDs. user_name Specifies the name of an IBM Systems Director user. Enclose the user name in quotation marks if it contains a space character. Tips: v Use lsuser -l to list the current privilege names and descriptions. v The user names are not locale specific.

356

IBM Systems Director Commands Reference

Flags
-A | --attributekey=value [, key=value ... ] Changes the value of one or more specified attributes, where key is the attribute key. The keys are separated by a comma. Tip: v Separate the keys with commas. v The attributes and attribute values are not locale specific. v You can use the lssys -l command to list all attributes associated with the targeted systems. You can specify any of the following attribute keys:
Key Description FullName Email Pager Data type string string string string Description Description of the user. The full name of the user. E-mail address of the user. Pager number of the user.

-e | --extend {role_oid | role_name[:group_oid | group_name[;group_oid | group_name]...]},{role_oid | role_name[:group_oid | group_name[;group_oid | group_name]... ]...} Assigns one or more roles, specified by name or IDs, to the user, and optionally applies the roles to one or more groups, also specified by name or ID. This list can be a mixture of names and IDs. If the role is followed by one or more system groups, role is assigned to user and is applied to the specified groups. If the role is not followed by one or more groups, the role is applied to all system groups. The role and the groups are separated by a colon (:). The groups are separated by a semicolon (;). Each role and group pair is separated by a comma (,) or a semicolon (;). Note: If the list contains a semicolon, enclose it in quotation marks. role_oid The unique ID of an IBM Systems Director role, specified as a hexadecimal value prefixed with 0x (for example, 0x7b). Tip: Use lsrole -o to list the current role IDs. role_name The name of a role. If the name contains a comma, prefix the comma with a backslash (\). If the member name contains space characters, enclose it in quotation marks. Tips: v Role names might not be unique. This command acts on all roles with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple roles with the same name. To target a role that has a name that is not unique, identify the role by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use lsrole -l to list the descriptions.
Chapter 1. smcli

357

v The role names are not locale specific. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data must contain one or more records which are separated by line breaks. Each record in the input data specifies the user name or ID, the action to take, and a list of required information for that action using one of these following formats:
user:extend:role_list:group_list user:remove:role_list:group_list user:attribute: key=value,key=value...

-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish

358

IBM Systems Director Commands Reference

v v v v v v v

fr: French it: Italian ja: Japanese ko: Korean pt_BR: Brazilian Portuguese zh_CN: Simplified Chinese zh_TW: Traditional Chinese

Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -m | --modify {lock | unlock | reset} Changes the access settings for the targeted user. Possible values are: v lock - Locks the targeted user. v unlock - Unlocks the targeted user. v reset - Resets the number of failed attempts for the user to 0. -r | --remove {role_oid | role_name} [, {role_oid | role_name}... ] Unassigns one or more roles, specified by name or ID, from the user. This list can contain a mixture of role IDs and name, separated by a comma. For a description of the arguments, see the -e | --extend option. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 25: A number-formatting error occurred. v 27: A specified attribute is not valid. v 29: The specified locale is not valid or not supported. v 50: A specified user is not valid. v v 52: A specified role was not found. v 60: A specified attribute is read-only.

Examples
1. Add a role to multiple users and groups Both of these examples illustrate how to add role role2 to user2 and applies that role to groups group1 and group2.
smcli chuser -e "role2:group1,group2" user2

These examples illustrate how to add roles role1 and role2 to user2 and applies both roles to groups group1 and group2.
Chapter 1. smcli

359

smcli smcli smcli smcli

chuser chuser chuser chuser

-e -e -e -e

"role1:group1;group2,role2:group1;group2" user2 "role1,role2" user2 "role1;role2:group1;group2" user2 "role1,role2:group1;group2" user2

2. Add multiple roles to a user and all groups This example illustrates how to add role roleA and roleB to user user1.
smcli chuser -e roleA,roleB user1

3. Remove a role from a user This example illustrates how to remove the role role2 from user user2.
smcli chuser -r role2 user2

4. Change the email address for a user This example illustrates how to change the email address of user Guest to newid@somedomain.com.
smcli chuser -A Email=newid@somedomain.com Guest

5. Lock a user This example illustrates how to lock a user named Guest.
smcli chuser -m lock Guest

6. Change authorization and attributes of multiple users using an input file This example illustrates how to change authorization and attributes for multiple users using actions that are specified in the /tmp/users.txt file. The actions include adding the backup role to user joe, removing the operator role from user john and group group1, and changing the full name of the user jane to janedoe and the email address to jane@co.com..
smcli chuser -f /tmp/users.txt

This is an example of the /tmp/users.txt file:


joe:remove:backup john:extend:operator:group1 jane:attribute:FullName=janedoe,Email=jane@co.com

lsuser command
Use the lsuser command to list IBM Systems Director users.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsuser options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsuser [-h | -? | --help] [-L language] smcli lsuser [-L language] [-v] [-d delimiter] [-o | -p] [-A attribute_list [-s] | -l ] [-f file_name | -w query | [-u] user_list]

Description
The lsuser command lists the users authorized to access IBM Systems Director. If no options or operands are specified, this command lists all currently authorized users. If no display options are specified, only the user name is displayed.

360

IBM Systems Director Commands Reference

Operands
This command uses a list of users as an operand. The list can optionally be preceded by the -u | --users option.

Flags
-A | --attribute key[,key ... ] Displays values for one or more specified attributes, where key is the attribute key. Tips: v Separate the keys with commas. v The attributes and attribute values are not locale specific. v You can use the lssys -l command to list all attributes associated with the targeted systems. You can specify any of the following attribute keys.
Key ResourceType Name Description FullName Email TelephoneNumber MobilePhone HomePhone Pager AssignedRoles Data type string string string string string string string string string string Description User or user group. Name of the user. Description of the user. The full name of the user. E-mail address of the user. Work phone number of the user. Mobile phone number of the user. Home phone number of the user. Pager number of the user. List of roles to which this user is directly assigned. If the role is associated with any system group, the group is also listed. List of all roles to which this user is assigned based on membership in a user group. If this role is associated with any system group, the group is also listed. List user groups for which the user is a member.

ImpliedRoles

string

GroupMembership

string

-d | --delimiter symbol Specifies the character or set of characters that separates output data, where symbol is a string of one or more characters. Tip: If the delimiter contains spaces, enclose it in quotation marks. The behavior of this option depends on the use of other options in the command, as shown below. v If you specify this option without the -A | --attribute option, this command separates data fields in a record by a comma followed by a space. Data records are separated by the specified delimiter symbol.

Chapter 1. smcli

361

v If you specify this option with the -A | --attribute option, this command separates data fields in a record by the specified delimiter symbol. Data records are separated by a line break. v If you specify this option with the -F | --format or -l | --long option, the delimiter option is ignored. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data must contain one or more valid IBM Systems Director user names or IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -l | --long Display detailed information about each user. This option lists these attributes for each user: v Name v ResourceType v Description v FullName v Email v Pager v AssignedRoles v ImpliedRoles v GroupMembership -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean

362

IBM Systems Director Commands Reference

v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -o | --oid Displays the unique IDs associated with the targeted users in addition to other information. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x3e) Tips: v This option cannot be used with the -p | --pipe option. v You can combine this option with the -l | --long and -A | --attribute options. -p | --pipe Displays only the unique IDs for the targeted users instead of the name. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x37). Tips: v IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x37). v When used alone, this option enables the output to be piped to other smcli commands. v This option cannot be used with the -o | --oid options. v You can combine this option with the -l | --long and -A | --attribute options. -s | --sort Sorts the output by the first attribute displayed in each row. Each row is preceded by the name of the user. Tip: Tip: If you specify this option, you must also specify the -A | --attribute option. Otherwise, this option is ignored. -u | --user {user_oid | user_name}[,{user_oid | user_name}...] Targets one or more valid IBM Systems Director user, specified by name or IDs. The list can be a mixture of names and ID, separated by a comma. The list is delimited by the end-of-line character when read from a file. user_oid Specifies the unique hexadecimal ID of an IBM Systems Director user. Tip: Use lsuser -o to list the current user IDs.
Chapter 1. smcli

363

user_name Specifies the name of an IBM Systems Director user. Enclose the user name in quotation marks if it contains a space character. Tips: v Use lsuser -l to list the current privilege names and descriptions. v The user names are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more users based on attribute values specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Note: v Use logical operators AND or OR to combine attributes. v Use parenthesis to create nested logical constructs. v The query operand must be enclosed in double quotes. Do not use double-quotes in the query. v If the value contains spaces, enclose it in single quotation marks. v Only user attributes can be specified. Use the lsuser -l command to list the available system attributes. Important: The AssignedRoles, ImpliedRoles and GroupMembership attributes cannot be used with this option.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 25: A number-formatting error occurred. v 27: A specified attribute is not valid. v 29: The specified locale is not valid or not supported. v 50: A specified user is not valid.

Examples
1. List all authorized users This example illustrates how to list all users who are authorized to access IBM Systems Director.
smcli lsuser

2. List the description and e-mail address with a custom delimiter

364

IBM Systems Director Commands Reference

This example illustrates how to list the description and e-mail address for all members of the administrator group. The data records are separated using the ==> delimiter.
smcli lsuser -d " ==> " -A Description,Email Administrator: Administrator of the system ==> administrator@mycompany.com Guest: Guest user ==> guest@mycompany.com

3. List all attributes for the users specified in a file This example illustrates how to list all attributes for users specified in the /tmp/users file.
smcli lsuser -l -f /tmp/users Guest: Name: Guest ResourceType: User Description: Built-in account for guest access to the computer/domain FullName: Email: null Pager: null AssignedRoles: GroupRead applied to ImpliedRoles: 157 GroupMembership: {Guests}

4. List specific attributes for a user This example illustrates how to list the value of the AssignedRoles attribute for user Guest.
smcli lsuser -A AssignedRoles Guest Guest: {role1 applied to group1, group2}, {role2}

5. List specific attributes and user ID for a user This example illustrates how to list the value of the AssignedRoles attribute and the user ID for user Guest.
smcli lsuser -o -A AssignedRoles Guest Guest, 0xffffffffffffffe2: {[role1, 0xffffffffffffffef] applied to [group1, 0xfffffffffffffe3e], [group2, 0xfffffffffffffe4e]}, {[role2, 0xfffffffffffffff0]}

Roles chrole command


Use the chrole command to change the properties of a role.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] chrole options For information about the options listed above that are specific to smcli, enter smcli -?. smcli chrole [-h | -? | --help] [-L language] smcli chrole [-L language] {-f file_name} smcli chrole [-L language] [-v] [-e extend_list | -r remove_list | -A attribute_list] {role}

Chapter 1. smcli

365

Description
You can use this command to add or remove permissions from a role. You can also use this command to change the name, description and default role.

Operands
This command uses a role name or ID as an operand. It is required if you do not specify a role-definition file using the -f | --file option. The role name (role_name) or ID (role_oid) identifies the role being modified. role_oid The unique ID of an IBM Systems Director role, specified as a hexadecimal value prefixed with 0x (for example, 0x7b). Tip: Use lsrole -o to list the current role IDs. role_name The name of a role. If the name contains a comma, prefix the comma with a backslash (\). If the member name contains space characters, enclose it in quotation marks. Tips: v Role names might not be unique. This command acts on all roles with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple roles with the same name. To target a role that has a name that is not unique, identify the role by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use lsrole -l to list the descriptions. v The role names are not locale specific.

Flags
-A | --attribute {key=value}[,key=value...] Changes the value of one or more specified attributes, where key is the attribute key. The keys are separated by a comma. Tip: v Separate the keys with commas. v The attributes and attribute values are not locale specific. v You can use the lssys -l command to list all attributes associated with the targeted systems. You can specify any of the following attribute keys:
Key Name Description Default Data type string string boolean Description Role name. Description of the role. Flag indicating whether the role is the default. Possible values are true if the role is the default role and false if the role is not the default.

366

IBM Systems Director Commands Reference

-e | --extend {permission_oid | permission_name} [, {permission_oid | permission_name }...] Adds one or more valid permissions to the role. This list can be a mixture of names and IDs, separated by commas. permission_id_string Specifies the unique ID string of the permission. Tips: v Use the lsperm -I command without any options to list all permission names and IDs. v The permission ID string must be preceded with the % character. permission_name Specifies the name of the permission. Enclose the permission name in quotation marks if it contains a space character. Tips: v Use lsperm -l to list the current permission and descriptions. v The permission names are not locale specific. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data must contain one or more records which are separated by commas or line breaks. Each record in the input data specifies the role name or ID, the action to take, and a list of required information for that action using one of these following formats:
role:extend:permission_list role:remove:permission_list role:modifyAttribute: key=value,key=value...

-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported:
Chapter 1. smcli

367

v v v v v v v v v v

de: German en: English es: Spanish fr: French it: Italian ja: Japanese ko: Korean pt_BR: Brazilian Portuguese zh_CN: Simplified Chinese zh_TW: Traditional Chinese

Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -r | --remove {permission_oid | permission_name} [, {permission_oid | permission_name }...] Removes one or more permissions, specified by name or ID, from the role. This list can contain a mixture of permission IDs and name, separated by a comma. For a description of the arguments, see the -e | --extend option. permission_id_string Specifies the unique ID string of the permission. Tips: v Use the lsperm -I command without any options to list all permission names and IDs. v The permission ID string must be preceded with the % character. permission_name Specifies the name of the permission. Enclose the permission name in quotation marks if it contains a space character. Tips: v Use lsperm -l to list the current permission and descriptions. v The permission names are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 25: A number-formatting error occurred.

368

IBM Systems Director Commands Reference

v v v v v

27: A specified attribute is not valid. 29: The specified locale is not valid or not supported. 52: A specified role was not found. 53: The specified role name already exists. 54: A specified permission was not found.

Examples
1. Add a new permission to a role This command illustrates how to add the permission engine.serverFileAccess to the role dbAdmin.
smcli chrole -e %engine.serverFileAccess dbAdmin

2. Remove a new permission to a role This command illustrates how to remove the permission engine.serverFileAccess to the role dbAdmin.
smcli chrole -r %engine.serverFileAccess dbAdmin

3. Change permission attributes This command illustrates how to change the name of the role from dbAdmin to databaseAdmin.
smcli chrole -A Name=databaseAdmin dbAdmin

lsperm command
Use the lsperm command to list the permissions.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsperm options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsperm [-h | -? | --help] [-L language] smcli lsperm [-L language] [-v] [-I] [-d delimiter] [-l | -A attribute_list [-s]] [-f file_name | [-p] permission_list]

Description
If no options are specified, this command lists all permissions. If no display options are specified, only the permission name is displayed.

Operands
This command uses a list of permissions as an operand. The list can optionally be preceded by the -p | --permission option.

Flags
-A | --attribute key[,key ... ] Displays values for one or more specified attributes, where key is the attribute key. Tips: v Separate the keys with commas. v The attributes and attribute values are not locale specific.
Chapter 1. smcli

369

v You can use the lssys -l command to list all attributes associated with the targeted systems. You can specify any of the following attribute keys.
Key ObjectType Data type string Description Permission object type Permission name Permission description Permission identifier Permission type

DisplayName string Description PermissionId Category string string string

-d | --delimiter symbol Specifies the character or set of characters that separates output data, where symbol is a string of one or more characters. Tip: If the delimiter contains spaces, enclose it in quotation marks. The behavior of this option depends on the use of other options in the command, as shown below. v If you specify this option without the -A | --attribute option, this command separates data fields in a record by a comma followed by a space. Data records are separated by the specified delimiter symbol. v If you specify this option with the -A | --attribute option, this command separates data fields in a record by the specified delimiter symbol. Data records are separated by a line break. v If you specify this option with the -F | --format or -l | --long option, the delimiter option is ignored. The behavior of this option depends on the use of other options in the command, as shown below. v If you specify this option with the -A | --attribute option, this command separates data fields in a record by the specified delimiter. Data records are separated by a line break. v If you specify this option without the -A | --attribute option, this command separates data fields in a record by a comma followed by a space. Data records are separated by the specified delimiter symbol. v If you specify this option with the -l | --long option, the delimiter option is ignored. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data must contain one or more valid IBM Systems Director permissions. This list can be a mixture of names and IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command.

370

IBM Systems Director Commands Reference

Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -I | -id Displays the unique IDs associated with the targeted permissions in addition to other information. IDs are prefixed with a percent sign (%). Tips: You can combine this option with the -l | --long and -A | --attribute options. -l | --long Display detailed information about each permission. This option lists these attributes for each permission: v PermissionId v Name v Category v IsHidden -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed.

Chapter 1. smcli

371

-p | --permission {permission_id_string | permission_name}[,{permission_id_string | permission_name }...] Specifies one or more valid permissions. This list can be a mixture of names and IDs, separated by commas. permission_id_string Specifies the unique ID string of the permission. Tips: v Use the lsperm -I command without any options to list all permission names and IDs. v The permission ID string must be preceded with the % character. permission_name Specifies the name of the permission. Enclose the permission name in quotation marks if it contains a space character. Tips: v Use lsperm -l to list the current permission and descriptions. v The permission names are not locale specific. -s | -sort Sorts the output by the first attribute displayed in each row. Each row is preceded by the name of the permission. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 27: A specified attribute is not valid. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 54: A specified permission was not found.

Examples
1. List all permissions This command illustrates how to list all permissions in IBM Systems Director.
smcli lsperm

2. List details of a permission This example illustrates how to list all attributes for the permission "engine.secureclients."
smcli lsperm -l %engine.secureclients

lsrole command
Use the lsrole command to list the roles in IBM Systems Director.

372

IBM Systems Director Commands Reference

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsrole options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsrole [-h | -? | --help] [-L language] smcli lsrole [-L language] [-v] [-d delimiter] [-o | -p] [-A attribute_list [-s] | -l ] [-f file_name | -w query | [-r] role_list]

Description
If no options are specified, this command lists all roles. If no display options are specified, only the role name is displayed.

Operands
This command uses a list of roles as an operand. The list can optionally be preceded by the -r | --roles option.

Flags
-A | --attribute key[,key ... ] Displays values for one or more specified attributes, where key is the attribute key. Tips: v Separate the keys with commas. v The attributes and attribute values are not locale specific. v You can use the lssys -l command to list all attributes associated with the targeted systems. You can specify any of the following attribute keys.
Key Name Description Default Data type string string string Description Name of the role. Description of the role. A flag indicating whether the role is the default role. Possible values are true if the role is the default and false if the role is not the default. A flag indicating whether the role was defined by the system. Possible values are true if the role was defined by the system, and false if the role was not defined by the system. List of permissions for this role.

SystemDefined

string

Permissions

string

-d | --delimiter symbol Specifies the character or set of characters that separates output data, where symbol is a string of one or more characters. Tip: If the delimiter contains spaces, enclose it in quotation marks.

Chapter 1. smcli

373

The behavior of this option depends on the use of other options in the command, as shown below. v If you specify this option without the -A | --attribute option, this command separates data fields in a record by a comma followed by a space. Data records are separated by the specified delimiter symbol. v If you specify this option with the -A | --attribute option, this command separates data fields in a record by the specified delimiter symbol. Data records are separated by a line break. v If you specify this option with the -F | --format or -l | --long option, the delimiter option is ignored. The behavior of this option depends on the use of other options in the command, as shown below. v If you specify this option with the -A | --attribute option, this command separates data fields in a record by the specified delimiter symbol. Data records are separated by a line break. v If you specify this option without the -A | --attribute option, this command separates data fields in a record by a comma followed by a space. Data records are separated by the specified delimiter symbol. v If you specify this option with the -l | --long option, the delimiter option is ignored. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data must contain one or more valid IBM Systems Director roles. This list can be a mixture of names and IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -l | --long Display detailed information about each role. This option lists these attribute for each role: v Name v Description

374

IBM Systems Director Commands Reference

v Default v SystemDefined v Permissions -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -o | --oid Displays the unique IDs associated with the targeted roles in addition to other information. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x3e) Tips: v This option cannot be used with the -p | --pipe option. v You can combine this option with the -l | --long and -A | --attribute options. -p | --pipe Displays only the unique IDs for the targeted roles instead of the name. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x37). Tips: v IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x37). v When used alone, this option enables the output to be piped to other smcli commands. v This option cannot be used with the -o | --oid options. v You can combine this option with the -l | --long and -A | --attribute options. -r | --role {role_name| role_oid}[,{role_name| role_oid}...] Targets one or more valid IBM Systems Director roles, specified by name or IDs.
Chapter 1. smcli

375

The list can be a mixture of names and ID, separated by a comma. The list is delimited by the end-of-line character when read from a file. role_oid The unique ID of an IBM Systems Director role, specified as a hexadecimal value prefixed with 0x (for example, 0x7b). Tip: Use lsrole -o to list the current role IDs. role_name The name of a role. If the name contains a comma, prefix the comma with a backslash (\). If the member name contains space characters, enclose it in quotation marks. Tips: v Role names might not be unique. This command acts on all roles with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple roles with the same name. To target a role that has a name that is not unique, identify the role by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use lsrole -l to list the descriptions. v The role names are not locale specific. -s | -sort Sorts the output by the first attribute displayed in each row. Each row is preceded by the name of the role. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more roles based on attribute values specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parenthesis to create nested logical constructs. v The query operand must be enclosed in double quotes. Do not use double-quotes in the query. v If the value contains spaces, enclose it in single quotation marks. v Only role attributes can be specified. Use the lsrole -l command to list the available role attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred.

376

IBM Systems Director Commands Reference

v v v v v

10: The file was not found. 25: A number-formatting error occurred. 27: A specified attribute is not valid. 29: The specified locale is not valid or not supported. 52: A specified role was not found.

Examples
1. List all roles This command illustrates how to list all roles in IBM Systems Director.
smcli lsrole

2. List all attributes for a role This example illustrates how to list all attributes for the role All Groups Role.
smcli lsrole -l "All Groups Role"

mkrole command
Use the mkrole command to create roles that contain a list of permissions for authorization to access IBM Systems Director.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] mkrole options For information about the options listed above that are specific to smcli, enter smcli -?. smcli mkrole [-h | -? | --help] [-L language] smcli mkrole [-L language] [-v] {-f file_name | -p permission_list new_rol_name}

Description
This command creates new user defined roles comprising a list of permissions. You can create roles with different permission types.

Operands
This command uses a new role name as an operand. The new_role_name creates a new role with the specified name. Tips: v This name must be unique. v If the name contains a comma, prefix the comma with a backslash (\). If the member name contains space characters, enclose it in quotes. v IBM Systems Director assigns a unique ID to the role. Use the lsrole -o role_name command to list the ID.

Flags
-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command.

Chapter 1. smcli

377

To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data must contain one or more valid IBM Systems Director roles names and permission lists. The input data must contain one or more records which are separated by commas or line breaks. Each record in the input data specifies the role name and list of permissions. This list of permissions can be a mixture of names and IDs, separated by commas. The role name and permission are separated by colons. The following example shows the format of each record.
role_name:permission_list

-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed.

378

IBM Systems Director Commands Reference

-p | --permission {permission_id_string | permission_name}[,{permission_id_string | permission_name }...] Specifies one or more valid permissions. This list can be a mixture of names and IDs, separated by commas. permission_id_string Specifies the unique ID string of the permission. Tips: v Use the lsperm -I command without any options to list all permission names and IDs. v The permission ID string must be preceded with the % character. permission_name Specifies the name of the permission. Enclose the permission name in quotation marks if it contains a space character. Tips: v Use lsperm -l to list the current permission and descriptions. v The permission names are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 53: The specified role name already exists. v 54: A specified permission was not found.

Examples
1. Create a new role with a permission This example illustrates how to create a new role named dbAdmin with the permission engine.databaseadmin.
smcli mkrole -p %engine.databaseadmin dbAdmin

2. Create a new role with multiple permissions This example illustrates how to create a new role named dbAdmin with the permissions engine.databaseadmin and runNotepad.
smcli mkrole -p %engine.databaseadmin,runNotepad dbAdmin

rmrole command
Use the rmrole command to delete roles.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] rmrole options

Chapter 1. smcli

379

For information about the options listed above that are specific to smcli, enter smcli -?. smcli rmrole [-h | -? | --help] [-L language] smcli rmrole [-L language] [-v] {-f file_name | [-r] role_list}

Description
If you delete a parent role, the association between the parent role and child roles is removed, and the Parent attribute of the child roles is reset. The child roles are not deleted.

Operands
This command uses a list of roles as an operand. The list can optionally be preceded by the -r | --role option.

Flags
-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data must contain one or more valid IBM Systems Director roles. This list can be a mixture of names and IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian

380

IBM Systems Director Commands Reference

v v v v v

ja: Japanese ko: Korean pt_BR: Brazilian Portuguese zh_CN: Simplified Chinese zh_TW: Traditional Chinese

Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -r | --role {role_name| role_oid}[,{role_name| role_oid}...] Targets one or more valid IBM Systems Director roles, specified by name or IDs. The list can be a mixture of names and ID, separated by a comma. The list is delimited by the end-of-line character when read from a file. role_oid The unique ID of an IBM Systems Director role, specified as a hexadecimal value prefixed with 0x (for example, 0x7b). Tip: Use lsrole -o to list the current role IDs. role_name The name of a role. If the name contains a comma, prefix the comma with a backslash (\). If the member name contains space characters, enclose it in quotation marks. Tips: v Role names might not be unique. This command acts on all roles with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple roles with the same name. To target a role that has a name that is not unique, identify the role by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use lsrole -l to list the descriptions. v The role names are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 25: A number-formatting error occurred.
Chapter 1. smcli

381

v 29: The specified locale is not valid or not supported. v 52: A specified role was not found.

Examples
1. Delete a role This example illustrates how to delete the role named dbAdmin.
smcli rmrole dbAdmin

2. Delete multiple roles This example illustrates how to delete the roles named dbAdmin and role1.
smcli rmrole dbAdmin,role1

SNMP device commands


Use the commands in this section to manage and configure SNMP devices. Tips: v The SNMP commands are supported in this release for compatibility with IBM Director v5.20. v You can use system commands to manage SNMP devices. For example, use the discover command to discover SNMP devices, and use the lssys command to list SNMP devices.

smcli commands
These smcli SNMP commands are available: get getbulk Use the getbulk command to perform multiple get requests. getnext Use the getnext command to perform an SNMP GETNEXT request on the SNMP device. inform Use the inform command to perform an SNMP Inform request on the SNMP device. set trap walk Use the set command to perform an SNMP Set request on the SNMP device. Use the trap command to send an SNMP trap to the SNMP device. Use the walk command to traverse a branch of the Management Information Base (MIB) tree of the SNMP device. Use the get command to perform an SNMP GET request to display information about an SNMP device.

dircli commands
Using the new smcli SNMP commands are recommended; however, the dircli SNMP commands listed in the following table are supported in this release for compatibility with IBM Director version 5.20. For information about the dircli commands, see the commands reference in the IBM Director v5.20 information center at publib.boulder.ibm.com/infocenter/ eserver/v1r2/topic/diricinfo_5.20/fqm0_r_dircmd_snmp_device_bundle.html.

382

IBM Systems Director Commands Reference

Important: v You must enter the dircli commands in lower case. v To use a dircli command with the same name as an smcli command, you must define the CLILEGACY environment variable and set it to a value of 1.
Table 6. Supported dircli commands dircli command get Description and supported syntax Performs an SNMP Get request on the SNMP device Syntax: get system_id object_id_list getbulk Performs an SNMP Get Bulk request on the SNMP device Syntax: getbulk max non_repeaters system_id {[object_id]...} getnext Performs an SNMP Get Next getnext request on the SNMP device getnext system_id object_id_list inform Performs an SNMP Inform request on the SNMP device Syntax: inform max system_id {[object_id id_type id_value]...} set Performs an SNMP Set request on the SNMP device Syntax: set system_id {[object_id id_type id_value]...} trap Sends an SNMP trap to the SNMP device Syntax: trap 1 system_id uptime ipaddress trap_type enterprise_id {[object_id id_type id_value]...} trap 2 system_id object_id id_type id_value trap set inform getbulk Equivalent smcli command get

Chapter 1. smcli

383

Table 6. Supported dircli commands (continued) dircli command walk Description and supported syntax Equivalent smcli command

Performs a walk on a branch walk of the MIB tree of the SNMP device Syntax: walk system_id branch_id

SNMP get command


Use the get command to perform an SNMP GET request to display information about an SNMP device.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] get options For information about the options listed above that are specific to smcli, enter smcli -?. smcli get [-h | -? | --help] [-L language] smcli get [-L language] [-v] {system_oid} [object_id_list]

Description
None.

Operands
None.

Flags
-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported:

384

IBM Systems Director Commands Reference

v v v v v v v v v v

de: German en: English es: Spanish fr: French it: Italian ja: Japanese ko: Korean pt_BR: Brazilian Portuguese zh_CN: Simplified Chinese zh_TW: Traditional Chinese

Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. object_id {object_id}[object_id...] Specifies one or more object IDs (for example, 1.3.6.1.2.1.1.4.0 for sysContact and 1.3.6.1.2.1.1.1.0 for sysDescr). system_id Specifies the unique ID of the managed object. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 2: The command or bundle was not found. v 3: The command was not performed because either authentication failed or you are not authorized to perform the action. v 4: The command implementation caused an exception. v 5: The command was not successful. v 29: The specified locale is not valid or not supported.

Examples
Display information about an SNMP device This example illustrates how to request an SNMP sysDescr 1.3.6.1.2.1.1.1.0 request from object 21B.
smcli get 21B 1.3.6.1.2.1.1.1.0 1.34.6.1.2.1.1.0 ,octets. = Hardware: x86 Family 15 model 1 Stepping 1 AT/AT COMPATIBLE - Software: Windows 2000 Version 5.0 (Build 2195 Multiprocessor Free)

1.
Chapter 1. smcli

385

SNMP getbulk command


Use the getbulk command to perform multiple get requests.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] getbulk options For information about the options listed above that are specific to smcli, enter smcli -?. smcli getbulk [-h | -? | --help] [-L language] smcli getbulk [-L language] [-v] {max}{non_repeaters} {system_id} {object_list}

Description
None.

Operands
None.

Flags
-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips:

386

IBM Systems Director Commands Reference

v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. max Specifies the maximum number of get-next attempts to make when retrieving remaining objects. non_repeaters Specifies the number of objects that can be retrieved with a simple get-next operation. object_id {object_id}[object_id...] Specifies one or more object IDs (for example, 1.3.6.1.2.1.1.4.0 for sysContact and 1.3.6.1.2.1.1.1.0 for sysDescr). system_id Specifies the unique ID of the managed object. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 2: The command or bundle was not found. v 3: The command was not performed because either authentication failed or you are not authorized to perform the action. v 4: The command implementation caused an exception. v 5: The command was not successful. v 29: The specified locale is not valid or not supported. v

Examples
None

SNMP getnext command


Use the getnext command to perform an SNMP GETNEXT request on the SNMP device.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] getnext options For information about the options listed above that are specific to smcli, enter smcli -?. smcli getnext [-h | -? | --help] [-L language]
Chapter 1. smcli

387

smcli getnext [-L language] [-v] {system_id} [object_list]

Description
None.

Operands
None.

Flags
-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed.

388

IBM Systems Director Commands Reference

object_id {object_id}[object_id...] Specifies one or more object IDs (for example, 1.3.6.1.2.1.1.4.0 for sysContact and 1.3.6.1.2.1.1.1.0 for sysDescr). system_id Specifies the unique ID of the managed object. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 2: The command or bundle was not found. v 3: The command was not performed because either authentication failed or you are not authorized to perform the action. v 4: The command implementation caused an exception. v 5: The command was not successful. v 29: The specified locale is not valid or not supported.

Examples
None.

SNMP inform command


Use the inform command to perform an SNMP Inform request on the SNMP device.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] inform options For information about the options listed above that are specific to smcli, enter smcli -?. smcli inform [-h | -? | --help] [-L language] smcli inform [-L language] [-v] {system_id}{object_id oid_type oid_value} [ {object_id oid_type oid_value}...]}

Description
None.

Operands
None.

Flags
-h | -? Displays the syntax and a brief description of the command.

Chapter 1. smcli

389

Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. oid_type Specifies the type of the object identifier. These are the possible values: v bits counter v counter64 v gauge v integer v ipaddress v nsapaddress v octets v oid v opaque v timeticks v unsigned32 oid_value Specifies the value of the object identifier.

390

IBM Systems Director Commands Reference

object_id Specifies the object IDs (for example, 1.3.6.1.2.1.1.4.0 for sysContact and 1.3.6.1.2.1.1.1.0 for sysDescr). system_id Specifies the unique ID of the managed object. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 2: The command or bundle was not found. v 3: The command was not performed because either authentication failed or you are not authorized to perform the action. v 4: The command implementation caused an exception. v 5: The command was not successful. v 29: The specified locale is not valid or not supported.

Examples
None.

SNMP set command


Use the set command to perform an SNMP Set request on the SNMP device.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] set options For information about the options listed above that are specific to smcli, enter smcli -?. smcli set [-h | -? | --help] [-L language] smcli set [-L language] [-v] {system_id}{object_idoid_typeoid_value [{object_idoid_typeoid_value}...]}

Description
None.

Operands
None.

Flags
-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored.
Chapter 1. smcli

391

--help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. oid_type Specifies the type of the object identifier. These are the possible values: v bits counter v counter64 v gauge v integer v ipaddress v nsapaddress v octets v oid v opaque v timeticks v unsigned32 oid_value Specifies the value of the object identifier.

392

IBM Systems Director Commands Reference

object_id Specifies the object IDs (for example, 1.3.6.1.2.1.1.4.0 for sysContact and 1.3.6.1.2.1.1.1.0 for sysDescr). -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 2: The command or bundle was not found. v 3: The command was not performed because either authentication failed or you are not authorized to perform the action. v 4: The command implementation caused an exception. v 5: The command was not successful. v 29: The specified locale is not valid or not supported.

Examples
None.

SNMP trap command


Use the trap command to send an SNMP trap to the SNMP device.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] trap options For information about the options listed above that are specific to smcli, enter smcli -?. smcli trap [-h | -? | --help] [-L language] smcli trap 1 [-L language] [-v] {system_id} {uptime} {ip_address} {trap_type} {enterprise_id} {system_id}{object_idoid_typeoid_value [{object_idoid_typeoid_value}...]} smcli trap 2 [-L language] [-v] {system_id}{object_idoid_typeoid_value [{object_idoid_typeoid_value}...]}

Description
None.

Operands
None.

Flags
enterprise_id Specifies the enterprise object ID of the trap.

Chapter 1. smcli

393

-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. ip_address Specifies the IP address of the SNMP device or trap destination. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. oid_type Specifies the type of the object identifier. These are the possible values: v bits counter v counter64 v gauge v integer v ipaddress v nsapaddress v octets v oid

394

IBM Systems Director Commands Reference

v opaque v timeticks v unsigned32 oid_value Specifies the value of the object identifier. object_id Specifies the object IDs (for example, 1.3.6.1.2.1.1.4.0 for sysContact and 1.3.6.1.2.1.1.1.0 for sysDescr). system_id Specifies the unique ID of the managed object. trap_type Specifies the type of the trap being sent. These are the possible values: v 0 = coldStart v 1 = warmStart v 2 = linkDown v 3 = linkUp v 4 = authenticationFailure v 5 = egpNeighborLoss v 6 = enterprise-specific trap identified by an enterprise ID and a specific trap number chosen by the enterprise that defined the trap uptime Specifies the system uptime of the trap sender. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 2: The command or bundle was not found. v 3: The command was not performed because either authentication failed or you are not authorized to perform the action. v 4: The command implementation caused an exception. v 5: The command was not successful. v 29: The specified locale is not valid or not supported.

Examples
None.

SNMP walk command


Use the walk command to traverse a branch of the Management Information Base (MIB) tree of the SNMP device.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] walk options

Chapter 1. smcli

395

For information about the options listed above that are specific to smcli, enter smcli -?. smcli walk [-h | -? | --help] [-L language] smcli walk [-L language] [-v] {system_id} {branch_id}

Description
None.

Operands
None.

Flags
branch_id Specifies the object identifier of the branch. For example, you might use 1.3.6.1.2.1.1 to walk through all of the items in the system subtree. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings.

396

IBM Systems Director Commands Reference

v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. system_id Specifies the unique ID of the managed object. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 2: The command or bundle was not found. v 3: The command was not performed because either authentication failed or you are not authorized to perform the action. v 4: The command implementation caused an exception. v 5: The command was not successful. v 29: The specified locale is not valid or not supported.

Examples
None.

Storage commands
Use the commands in this section to configure certain aspects of a storage area network (SAN). Tips: v To discover, add, remove, and list information about storage systems, use the system commands. v The storage commands are supported on servers based on Intel (such as System x), IBM Power Systems, and System z servers running Linux. v The IBM Director v5.20 storage commands are not supported in this release.

smcli commands
These smcli storage commands are available. Network storage hosts commands: chnshost Use the chnshost command to change the Storage Area Network (SAN) configuration of one or more system hosts, or detach one or more system hosts from the SAN and optionally remove the volumes.

Chapter 1. smcli

397

lsnshost Use the lsnshost command to list in XML format the Storage Area Network (SAN) configuration for system hosts. You can also export the configuration to a file. Network storage path commands: chnspath Use the chnspath command to set the zoning configuration such that only one path exists between the specified system hosts and the specified storage volumes. You can also use this command to unisolate the system hosts. lsnspath Use the lsnspath command to list in XML format information about the network-storage path. You can also export the information to a file. mknspath Use the mknspath command to create a connection (a network-storage path) from a system host to a logical volume. rmnspath Use the rmnspath command to remove a connection (that is, a network-storage path) from a system host to one or more volumes, and optionally remove the volumes if there are no other connections. Network storage systems commands: chnssys Use the chnssys command to change the host-type identifier and auto-logical drive transfer (ADT) status on a network-storage system. lsnssys Use the lsnssys command to list the network-storage systems discovered by IBM Systems Director. Network storage volumes commands: chnsvol Use the chnsvol command to change the name of a logical volume on a network-storage system. lsnsvol Use the lsnsvol command to list storage volume properties for the specified network-storage system. mknsvol Use the mknsvol command to create a storage volume by allocating a logical volume and setting the Redundant Array of Independent Disks (RAID) level for later attachment to a system host. rmnsvol The rmnsvol command removes one or more volumes on a network-storage system if the volume is not connected to a network-storage system.

Storage-configuration settings
Default storage-configuration values are defined in the SSPTSetting.xml file. You can optionally configure these values.

398

IBM Systems Director Commands Reference

The SSPTSetting.xml file is located in the install_root\director\data directory, where install_root is the root directory of your IBM Systems Director installation. Note that this path uses the backslash (\) to delimit the directory; depending on the system that you are using, you might be required to enter the path using the forward slash (/). The file is fully commented and can be modified using a text editor. Tips: v Do not use the following characters in this file: ampersand (&) greater than symbol (>) less than symbol (<) backslash (\) quotation mark (") v If you change settings in this file, you must restart IBM Systems Director Server. The default values specified in this file are listed in the following table.
Configuration setting <FabricInstallZoneName> Description Sets the prefix for the zone name, which is used when installing operating systems. Because the Windows installer is not multipath-enabled, a special installation zone is created to eliminate multiple paths during installations. The zone name prefix can be concatenated with the storage-port worldwide number (WWN) to create a unique zone name (for example, DirectorInstallZone_2000000001020304). <FabricNumberOfZones> Specifies the number of Fibre Channel zones that can be created. The number of zones does not affect the operational behavior of your fabric. This value must be an integer with a value of 1 - 16. Values greater than 16 are interpreted as 16. <FabricZoneName> Specifies the default zone name. Zone names DirectorZone can be concatenated with the zone name index and switch WWN on which they are created to create a unique zone name, (for example, DirectorZone_0_2000000001020304). Specifies the zone-set name to be used if both DirectorZoneSet of the following conditions are met: v No active zone set is found in the fabric. v The value of <FabricZoningEnabled> is true. Otherwise, <FabricZoneSetName> is ignored. 16 Default value DirectorInstallZone

<FabricZoneSetName>

Chapter 1. smcli

399

Configuration setting <FabricZoningEnabled>

Description

Default value

Defines the behavior when no active zone set false is found in the fabric, using the following rules: v If the value is true and no active zone set is found in the fabric, a zone set is created and activated using the value of <FabricZoneSetName>. This setting is relevant when the fibre channel switch is being initialized for the first time. v If the value is false and no active zone set is found, no zoning operations are performed. This setting is useful if you have a configured SAN that you decided to operate without zoning. If an active zone set already exists in the fabric, <FabricZoningEnabled> is ignored.

<HostGroupName>

Specifies the default host group name. Tip: The name can contain only alphanumeric characters, underscores, and hyphens. Specifies one of two pool allocation policies to be implemented when an array or pool of logical devices must be created on the network-storage system: v MINIMAL: The minimal number of physical devices needed for the requested RAID level will be used. v MAXIMAL: The maximum possible number of devices will be used. The actual number of physical devices used might vary from the minimum number needed for the requested Redundant Array Of Independent Disks (RAID) level to the number of devices available on the network-storage system.

Director_Group

<PoolAllocationPolicy>

MINIMAL

<PoolNamePrefix>

Specifies the default name of the new storage DirectorPool array, if a new storage array must be created while allocating a volume. Tip: For network-storage systems that do not support the naming of arrays, <PoolNamePrefix> is ignored. Defines the behavior when an array or pool of logical devices must be created on the network-storage system. IBM Systems Director attempts to use drives of the same size if possible. When more devices are needed to fill the requirements, the value of <UseOfDifferentSizedDevicesEnabled> determines the behavior: v If the value is true, different-size devices are used to create a pool when necessary. v If the value is false, all pools of logic devices contain devices of equal size. false

<UseOfDifferentSizedDevicesEnabled>

400

IBM Systems Director Commands Reference

Configuration setting <VolumeNamePrefix>

Description Specifies the default volume prefix for naming logical devices. Logical volumes are named by concatenating the prefix with an integer, starting with 0 for the first logical unit number (LUN) allocation to a specific storage system and increasing the integer by 1 for each additional LUN allocation. Tip: The prefix can contain only alphanumeric characters, underscores, and hyphens.

Default value DEV_

<VolumeSetting>

Specifies the default RAID level for logical volumes. You can specify one of the values for the volume setting: v RAID0: Data striping without parity. v RAID1: Mirroring. v RAID3: Data striping with dedicated parity. v RAID5: Data striping with distributed parity. This value is the default.

RAID5

<VolumeSize> <VolumeType>

Specifies the default volume size in MB. Specifies the default volume type. You can specify one of these values: v FC: Fibre Channel v SAS: Serial-attached Small Computer Systems Interface v iSCSI: Internet SCSI

1000 FC

Network storage hosts commands


Use the smcli network storage hosts commands to list network storage hosts and edit properties.

smcli commands
These smcli network storage host commands are available: chnshost Use the chnshost command to change the Storage Area Network (SAN) configuration of one or more system hosts, or detach one or more system hosts from the SAN and optionally remove the volumes. lsnshost Use the lsnshost command to list in XML format the Storage Area Network (SAN) configuration for system hosts. You can also export the configuration to a file.

chnshost command
Use the chnshost command to change the Storage Area Network (SAN) configuration of one or more system hosts, or detach one or more system hosts from the SAN and optionally remove the volumes.

Chapter 1. smcli

401

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] chnshost options For information about the options listed above that are specific to smcli, enter smcli -?. smcli chnshost [-h | -? | --help] [-L language] smcli chnshost [-L language] [-v] [-x file_name] [-D] [-r] [-t system_type] [-w query | -i ip_address_list | -N group | -n system_list]

Description
Important: To avoid SAN-access issues, power off the system host or take the system host offline before running the chnshost command. This command acquires the configuration information from an XML input file. To change the SAN configuration, modify an XML configuration file that was created using the lsnshost command.

Operands
This command uses a list of system hosts for which the SAN configuration is to be changed as an operand.

Flags
-D | --detach Detaches the system hosts from the SAN, removing all paths and mappings. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean

402

IBM Systems Director Commands Reference

v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more system hosts, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more system hosts, specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips:

Chapter 1. smcli

403

v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all system hosts in one or more specified groups, identified name or ID. The list can be a mixture of group names and IDs, separated by a comma. no Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -r | --remove Removes the volumes if no other system host is attached to the volumes. -t | --type system_type Targets all system hosts of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

404

IBM Systems Director Commands Reference

-w | --where "query" Targets a single system host based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes. -x | --xmlfile {file_name} Receives SAN configuration data from the input file file_name. The input data is the SAN configuration of the system host in XML format. The format of this file must match the format given by the lsnshost command.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 26: A specified system type is not valid. v 29: The specified locale is not valid or not supported. v 51: An internal error occurred. v 52: The host was not found.

Examples
1. Change SAN configuration of a system host This example illustrates how to apply the SAN configuration in the file named host_cfg.xml to the system host (system) named system1.
smcli chnshost -n system1 -x host_cfg.xml

2. Remove host mapping and destroy volumes This example illustrates how to remove the host-related mappings in the SAN for the system host (system) named system1 and destroys volumes for which this host was the last user.
smcli chnshost -rDn system1

lsnshost command
Use the lsnshost command to list in XML format the Storage Area Network (SAN) configuration for system hosts. You can also export the configuration to a file.

Chapter 1. smcli

405

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsnshost options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsnshost [-h | -? | --help] [-L language] smcli lsnshost [-L language] [-v] [-f file_name | -w query | -i ip_address_list |-N group_list | [-n] system_list]

Description
This command exports XML that contains the SAN configuration of the specified system hosts. The XML can be saved to a file and later used by the chnshost command to change the configuration. Restriction: Do not use the -v | --verbose option when saving the output of this command to an XML file. The verbose output is not valid for configuration-file input.

Operands
This command uses a system host list as an operand. The list can optionally be preceded by the -n | --names option.

Flags
-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the SAN configuration of the system host in XML format. The format must match the format given by the lsnshost command. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command.

406

IBM Systems Director Commands Reference

-i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more system hosts, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more system hosts, specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma.

Chapter 1. smcli

407

system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all system hosts in one or more specified groups, identified name or ID. The list can be a mixture of group names and IDs, separated by a comma. no Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets a single system host based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

408

IBM Systems Director Commands Reference

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 26: A specified system type is not valid. v 29: The specified locale is not valid or not supported. v 51: An internal error occurred. v 52: The host was not found.

Examples
1. List configuration information for a host This example illustrates how to display the XML configuration for the system host named system1
smcli lsnshost -n system1

2. List configuration information for multiple hosts This example illustrates how to display the XML configuration for all system hosts in the group name group1.
smcli lsnshost -N group1

3. Save host configuration information This example illustrates how to save the XML configuration for the system host named system1 to a file named host1_cfg.xml.
smcli lsnshost -n system1 > system1_san_cfg.xml

Network storage path commands


Use the smcli network storage path commands to list, create, and delete network storage paths and edit properties.

smcli commands
These smcli network storage path commands are available: chnspath Use the chnspath command to set the zoning configuration such that only

Chapter 1. smcli

409

one path exists between the specified system hosts and the specified storage volumes. You can also use this command to unisolate the system hosts. lsnspath Use the lsnspath command to list in XML format information about the network-storage path. You can also export the information to a file. mknspath Use the mknspath command to create a connection (a network-storage path) from a system host to a logical volume. rmnspath Use the rmnspath command to remove a connection (that is, a network-storage path) from a system host to one or more volumes, and optionally remove the volumes if there are no other connections.

chnspath command
Use the chnspath command to set the zoning configuration such that only one path exists between the specified system hosts and the specified storage volumes. You can also use this command to unisolate the system hosts.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] chnspath options For information about the options listed above that are specific to smcli, enter smcli -?. smcli chnspath [-h | -? | --help] [-L language] smcli chnspath [-L language] [-v] {-A attribute_list | -u} [-t system_type] {-f file_name | -w query | -i ip_address_list | -N group_list | [-n] system_list}

Description
To use this command, v The system host must be powered on. v Fabric zoning must be enabled; that is, <FabricZoningEnabled> must be set to true in the SSPTSetting.xml file. If you change the SSPTSetting.xml file, you must restart IBM Systems Director Server. If you run this command to isolate a system host, you must specify a system host, network-storage system, and one or more logical volumes. If you do not specify a logical volume, only one logical volume can be mapped and zoned for the system host. If you run this command to unisolate system host, you must specify only the system host.

Operands
This command uses a system host list as an operand. The list can optionally be preceded by the -n | --names option.

410

IBM Systems Director Commands Reference

Flags
-A | --attribute {key=value}[,key=value...] Targets the network-storage system and logical volumes, where key is the attribute name and value is the attribute value. The keys-value pairs are separated by a comma. Tip: The attributes and attribute values are not locale specific. You can specify any of the following attribute keys:
Key nssys Data type string Description The network-storage system, specified by name, ID, or world wide number (WWN). storage_oid The unique ID of the network-storage system, specified as a hexadecimal value prefixed with 0x (for example, 0x3e). Tip: Tip: You can use the lsmo -o command to list all system IDs, including network-storage system IDs. storage_name The name of the network-storage system. If the network-storage-system name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\). Tips: v Network-storage-system names might not be unique. This command acts on all network-storage systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple network-storage systems with the same name. To target a network-storage system that has a name that is not unique, identify the network-storage system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v The network-storage-system names are not locale specific. storage_wwn The WWN of the network-storage system. This value is displayed in the IBM Systems Director Web interface as the System Unique Name of the storage system. nsvol string One or more logical volume names, separated by a comma. Do not include spaces.

-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks.

Chapter 1. smcli

411

The input data is the list of system host names and IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more system hosts specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese

412

IBM Systems Director Commands Reference

v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more system hosts, specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all system hosts in one or more specified groups, identified name or ID. The list can be a mixture of group names and IDs, separated by a comma. no Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in

Chapter 1. smcli

413

quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -t | --type system_type Targets all system host of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -u | --unisolate Changes the system host to the default values, granting other system hosts access to the network-storage disk volume. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more system hosts based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully.

414

IBM Systems Director Commands Reference

v v v v v v v v v v

1: A usage error occurred. 10: The file was not found. 20: A specified system is not valid. 21: A specified system group is not valid. 25: A number-formatting error occurred. 26: A specified system type is not valid. 29: The specified locale is not valid or not supported. 51: An internal error occurred. 52: The host was not found. 53: A network-storage system was not found.

Examples
1. Isolate a system host This example illustrates how to isolate a system host named host1 from the logical device DEV_1 on the network-storage system named MyStorage.
smcli chnspath -n host1 -A nssys=MyStorage,nsvol=DEV_1

2. Unisolate a system host This example illustrates how to return the path for the system host named host1 back to the defaults.
smcli chnspath -u -n host1

lsnspath command
Use the lsnspath command to list in XML format information about the network-storage path. You can also export the information to a file.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsnspath options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsnspath [-h | -? | --help] [-L language] smcli lsnspath [-L language] [-v] [-F] {-f file_name | -w query | -i ip_address_list | -N group_list | [-n] system_list} smcli lsnspath [-L language] [-v] -W wwn_port_list

Description
If you specify a system host, this command lists the network-storage path (fabric switches) to which the specified system host is attached. If the system host cannot be reached, a null value is returned. If you do not specify a system host, this command lists all available switches that can be part of the network-storage path. If you specify one or more world-wide names (WWNs), this command lists the connected fabric switches. The XML can be saved to a file and later used by the chnspath command.

Chapter 1. smcli

415

Operands
This command uses a system host list as an operand. The list can optionally be preceded by the -n | --names option.

Flags
-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of system host names and IDs, separated by commas or line breaks. -F | --fabricname Populates the IBM Systems Director inventory data with the fabric name of the connected fabric for the Common-Agent managed systems. Tip: For this option to be used successfully, you must first collect inventory for the Common-Agent managed systems. The managed systems must be powered on and connected to active fabrics. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more system hosts specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS)

416

IBM Systems Director Commands Reference

suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more system hosts, specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with
Chapter 1. smcli

417

the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all system hosts in one or more specified groups, identified by name or ID. The list can be a mixture of group names and IDs, separated by a comma. no Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more system hosts based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

418

IBM Systems Director Commands Reference

-W | --wwn {wwn_port}[,wwn_port...] Targets one or more world wide names (WWNs) ports that identify the system hosts, separated by a comma. Tip: v This value is displayed in IBM Systems Director Web interface as the System Unique Name of the network-storage system. v Use the lsnshost command to list the ports.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 26: A specified system type is not valid. v 29: The specified locale is not valid or not supported. v 51:An internal error occurred. v 52: The host was not found.

Examples
1. List all fabric switches This example illustrates how to list all fabric switches in the network.
smcli lsnspath

2. List network-storage path for a host This example illustrates how to list, in XML format, all fabric switches connected to the system host named system1.
smcli lsnspath system1

3. List connected fabric switches This example illustrates how to list, in XML format, fabric switches connected to the system hosts with WWN ports 12345678 and 99990101.
smcli lsnspath -W 12345678,99990101

mknspath command
Use the mknspath command to create a connection (a network-storage path) from a system host to a logical volume.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] mknspath options For information about the options listed above that are specific to smcli, enter smcli -?. smcli mknspath [-h | -? | --help] [-L language] smcli mknspath [-L language] [-v] [-A attribute_list] [-f file_name | -w query | -i ip_address_list | -N group_list | [-n] system_list]

Chapter 1. smcli

419

Description
None

Operands
This command uses a system host list as an operand. The list can optionally be preceded by the -n | --names option.

Flags
-A | --attribute key[,key ... ] Targets the network-storage system and logical volumes and sets the value of one or more specified volume attributes, where key is the attribute name and value is the attribute value. The keys-value pairs are separated by a comma. Tip: The attributes and attribute values are not locale specific. You can specify any of the following attribute keys:
Key nsvol Data type string Description Targets a logical volume, specified by name. Tip: You can specify only one logical volume.

420

IBM Systems Director Commands Reference

Key nssys

Data type string

Description Targets the network-storage system, specified by name, ID, or world wide number (WWN). storage_oid The unique ID of the network-storage system, specified as a hexadecimal value prefixed with 0x (for example, 0x3e). Tip: Tip: You can use the lsmo -o command to list all system IDs, including network-storage system IDs. storage_name The name of the network-storage system. If the network-storage-system name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\). Tips: v Network-storage-system names might not be unique. This command acts on all network-storage systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple network-storage systems with the same name. To target a network-storage system that has a name that is not unique, identify the network-storage system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v The network-storage-system names are not locale specific. storage_wwn The WWN of the network-storage system. This value is displayed in the IBM Systems Director Web interface as the System Unique Name of the storage system.

hostgroupname

string

Sets the host group name on the target network-storage system. Tip: v The name can contain only alphanumeric characters, underscores, and hyphens. v The default value is defined in the SSPTSettings.xml file.

hostname volumetype

string string

Sets the host name on the target network-storage system. Sets the type of volume to allocate. You can specify one of these values: You can specify one of these values: v FC: Fibre Channel v SAS: Serial-attached Small Computer Systems Interface v iSCSI: Internet SCSI Tip: The default value is defined in the SSPTSettings.xml file.

Chapter 1. smcli

421

-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the SAN configuration of the system host in XML format. The format must match the format given by the lsnshost command. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more system hosts, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported:

422

IBM Systems Director Commands Reference

v v v v v v v v v v

de: German en: English es: Spanish fr: French it: Italian ja: Japanese ko: Korean pt_BR: Brazilian Portuguese zh_CN: Simplified Chinese zh_TW: Traditional Chinese

Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more system hosts, specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all system hosts in one or more specified groups, identified name or ID. The list can be a mixture of group names and IDs, separated by a comma. no Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group.

Chapter 1. smcli

423

group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets a single system host based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 26: A specified system type is not valid. v 29: The specified locale is not valid or not supported. v 51: An internal error occurred. v 52: The host was not found. v 53: A network-storage system was not found. v 54: The volume was not found.

424

IBM Systems Director Commands Reference

Examples
Connect a volume to a system host This example illustrates how to connect the logical volume named DEV_1 on the network-storage system named My_DS4000 to the system host named system1.
smcli mknspath -A nsnsvol=DEV_1,sys=MyStorage -n system1

rmnspath command
Use the rmnspath command to remove a connection (that is, a network-storage path) from a system host to one or more volumes, and optionally remove the volumes if there are no other connections.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] rmnspath options For information about the options listed above that are specific to smcli, enter smcli -?. smcli rmnspath [-h | -? | --help] [-L language] smcli rmnspath [-L language] [-v] {-A attribute_list} [-r] {-f file_name | -w query | -N group_list | [-n] system_list}

Description
None.

Operands
This command uses a system host list as an operand. The list can optionally be preceded by the -n | --names option.

Flags
-A | --attribute key[,key ... ] Targets the network-storage system and logical volumes, where key is the attribute name and value is the attribute value. The keys-value pairs are separated by a comma. Tip: The attributes and attribute values are not locale specific. You can specify any of the following attribute keys:

Chapter 1. smcli

425

Key nssys

Data type string

Description The network-storage system, specified by name, ID, or world wide number (WWN). storage_oid The unique ID of the network-storage system, specified as a hexadecimal value prefixed with 0x (for example, 0x3e). Tip: Tip: You can use the lsmo -o command to list all system IDs, including network-storage system IDs. storage_name The name of the network-storage system. If the network-storage-system name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\). Tips: v Network-storage-system names might not be unique. This command acts on all network-storage systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple network-storage systems with the same name. To target a network-storage system that has a name that is not unique, identify the network-storage system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v The network-storage-system names are not locale specific. storage_wwn The WWN of the network-storage system. This value is displayed in the IBM Systems Director Web interface as the System Unique Name of the storage system.

nsvol

string

One or more logical volume names, separated by a comma. Do not include spaces.

-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of system host names and IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored.

426

IBM Systems Director Commands Reference

--help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more system hosts specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings.

Chapter 1. smcli

427

v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more system hosts, specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all system hosts in one or more specified groups, identified name or ID. The list can be a mixture of group names and IDs, separated by a comma. no Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific.

428

IBM Systems Director Commands Reference

-r | --remove Removes the specified volumes if there are no other connections to them. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more system hosts based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 26: A specified system type is not valid. v 29: The specified locale is not valid or not supported. v 51: An internal error occurred. v 52: The host was not found. v 53: A network-storage system was not found. v 54: The volume was not found.

Examples
Remove a connection between a storage subsystem and host This example illustrates how to detach the logical volume named DEV_1 on the network-storage system named MyStorage from the system host named system1.
smcli rmnspath -n system1 -A nssys=MyStorage,nsvol=DEV_1

Network storage systems commands


Use the smcli network storage systems commands to list network storage systems and edit properties.
Chapter 1. smcli

429

smcli commands
These smcli network storage system commands are available: chnssys Use the chnssys command to change the host-type identifier and auto-logical drive transfer (ADT) status on a network-storage system. lsnssys Use the lsnssys command to list the network-storage systems discovered by IBM Systems Director.

chnssys command
Use the chnssys command to change the host-type identifier and auto-logical drive transfer (ADT) status on a network-storage system.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] chnssys options For information about the options listed above that are specific to smcli, enter smcli -?. smcli chnssys [-h | -? | --help] [-L language] smcli chnssys [-L language] [-v] [-A attribute_list] [-t system_type] {-f file_name | -w query | -i ip_address_list | -N group_list | [-n] system_list}

Description
None

Operands
This command uses a network-storage system list as an operand. The list can optionally be preceded by the -n | --names option.

Flags
-A | --attribute {key=value}[,key=value...] Targets the network-storage system and changes the value of one or more specified attributes, where key is the attribute name and value is the attribute value. The keys-value pairs are separated by a comma. Tip: The attributes and attribute values are not locale specific. You can specify any of the following attribute keys:
Key host Data type string Description The name of the system host to target. If the system name contains a comma, prefix the comma with a backslash (\). A flag indicating whether to set the auto-logical drive transfer (ADT) status. The value is true if ADT is set, and false if it is not set. The keyword for the host type (for example, Linux). Use the lsnssys command to list the host types.

adtstatus

string

keywords

string

430

IBM Systems Director Commands Reference

-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of network-storage system names and IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress ip_address[,ip_address...] Targets one or more network-storage system, specified by IP address. Separate the IP addresses by a comma. ip_address The IP address of the network-storage system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings.
Chapter 1. smcli

431

v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {storage_oid | storage_name}[,{storage_oid | storage_name}...] Targets one or more network-storage systems specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. storage_oid The unique ID of the network-storage system, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: Use the lssys -o command to list all network-storage system IDs. storage_name The name of the network-storage system. If the network-storage system name contains a comma, prefix the comma with a backslash (\). Tips: v The network-storage system names might not be unique. This command acts on all network-storage systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple network-storage systems with the same name. To target a particular network-storage system that has a name that is not unique, identify the network-storage system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lsnssys command without any options to list all network-storage system names. v The network-storage system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all network-storage systems in one or more specified groups, identified name or ID. The list can be a mixture of group names and IDs, separated by a comma. no Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique.

432

IBM Systems Director Commands Reference

v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -t | --type system_type Targets all network-storage systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types. v The system types are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more network-storage systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 26: A specified system type is not valid. v 29: The specified locale is not valid or not supported. v 51: An internal error occurred. v 52: The host was not found.
Chapter 1. smcli

433

v 53: A network-storage system was not found.

Examples
1. Change the host type This example illustrates how to change the host type to Linux for the system host named host_1 on the network-storage system named MyStorage.
smcli chnssys -n MyStorage -A host=host_1,keyword=Linux

lsnssys command
Use the lsnssys command to list the network-storage systems discovered by IBM Systems Director.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsnssys options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsnssys [-h | -? | --help] [-L language] smcli lsnssys [-L language] [-v]

Description
Tip: There might be some network-storage systems that have been discovered by IBM Systems Director that are not listed because they are not supported.

Operands
None

Flags
-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish

434

IBM Systems Director Commands Reference

v v v v v v v

fr: French it: Italian ja: Japanese ko: Korean pt_BR: Brazilian Portuguese zh_CN: Simplified Chinese zh_TW: Traditional Chinese

Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 29: The specified locale is not valid or not supported. v 51: An internal error occurred. v 52: The host was not found.

Examples
List all storage subsystems This example illustrates how to list all network-storage systems, in XML format.
smcli lsnssys

Network storage volumes commands


Use the smcli network storage volumes commands to list, create, and delete network storage volumes and edit properties.

smcli commands
These smcli network storage volume commands are available: chnsvol Use the chnsvol command to change the name of a logical volume on a network-storage system. lsnsvol Use the lsnsvol command to list storage volume properties for the specified network-storage system.

Chapter 1. smcli

435

mknsvol Use the mknsvol command to create a storage volume by allocating a logical volume and setting the Redundant Array of Independent Disks (RAID) level for later attachment to a system host. rmnsvol The rmnsvol command removes one or more volumes on a network-storage system if the volume is not connected to a network-storage system.

chnsvol command
Use the chnsvol command to change the name of a logical volume on a network-storage system.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] chnsvol options For information about the options listed above that are specific to smcli, enter smcli -?. smcli chnsvol [-h | -? | --help] [-L language] smcli chnsvol [-L language] [-v] {-A attribute_list}{-f file_name | -w query | -i ip_address_list | -N group_list | [-n] system_list}

Description
Tip: Some storage systems might not support the renaming of volumes. In such cases, this command will fail.

Operands
This command uses a network-storage system as an operand. The network-storage system can optionally be preceded by the -n | --names option.

Flags
-A | --attribute {key=value}[,key=value...] Targets the network-storage system and logical volumes and sets the value of one or more specified volume attributes, where key is the attribute name and value is the attribute value. The keys-value pairs are separated by a comma. Tip: The attributes and attribute values are not locale specific. You can specify any of the following attribute keys:
Key Data type Description Changes the logical volume name to the specified name. Targets an existing logical volume, specified by volume.

absolutename string nsvol string

-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command.

436

IBM Systems Director Commands Reference

To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of network-storage system names and IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress ip_address[,ip_address...] Targets one or more network-storage system, specified by IP address. Separate the IP addresses by a comma. ip_address The IP address of the network-storage system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country

Chapter 1. smcli

437

code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {storage_oid | storage_name}[,{storage_oid | storage_name}...] Targets one or more network-storage systems specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. storage_oid The unique ID of the network-storage system, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: Use the lssys -o command to list all network-storage system IDs. storage_name The name of the network-storage system. If the network-storage system name contains a comma, prefix the comma with a backslash (\). Tips: v The network-storage system names might not be unique. This command acts on all network-storage systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple network-storage systems with the same name. To target a particular network-storage system that has a name that is not unique, identify the network-storage system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lsnssys command without any options to list all network-storage system names. v The network-storage system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all network-storage systems in one or more specified groups, identified name or ID. The list can be a mixture of group names and IDs, separated by a comma. no Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names.

438

IBM Systems Director Commands Reference

v The group names are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more network-storage systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 26: A specified system type is not valid. v 29: The specified locale is not valid or not supported. v 51: An internal error occurred. v 52: The host was not found. v 53: A network-storage system was not found.

Examples
1. Change the volume name This example illustrates how to change the name of the logical volume currently named DEV_1 to DEV_NEW on the network-storage system named MyStorage.
smcli chnsvol -n MyStorage -A nsvol=DEV_1,absolutename=DEV_NEW

lsnsvol command
Use the lsnsvol command to list storage volume properties for the specified network-storage system.

Chapter 1. smcli

439

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsnsvol options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsnsvol [-h | -? | --help] [-L language] smcli lsnsvol [-L language] [-v] {-A attribute_list}{-f file_name | -w query | -i ip_address_list | -N group_list | [-n] system_list}

Description
This command lists the storage volume properties for the specific volumes on the specified network-storage system. If you do not specify any storage volumes, this command lists properties for all volumes associated on the specified network-storage system.

Operands
This command uses a network-storage system as an operand. This operand must be preceded by the -n | --names option.

Flags
-A | --attribute key[,key ... ] Targets the storage volume , where key is the attribute name and value is the attribute value. The keys-value pairs are separated by a comma. Tip: The attributes and attribute values are not locale specific. You can specify any of the following attribute keys:
Key nsvol Data type string Description One or more logical volume names, separated by a comma. Do not include spaces.

-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of network-storage system names and IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored.

440

IBM Systems Director Commands Reference

--help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress ip_address[,ip_address...] Targets one or more network-storage system, specified by IP address. Separate the IP addresses by a comma. ip_address The IP address of the network-storage system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {storage_oid | storage_name}[,{storage_oid | storage_name}...] Targets one or more network-storage systems specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. storage_oid The unique ID of the network-storage system, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: Use the lssys -o command to list all network-storage system IDs.
Chapter 1. smcli

441

storage_name The name of the network-storage system. If the network-storage system name contains a comma, prefix the comma with a backslash (\). Tips: v The network-storage system names might not be unique. This command acts on all network-storage systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple network-storage systems with the same name. To target a particular network-storage system that has a name that is not unique, identify the network-storage system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lsnssys command without any options to list all network-storage system names. v The network-storage system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all network-storage systems in one or more specified groups, identified name or ID. The list can be a mixture of group names and IDs, separated by a comma. no Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more network-storage systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified.

442

IBM Systems Director Commands Reference

Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 29: The specified locale is not valid or not supported. v 51: An internal error occurred. v 53: A network-storage system was not found. v 54: The volume was not found.

Examples
1. List all volumes This example illustrates how to list, in XML format, all storage volumes on the network-storage system named MyStorage.
smcli lsnsvol -n MyStorage

2. List information about a volume This example illustrates how to list information about the storage volumes named DEV_1 and DEV_2.
smcli lsnsvol -n MyStorage -A nsvol=DEV_1,DEV_2

mknsvol command
Use the mknsvol command to create a storage volume by allocating a logical volume and setting the Redundant Array of Independent Disks (RAID) level for later attachment to a system host.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] mknsvol options For information about the options listed above that are specific to smcli, enter smcli -?. smcli mknsvol [-h | -? | --help] [-L language] smcli mknsvol [-L language] [-v] {-A attribute_list} {-f file_name | -w query | -i ip_address_list | -N group_list | [-n] system_list]

Description
You can specify a system host to ensure that a volume that can be connected to the targeted host is created. If the system host, network-storage systems, or other options are not specified, default values are used. Tip: You can set default values for the volume prefix, size, type, and RAID level in the SSPTSetting.xml file.
Chapter 1. smcli

443

Operands
This command uses a network-storage system as an operand. The list can optionally be preceded by the -n | --names option.

Flags
-A | --attribute key[,key ... ] Targets the network-storage system and logical volumes and sets the value of one or more specified volume attributes, where key is the attribute name and value is the attribute value. The keys-value pairs are separated by a comma. Tip: The attributes and attribute values are not locale specific. You can specify any of the following attribute keys:
Key host Data type string Description Targets the system host, specified by name or ID. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific.

444

IBM Systems Director Commands Reference

Key volumenameprefix

Data type string

Description Sets the volume prefix for naming logical volumes (for example, DEV_). Logical volumes are named by concatenating the prefix with an integer, starting with 0 for the first logical unit number (LUN) allocation to a specific storage system and increasing the integer by 1 for each additional LUN allocation. Tips: v The prefix can contain only alphanumeric characters, underscores, and hyphens. v The default value is defined in the SSPTSettings.xml file.

volumesetting

string

Sets the RAID level for allocating the volume. You can specify one of these values: You can specify one of the values for the volume setting: v RAID0: Data striping without parity. v RAID1: Mirroring. v RAID3: Data striping with dedicated parity. v RAID5: Data striping with distributed parity. This value is the default. Tip: The default value is defined in the SSPTSettings.xml file.

volumesize

Integer

Sets the default volume size, in megabytes. Tip: The default value is defined in the SSPTSettings.xml file. Sets the type of volume to allocate. You can specify one of these values: v FC: Fibre Channel v SAS: Serial-attached Small Computer Systems Interface v iSCSI: Internet SCSI Tip: The default value is defined in the SSPTSettings.xml file.

volumetype

string

-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of network-storage system names and IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored.

Chapter 1. smcli

445

--help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress ip_address[,ip_address...] Targets one or more network-storage system, specified by IP address. Separate the IP addresses by a comma. ip_address The IP address of the network-storage system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {storage_oid | storage_name}[,{storage_oid | storage_name}...] Targets one or more network-storage systems specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. storage_oid The unique ID of the network-storage system, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: Use the lssys -o command to list all network-storage system IDs.

446

IBM Systems Director Commands Reference

storage_name The name of the network-storage system. If the network-storage system name contains a comma, prefix the comma with a backslash (\). Tips: v The network-storage system names might not be unique. This command acts on all network-storage systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple network-storage systems with the same name. To target a particular network-storage system that has a name that is not unique, identify the network-storage system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lsnssys command without any options to list all network-storage system names. v The network-storage system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all network-storage systems in one or more specified groups, identified name or ID. The list can be a mixture of group names and IDs, separated by a comma. no Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -t | --type system_type Targets all network-storage systems of the specified type. The system types are organized in a hierarchy in which child subtypes extend parent types. When you specify a parent type (for example, Platforms), its children (in this case, PhysicalPlatforms) are also targeted. Tips: v This options is not a targeting option by itself. It must be used with another targeting option, such as -n | --names or -i | --ipaddress. v You can use this option in conjunction with other targeting options; however, this targeting option acts before all other targeting options. v Use the lssys -T command to obtain a list of valid system types.
Chapter 1. smcli

447

v The system types are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more network-storage systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 26: A specified system type is not valid. v 29: The specified locale is not valid or not supported. v 51: An internal error occurred. v 52: The host was not found. v 53: A network-storage system was not found. v 54: The volume was not found.

Examples
1. Create volume using default properties This example illustrates how to create a volume with default properties.
smcli mknsvol

2. Create a volume with customized properties This example illustrates how to creates a 2-GB volume that can be connected to the network-storage system named storage1.
smcli mknsvol -A host=system1,volumesize=2000 -n storage1

rmnsvol command
The rmnsvol command removes one or more volumes on a network-storage system if the volume is not connected to a network-storage system.

448

IBM Systems Director Commands Reference

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] rmnsvol options For information about the options listed above that are specific to smcli, enter smcli -?. smcli rmnsvol [-h | -? | --help] [-L language] smcli rmnsvol [-L language] [-v] {-A attribute_list}{-f file_name | -w query | -i ip_address_list | -N group_list | [-n] system_list}

Description
If the volume is attached to a host, it is not removed.

Operands
This command uses a network-storage system as an operand. The network-storage system must be preceded by the -n | --names option.

Flags
-A | --attribute key[,key ... ] Targets the storage volume , where key is the attribute name and value is the attribute value. The keys-value pairs are separated by a comma. Tip: The attributes and attribute values are not locale specific. You can specify any of the following attribute keys:
Key nsvol Data type string Description One or more logical volume names, separated by a comma. Do not include spaces.

-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of network-storage system names and IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips:
Chapter 1. smcli

449

v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress ip_address[,ip_address...] Targets one or more network-storage system, specified by IP address. Separate the IP addresses by a comma. ip_address The IP address of the network-storage system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {storage_oid | storage_name}[,{storage_oid | storage_name}...] Targets one or more network-storage systems specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. storage_oid The unique ID of the network-storage system, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: Use the lssys -o command to list all network-storage system IDs. storage_name The name of the network-storage system. If the network-storage system name contains a comma, prefix the comma with a backslash (\). Tips:

450

IBM Systems Director Commands Reference

v The network-storage system names might not be unique. This command acts on all network-storage systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple network-storage systems with the same name. To target a particular network-storage system that has a name that is not unique, identify the network-storage system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lsnssys command without any options to list all network-storage system names. v The network-storage system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all network-storage systems in one or more specified groups, identified name or ID. The list can be a mixture of group names and IDs, separated by a comma. no Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more network-storage systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs.
Chapter 1. smcli

451

v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 29: The specified locale is not valid or not supported. v 51: An internal error occurred. v 52: The host was not found. v 53: A network-storage system was not found. v 54: The volume was not found.

Examples
Remove a volume This example illustrates how to remove a logical volume named DEV_1 on the network-storage system named MyStorage.
smcli rmnsvol -A nsvol=DEV_1 -n MyStorage

Virtualization commands
The smcli virtualization commands perform administrative operations on virtual systems, hosts, and farms.

smcli commands
These smcli virtual systems, hosts, and farms commands are available: chvrtauth Use the chvrtauth command to authorize one or more platform managers or host systems by setting or revoking authorization credentials. chvrthost Use the chvrthost command to change the attributes of one or more virtual-server host. chfarm Use the chfarm command to add a host to or remove a host from a virtual farm or change a virtual farm's attributes. chvs lsvrtsys Use the lsvrtsys command to list the name and ID for virtual systems. lsvrtcap Use the lsvrtcap command to list virtualization capabilities of a virtual server or host system. mkfarm Use the mkfarm command to create a virtual farm. Use the chvs command to change the attributes of one or more virtual servers.

452

IBM Systems Director Commands Reference

mkrelocatetask Use the mkrelocatetask command to create a task to relocate (or migrate) virtual servers. mkvs Use the mkvs command to create a virtual server.

dircli commands
Using the smcli new automation plan commands is recommended; however, the dircli event-action plan commands listed in the following table are supported in this release for compatibility with IBM virtualization manager version 1.2. Note that not all command options are supported in this release. For information about the dircli commands, see the commands reference in the IBM virtualization manager v1.2 information center at publib.boulder.ibm.com/ infocenter/eserver/v1r2/topic/eica7/ eica7_reference_command_info_commands.htm. Important: v You must enter the dircli commands entered in lower case. v To use a dircli command with the same name as an smcli command, you must define the CLILEGACY environment variable and set it to a value of 1.
Table 7. Supported dircli commands dircli command chvsmauth Description and supported syntax Enters or revokes credentials for a platform manager Syntax: chvsmauth [-d] [-l] [-q] [-v] {-s} {-u user} {-p password} [-o port] platform_manager chvsmauth [-d] [-l] [-q] [-v] {-r} platform_manager chvsmfarm chfarm Changes a server farm's attributes, or adds or removes a host from a server farm Syntax: chvsmfarm {-a} {-H host} object chvsmfarm {-a} {-i host} {-u user} {-p password} [-o port] object chvsmfarm {-A attribute_list} object chvsmfarm {-r} {-H host} object Equivalent smcli command chvrtauth

Chapter 1. smcli

453

Table 7. Supported dircli commands (continued) dircli command chvsmhost Description and supported syntax Changes the attributes of a host Syntax: chvsmhost [-d] [-l] [-q] [-v] {-a attribute_list} host chvsmhost [-d] [-l] [-q] [-v] -m host chvsmvs Changes the attributes of a virtual server Syntax: chvsmvs [-l] [-q] [-v] {-a attribute_list} virtual_server chvsmvsreg Registers or unregisters a virtual server Syntax: chvsmvsreg [-d] [-l] [-q] [-v] {-r} {-H host} {-p configuration_file} chvsmvsreg [-d] [-l] [-q] [-v] {-U} virtual_server chvsmvsreg [-d] [-l] [-q] [-v] {-D} virtual_server lsvsm Lists all virtual systems Syntax: lsvsm [-d] [-l] [-q] [-v] [-F filter] [-U object] [virtual_system] lsvsmsysplan Lists system plan files on a platform manager Syntax: lsvsmsysplan mkvsmfarm Creates a virtual farm Syntax: mkvsmfarm {-i display_name} [[-p path] [-H] [-w] object] mkfarm lsvrtsys lsvrtsys There is no equivalent smcli command. chvs Equivalent smcli command chvrthost

454

IBM Systems Director Commands Reference

Table 7. Supported dircli commands (continued) dircli command mkvsmmigratetask Description and supported syntax Creates a task for migrating virtual servers Syntax: mkvsmmigratetask {-i display_name} {-D destination} source mkvsmsysplan Lists the system plan file on a platform manager Syntax: lsvsmsysplan mkvsmvs Creates a system plan for the There is no equivalent smcli platform-manager host command. Syntax: mkvsmvs [-d] [-l] [-q] [-v] {-H host} {-a attribute_list} There is no equivalent smcli command. Equivalent smcli command mkrelocatetask

chvrtauth command
Use the chvrtauth command to authorize one or more platform managers or host systems by setting or revoking authorization credentials.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] chvrtauth options For information about the options listed above that are specific to smcli, enter smcli -?. smcli vsmsecurity chvrtauth [-h | -? | --help] [-L language] smcli vsmsecurity chvrtauth [-L language] [-v] {-s -u user -p password} [-T port] {-f file_name | -w query | -i ip_address_list | -N group | [-n] system_list} smcli vsmsecurity chvrtauth [-L language] [-v] {-r} {-w query | -i ip_address_list | -N group | [-n] system_list}

Description
None

Operands
This command uses a list of platform-manager or host-system names and IDs as an operand. The list can optionally be preceded by the -n | --names option.

Chapter 1. smcli

455

Flags
-f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of platform-manager or host-system names and IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name | platform_manager_name}[,{ip_address | host_name | platform_manager_name}...] Targets one or more platform managers or host systems, specified by IP address, host name, or platform-manager name. The list can be a mixture of IP addresses, host names, and platform-manager names, separated by commas. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely.

456

IBM Systems Director Commands Reference

platform_manager_name Either the platform-manager name or the platform-manager name and Domain Name System (DNS) suffix of the system. Tips: v You can enter lsgp -N "Platform Managers" -A GroupMembers to list all platform-manager names. v The platform-manager names are not locale specific. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more platform managers or host systems, specified by name or ID. The list can be a mixture of system names and IDs, separated by commas. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names.
Chapter 1. smcli

457

v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all platform managers or host systems in one or more specified groups, identified name or ID. The list can be a mixture of group names and IDs, separated by commas. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -p | --password password Specifies the password used for the specified platform managers or host systems user account. -r | --revoke Revokes authentication credentials, which prevents IBM Systems Director from communicating with third-party virtualization support running in the platform managers or host systems. -s | --set Sets authentication credentials, which allows IBM Systems Director to communicate with third-party virtualization support running in the platform managers or host systems. -T | --port port Sets the port to use for communication with VMware VirtualCenter or host systems. The default port is 8443 for platform managers or 443 for host systems. -u | --user user Specifies the user account on the platform managers or host systems. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more platform managers or host systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:

458

IBM Systems Director Commands Reference

"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 20: A specified system is not valid. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 100: An error occurred while retrieving targeted systems. v 101: A targeted system was not found. v 102: An error occurred while changing authorization.

Examples
1. Authorize multiple platform managers This example illustrates how to connect to and saves the credentials for all platform managers in the HMCs group. The user ID and password are the same on all targeted systems. smcli vsmsecurity chvrtauth -s -u user1 -p passw0rd -N HMCs 2. Authorize multiple host systems This example illustrates how to connect to and saves the credentials for all host systems based on the POWER or IA32 architecture. The user ID and password are the same on all targeted systems. smcli vsmsecurity chvrtauth -s -u user1 -p passw0rd -w "Architecture=POWER OR Architecture=IA32" 3. Revoke authorization for a platform manager This example illustrates how to disconnect from and deletes the saved credentials for the platform manager named pm1. smcli vsmsecurity chvrtauth -r pm1

chvrthost command
Use the chvrthost command to change the attributes of one or more virtual-server host.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] chvrthost options
Chapter 1. smcli

459

For information about the options listed above that are specific to smcli, enter smcli -?. smcli chvrthost [-h | -? | --help] [-L language] smcli chvrthost [-L language] [-v] {-A attribute_list} {-f file_name | -w query | -i ip_address_list | -N group | [-n] system_list} smcli chvrthost [-L language] [-v] {-m} {-f file_name | -w query | -i ip_address_list | -N group | [-n] system_list}

Description
None

Operands
This command uses a list of virtual-server host names and IDs as an operand. The list can optionally be preceded by the -n | --names option.

Flags
-A | --attribute {key=value}[,key=value...] Sets the value of one or more specified attributes, where key is the attribute name and value is the attribute value. The keys-value pairs are separated by a comma. Tip: Use the lsvrtcap command to list the editable attributes of the targeted virtual-server hosts. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of virtual-server host names and IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command.

460

IBM Systems Director Commands Reference

-i | --ipaddress {ip_address | host_name}[,{ip_address | host_name}...] Targets one or more hosts, specified by IP address or host name. The list can be a mixture of IP addresses and host names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -m | --maintenance Toggles on and off maintenance mode on the targeted host.

Chapter 1. smcli

461

A host can be put in maintenance mode is used, for example, to prevent live migration or automatically migrate virtual servers off of the host under certain configurations. Tip: Use the lsvrtsys -l command to determine the current mode. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more virtual-server hosts, specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all virtual-server hosts in one or more specified groups, identified name or ID. The list can be a mixture of group names and IDs, separated by a comma. no Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific.

462

IBM Systems Director Commands Reference

-v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more virtual-server hosts based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 27: A specified attribute is not valid. v 29: The specified locale is not valid or not supported. v 100: An error occurred while retrieving targeted systems. v 101: A targeted system was not found. v 107: An error occurred while changing virtualization attributes on a host.

Examples
1. Change attributes of a virtual server host This example illustrates how to list all editable attributes, and then enable dynamic relocation for the host named host1. Other required attributes are an IP address valid on the relocation network to be used during dynamic relocation (do not use the hosts IP Address), the IP address of a gateway for the relocation network, and the label of the relocation network.
smcli lsvrtcap -c chvrthost host1 smcli chvrthost -A "enablerelocation=true,ipaddress=110.110.1.2, gateway=110.110.1.1, network=myNetwork" host1

2. Change maintenance mode of a virtual server host This example illustrates how to turn on maintenance mode for the host named host1.
smcli chvrthost -m host1

Chapter 1. smcli

463

chfarm command
Use the chfarm command to add a host to or remove a host from a virtual farm or change a virtual farm's attributes.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] chfarm options For information about the options listed above that are specific to smcli, enter smcli -?. smcli chfarm [-h | -? | --help] [-L language] smcli chfarm [-L language] [-v] {-H host} [{-u user_name} {-p password} [-o port]] {virtual_farm} smcli chfarm [-L language] [-v] {-r host} {virtual_farm} smcli chfarm [-L language] [-v] {-A attribute_list} {virtual_farm}

Description
Important: The syntax or output for this command has changed since IBM Virtualization Manager v1.2. You can use the IBM Virtualization Manager v1.2 command syntax and output by setting the CLILEGACY environment variable to 1. For more information about the v1.2 commands, see the commands reference in the IBM Virtualization Manager v1.2 information center at publib.boulder.ibm.com/infocenter/eserver/v1r2/topic/eica7/ eica7_reference_command_info_commands.htm.

Operands
This command uses the name or ID of the virtual farm being modified list as an operand. farm_oid The unique ID of the virtual farm, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: Use the lsvrtsys command without the operand to list all virtual farm IDs. farm_name The name of the virtual farm. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v Use the lsvrtsys command without the operand to list all virtual farm names. v The farm names are not locale specific.

Flags
-A | --attribute {key=value}[,key=value...] Sets the value of one or more specified attributes, where key is the attribute name and value is the attribute value. The keys-value pairs are separated by a comma.

464

IBM Systems Director Commands Reference

You can specify any of the following keys.


Key Highavail Data type string Description High Availability Enabled You can specify one of these values: v Activate: High availability is active on the virtual farm. v Deactivate: High availability is not active on the virtual farm. Hapolicy string High Availability Policy You can specify one of these policies: v Notify: Notifies you when the host is not available. v Restart: Restarts the virtual servers on a different host if the host is not available. v Automatic: Automatically relocates the virtual servers to a different host in the farm when the host is not available. Vmotion string VirtualCenter vmotion rate You can specify one of these values to set how frequently VMotion happen: v Conservative v Normal v Aggressive Wrkbal string Workload Balancing You can specify one of these values: v Activate:- Workload balancing is activate on the virtual farm. v Deactivate: Workload balancing is not active on the virtual farm.

-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -H | --host {host_oid | host_name | ip_address} Adds the virtual-server host, specified by name, ID or IP address, to the virtual farm. host_oid The unique ID of the host, specified as a hexadecimal value prefixed with 0x (for example, 0x37).
Chapter 1. smcli

465

Tip: Use the lsvrtsys command without the operand to list all virtual-system host IDs. host_name The name of the host. If the host name contains a comma, prefix the comma with a backslash (\). Tip: Use the lsvrtsys command without the operand to list all virtual-system host names. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -p | --password password Specifies the password for the specified VMware user account. -o | --port port Specifies the port to use for communication between the virtual-server host and the VMware VirtualCenter. The default port is 902. -r | --remove Removes the virtual-server host from the virtual farm. The host is, specified by name, ID or IP address. host_oid The unique ID of the host, specified as a hexadecimal value prefixed with 0x (for example, 0x37).

466

IBM Systems Director Commands Reference

Tip: Use the lsvrtsys command without the operand to list all virtual-system host IDs.

host_oid The unique ID of the host, specified as a hexadecimal value prefixed with 0x (for example, 0x37). Tip: Use the lsvrtsys command without the operand to list all virtual-system host IDs.

ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. -u | --user user_name Specifies the user account on the VMware host. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 29: The specified locale is not valid or not supported.

Examples
1. Change virtual-farm attributes This example illustrates how to activate high availability for a farm named TestFarm.
smcli chfarm -A Highavail=Activate Farm1

2. Add a virtual-server host to a virtual farm This example illustrates how to add a virtual-server host named Host1 to a virtual farm named Farm1.
smcli chfarm -H host1 Farm1

3. Remove a virtual-server host to a virtual farm This example illustrates how to remove a virtual-server host named Host1 from a virtual farm named Farm1.
smcli chfarm -r host1 Farm1

chvs command
Use the chvs command to change the attributes of one or more virtual servers.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] chvs options
Chapter 1. smcli

467

For information about the options listed above that are specific to smcli, enter smcli -?. smcli chvs [-h | -? | --help] [-L language] smcli chvs [-L language] [-v] {-A attribute_list} {-f file_name | -w query | -i ip_address_list | -N group | [-n] system_list} [-s option_row_parameters]

Description
None

Operands
This command uses a list of virtual server names and IDs as an operand. The list can optionally be preceded by the -n | --names option.

Flags
-A | --attribute {key=value}[,key=value...] Sets the value of one or more specified attributes, where key is the attribute name and value is the attribute value. The keys-value pairs are separated by a comma. Tip: Use the lsvrtcap command to list the editable attributes of the targeted virtual server. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of virtual-server names and IDs, separated by commas or line breaks. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command.

468

IBM Systems Director Commands Reference

-i | --ipaddress {ip_address | virtual_server_name}[,{ip_address | virtual_server_name}...] Targets one or more virtual servers, specified by IP address or virtual-server name. The list can be a mixture of IP addresses and virtual-server names, separated by a comma. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. virtual_server_name The name of the virtual server. Tips: v You can enter lsgp -N "Virtual Servers" -A GroupMembers to list all virtual-server names. v The virtual-server names are not locale specific. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more virtual servers, specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs.

Chapter 1. smcli

469

system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all virtual servers in one or more specified groups that are identified name or ID. The list can be a mixture of group names and IDs, separated by a comma. Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -s | --subjoin option_row_parameters Adds an option row to a parameter table. You must declare all parameters (CLI attributes) of an option. Tip: Use the lsvrtcap -c chvs command to list parameter tables and the cli attributes that are available to add as option rows. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more virtual servers based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:

470

IBM Systems Director Commands Reference

"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lssys -l command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 27: A specified attribute is not valid. v 29: The specified locale is not valid or not supported. v 100: An error occurred while retrieving targeted systems. v 101: A targeted system was not found. v 105: An error occurred while changing virtual server attributes.

Examples
Change attributes of virtual server This example illustrates how to list the editable attributes, and then change the number of CPUs to two for a virtual server named vs_1.
smcli lsvrtcap -c chvs -n vs_1 smcli chvs -A "cpu=2" vs_1

lsvrtsys command
Use the lsvrtsys command to list the name and ID for virtual systems.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsvrtsys options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsvrtsys [-h | -? | --help] [-L language] smcli lsvrtsys [-L language] [-v] [-d symbol] [-o | -p] [-c {all | immediate}] [-A attribute_list [-s] | -l] {-f file_name | -w query | -i ip_address_list | -N group_list | [-n] system_list}

Chapter 1. smcli

471

Description
If no options are specified, this command lists all the names and IDs for virtual systems, including platform managers, virtual farms, virtual servers, guest operating systems, and systems with virtualization support.

Operands
This command uses a list of virtual-system names and IDs as an operand. The list can optionally be preceded by the -n | --names option.

Flags
-A | --attribute key[,key ... ] Displays values for one or more specified attributes, where key is the attribute key. Tip: v Separate the keys with commas. v You can use the lsvrtsys -l command to list all attributes associated with the targeted virtual systems. -c | --children {all | immediate} Lists the information about systems that have a virtualization relationships with each targeted virtual system. all Lists information for all descendant systems (children, grandchildren, and so on).

immediate Lists information for only immediate child systems. -d | --delimiter symbol Specifies the character or set of characters that separates output data, where symbol is a string of one or more characters. The behavior of this option depends on the use of other options in the command, as shown below. v If you specify this option without the -A | --attribute option, this command separates data fields in a record by a comma followed by a space. Data records are separated by the specified delimiter symbol. v If you specify this option with the -A | --attribute option, this command separates data fields in a record by the specified delimiter symbol. Data records are separated by a line break. v If you specify this option with the -l | --long option, the delimiter option is ignored. -f | --file {file_name | -} Retrieves data either from the input file file_name or from input piped from another command. To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks. The input data is the list of virtual system names and IDs, separated by commas or line breaks.

472

IBM Systems Director Commands Reference

-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name | platform_manager_name | virtual_server_name}[,{ip_address | host_name | platform_manager_name | virtual_server_name}...] Targets one or more virtual systems, specified by IP address, host name, platform-manager name, or virtual-server name. The list can be a mixture of IP addresses, host names, platform-manager names, and virtual-server names, separated by commas. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v You can use the lsgp -N "Virtual Farms" -A GroupMembers command to list all host names in a farm. v The host names are not locale specific. platform_manager_name Either the platform-manager name or the platform-manager name and Domain Name System (DNS) suffix of the system. Tips: v You can enter lsgp -N "Platform Managers" -A GroupMembers to list all platform-manager names. v The platform-manager names are not locale specific. virtual_server_name The name of the virtual server. Tips:
Chapter 1. smcli

473

v You can enter lsgp -N "Virtual Servers" -A GroupMembers to list all virtual-server names. v The virtual-server names are not locale specific. -l | --long Displays all virtual system attributes. This option returns values in the following format:
system_name attribute_key: value attribute_key: value ...

-L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name}[,{system_oid | system_name}...] Targets one or more virtual systems, specified by name or ID. The list can be a mixture of system names and IDs, separated by a comma. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not

474

IBM Systems Director Commands Reference

unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -N | --groups {group_oid | group_name}[,{group_oid | group_name}...] Targets all virtual systems in one or more specified groups, identified name or ID. The list can be a mixture of group names and IDs, separated by a comma. no Tips: v If the same systems are members of more than one group, they are targeted only once. v To target all systems, specify the All Systems group. group_oid The unique ID of the group, specified as a hexadecimal value prefixed with 0x (for example, 0x3e7). Tip: Use the lsgp -o command to list all group IDs. group_name The name of the group. If the group name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\) and enclose the name in quotation marks.. Tips: v Group names are unique. v Use the lsgp command without any options to list all group names. v The group names are not locale specific. -o | --oid Displays the unique IDs associated with the targeted systems in addition to other information. IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x3e). Tips: v This option cannot be used with the -p | --pipe option. v You can combine this option with the -l | --long and -A | --attribute options. -p | --pipe Displays only the unique IDs for the targeted systems instead of the name. Tips: v IDs are displayed as hexadecimal values, prefixed with 0x (for example, 0x37). v When used alone, this option enables the output to be piped to other smcli commands. v This option cannot be used with the -o | --oid options. v You can combine this option with the -l | --long and -A | --attribute options.

Chapter 1. smcli

475

-s | --sort Sorts the output by the first specified attribute. Tip: If you specify this option, you must also specify the -A | --attribute option. Otherwise, this option is ignored. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --where "query" Targets one or more virtual systems based on system attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key=value [{AND | OR} attribute_key=value...]"

where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type integer, an integer must be specified. Tips: v Use logical operators AND or OR to combine attributes. v Use parentheses to create nested logical constructs. v The query operand must be enclosed in quotation marks. Do not use double quotation marks in the query. v If the value contains spaces, enclose it in single quotation marks. v Only system attributes can be specified. Use the lsvrtsys command to list the available system attributes.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 21: A specified system group is not valid. v 25: A number-formatting error occurred. v 27: A specified attribute is not valid. v 29: The specified locale is not valid or not supported. v 100: An error occurred while retrieving targeted systems. v 101: A targeted system was not found. v 103: An error occurred while changing authorization. v 104: An error occurred when retrieving extended properties.

Examples
1. List all virtual systems This example illustrates how to list the name of all virtual systems.
smcli lsvrtsys hci062.pdl.mycomp.com hci020.pdl.mycomp.com test myFarm

2. List virtual servers running on a specific systems

476

IBM Systems Director Commands Reference

This example illustrates how to list the object IDs for the virtual servers named system1 and system2.
smcli lsvrtsys -o -n system1,system2 system1, 0x5ad system2, 0x750

lsvrtcap command
Use the lsvrtcap command to list virtualization capabilities of a virtual server or host system.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] lsvrtcap options For information about the options listed above that are specific to smcli, enter smcli -?. smcli lsvrtcap [-h | -? | --help] [-L language] smcli lsvrtcap [-L language] {-c command} [-v] [-g | -A guest_os] [-m | -e existing_virtual_server] [-p] [-o owner] [-w | --network network] [-d | --diskalloctype allocation_type] [-t | --portlayer port_layer] [-s setting] {-i ip_address | [-n] system}

Description
The virtualization capabilities include attributes and information about those attributes (such as its format, minimum value and maximum value) that are useful when creating related objects or changing attributes on the target virtual server host system. If you do not specify the -g | --availgos or -A | --guestosattr options, this command lists all virtualization capabilities for the target virtual server host system.

Operands
This command uses a host name, platform-manager name, or virtual-server name as an operand. The list can optionally be preceded by the -n | --names option.

Flags
-A | --guestosattr guest_os Lists the guest-operating-system attributes available when creating a virtual server on the specified virtual-server host system on which the specified guest operating system runs. Tip: If you specify this option, you must also specify the -c mkvs option. -c | --cmd {mkvs | chvs | chvrthost} Lists the attributes that can be set by the specified virtualization command. -d | --diskalloctype allocation_type Lists attributes for the given disk allocation type. -e | --existingvs existing_virtual_server Lists the system attributes available when creating a virtual server on the specified host from the existing virtual server that is provided.
Chapter 1. smcli

477

Tip: If you specify this option, you must also specify the -c mkvs option. -g | --availgos Lists the guest-operating-systems that can be used when creating a virtual server on this virtual-server host system. Tip: If you specify this option, you must also specify the -c mkvs option. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name | platform_manager_name | virtual_server_name} Targets a host system, platform manager, or virtual server, specified by IP address, host name, platform-manager name, or virtual-server name. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. platform_manager_name Either the platform-manager name or the platform-manager name and Domain Name System (DNS) suffix of the system. Tips:

478

IBM Systems Director Commands Reference

v You can enter lsgp -N "Platform Managers" -A GroupMembers to list all platform-manager names. v The platform-manager names are not locale specific. virtual_server_name The name of the virtual server. Tips: v You can enter lsgp -N "Virtual Servers" -A GroupMembers to list all virtual-server names. v The virtual-server names are not locale specific. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -m | --availvms Lists the virtual systems that can be used when creating a new virtual server on this virtual server host system. Tip: If you specify this option, you must also specify the -c mkvs option. -n | --names {system_oid | system_name} Targets a virtual server, platform manager, or host system specified by name or ID. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\).

Chapter 1. smcli

479

Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names. v The system names are not locale specific. -o | --owner owner Lists the virtual addresses for the given owner. Tip: If you specify this option, you must also specify the -c mkvs or the -c chvs option. -p | --procdata Shows additional processor data. This data contains the processor id, address, processor type, dedicated state, and cryptographic facility. Tip: If you specify this option, you must also specify the -c mkvs or the -c chvs option. -s | --generalsetting setting Lists the types of server settings that can be modified. Tip: z/VM has either ACTIVE or STORED settings. If this attribute is not specified, then the possible settings are listed. -t | --portlayer port_layer Lists attributes for the given port layer. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -w | --network network Lists attributes for the given network.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 10: The file was not found. v 25: A number-formatting error occurred. v 29: The specified locale is not valid or not supported. v 100: An error occurred while retrieving targeted systems. v 101: A targeted system was not found.

Examples
1. List all virtualization capabilities This example illustrates how to lists all virtualization capabilities that can be specified when creating a virtual server on a virtual-server host system named virthost1.
smcli lsvrtcap -c mkvs -n virthost1

2. List guest operating systems

480

IBM Systems Director Commands Reference

This example illustrates how to list the guest operating systems that can be used when creating a virtual server on the virtual server host system with IP address 110.110.1.2.
smcli lsvrtcap -g -c mkvs -i 110.110.1.2

3. List the guest-operating-system attributes This example illustrates how to list the guest-operating-system attributes available when creating a virtual server on the host system named virtsys1 on which the specified guest operating system Windows Server 2003 Enterprise runs.
smcli lsvrtcap -n system1 -A "Windows Server 2003 Enterprise"

4. List attributes displayed in a table format and select rows from the table Tips: These tips apply to the tables that are displayed for these examples. v The key column is used to uniquely identify a row in a table. v The syntax to select a row from the Options is: table_name=row_key1;row_key2; (for example disks=disk1:rootvg:pva3202;disk2:rootvg:pva3202). v Multiple rows are separated using a semicolon. v When changing the rows in a table, specify a plus to add a row and a minus to remove a row. This example illustrates how to determine the attributes that can be specified when creating a virtual server on the host named Power_Host for the IBM Power - AIXLINUX operating system. Inspect the disks table displayed.
smcli lsvrtcap -c mkvs -A "IBM Power - AIXLINUX" Power_Host disks Min: 1 Max: 3 Changeable Columns: Column Name* Virtual Disks Disk Pool Storage Server

CLI Attribute vdiskname vdiskpool vdiskstgsvr

Options: Key, Virtual Disks*, Size (MB), Disk Pool*, Storage Server* [disk1:rootvg:pva3202] disk1 1024 rootvg pva3202 [disk2:rootvg:pva3202] disk2 1024 rootvg pva3202 [disk3:rootvg:pva3202] disk3 1024 rootvg pva3202

This example illustrates how to create a virtual server specifying disk1 and disk2 and verify it is created with disk1 and disk2.
smcli mkvs -A "name=vs1, gos=IBM Power - AIXLINUX, cpumode=DEDICATED, cpudedicated=1, memsize=256, disks=disk1:rootvg:pva3202;disk2:rootvg:pva3202, networks=20" Power_Host smcli lsvrtcap -c chvs vs1 disks Values: Key, Virtual Disks, [disk1:rootvg:pva3202] [disk2:rootvg:pva3202] Options: Key, Virtual Disks, [disk1:rootvg:pva3202] [disk2:rootvg:pva3202] [disk3:rootvg:pva3202] Size, disk1 disk2 Size, disk1 disk2 disk3 Disk Pool, Storage Server 1024 MB rootvg pva3202 1024 MB rootvg pva3202 Disk Pool, Storage Server 1024 rootvg pva3202 1024 rootvg pva3202 1024 rootvg pva3202

This example illustrates how to add disk3 from vs_1 and remove disk1 and verify the results.
Chapter 1. smcli

481

smcli chvs -A "disks=+disk3:rootvg:pva3202;-disk1:rootvg:pva3202" vs1 smcli lsvrtcap -c chvs vs1 disks Values: Key, Virtual Disks, Size, Disk Pool, Storage Server [disk3:rootvg:pva3202] disk2 1024 MB rootvg pva3202 Options: Key, Virtual Disks, Size, Disk Pool, Storage Server [disk1:rootvg:pva3202] disk1 1024 rootvg pva3202 [disk2:rootvg:pva3202] disk2 1024 rootvg pva3202 [disk3:rootvg:pva3202] disk3 1024 rootvg pva3202

mkfarm command
Use the mkfarm command to create a virtual farm.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] mkfarm options For information about the options listed above that are specific to smcli, enter smcli -?. smcli mkfarm [-h | -? | --help] [-L language] smcli mkfarm [-L language] [-v] [[-p path] [-H] [-W] {-n object}] farm_name

Description
Important: The syntax or output for this command has changed since IBM Virtualization Manager v1.2. You can use the IBM Virtualization Manager v1.2 command syntax and output by setting the CLILEGACY environment variable to 1. For more information about the v1.2 commands, see the commands reference in the IBM Virtualization Manager v1.2 information center at publib.boulder.ibm.com/infocenter/eserver/v1r2/topic/eica7/ eica7_reference_command_info_commands.htm.

Operands
This command uses a virtual-farm name as an operand. This command creates a server farm with the specified name.

Flags
-h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored.

482

IBM Systems Director Commands Reference

v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -H | -highavail Activates high availability on the server farm. Tip: A farm must have high-availability capabilities to use this option. For example, Virtual Center farms and Virtual Availability Manager farms can be a high-availability farm. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name} Constructs the server farm on the specified platform-manager system, identified by name or ID. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lssys command without any options to list all system names.
Chapter 1. smcli

483

v The system names are not locale specific. -p | --path path Specifies the path of the VMware VirtualCenter farm group. This name must start with vcenter/. Tip: If you do not specify this option, the default path is vcenter/. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages. -W | --workloadbalance Activates workload balancing on the server farm. Tip: A farm must have workload-balancing capabilities to use this option. Only Virtual Center farms can be a workload-balancing farm.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 29: The specified locale is not valid or not supported.

Examples
Create a Farm This example illustrates how to create a high-availability virtual farm named Farm1.
smcli mkfarm -H Farm1

mkrelocatetask command
Use the mkrelocatetask command to create a task to relocate (or migrate) virtual servers.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] mkrelocatetask options For information about the options listed above that are specific to smcli, enter smcli -?. smcli mkrelocatetask [-h | -? | --help] [-L language] smcli mkrelocatetask [-L language] [-v] {-d destination} {-s source} [-A attribute_list] task_name

Description
Important: The syntax or output for this command has changed since IBM Virtualization Manager v1.2. You can use the IBM Virtualization Manager v1.2 command syntax and output by setting the CLILEGACY environment variable to 1. For more information about the v1.2 commands, see the commands reference in the IBM Virtualization Manager v1.2 information center at

484

IBM Systems Director Commands Reference

publib.boulder.ibm.com/infocenter/eserver/v1r2/topic/eica7/ eica7_reference_command_info_commands.htm Tip: Use the runtask command to run this relocate virtual server task

Operands
This command uses a task name as an operand. This command creates a task with the specified name.

Flags
-A | --attribute {key=value}[,key=value...] Sets the value of one or more specified attributes, where key is the attribute name and value is the attribute value. The keys-value pairs are separated by a comma. You can specify any of the following keys.
Key PowerON Data type string Description A flag indicating whether to power on virtual servers after the relocation completes. The value is true if the virtual servers are powered on, and false if the virtual servers are not powered on. Relocation policy type You can specify one of these types: v Live: Relocates the virtual servers event when those virtual servers are powered on and running. v Static: Relocates the virtual servers only when those virtual servers are powered off. Maintenance string A flag indicating whether to keep VMWare host in maintenance mode after the relocation completes. The value is true if the hosts are to be kept in maintenance mode, and false if the hosts need not be kept in maintenance mode. A flag indicating whether to run the relocation task based on CPU usage. The value is true if the relocation should be done considering the CPU usage, and false if relocation can be done without considering the CPU usage. Save and run options You can specify one of these values: v Save: Saves the relocation task v Run: Runs the relocation task v SaveAndRun: Saves and runs the relocation task

Policy

string

UtilizationBased string

RunMode

string

-d | --destination {system_name | system_oid} Migrates the virtual server to the specified virtual-server host or virtual farm system, identified by name or ID. Tip: v If you specify a virtual farm, you must specify a virtual-server host as the source.
Chapter 1. smcli

485

v Use the lsvrtsys command without the operand to list all virtual system names and IDs. system_oid The unique ID of the virtual-server host or virtual farm, specified as a hexadecimal value prefixed with 0x (for example, 0x37). system_name The name of the virtual-server host or virtual farm. If the host name contains a comma, prefix the comma with a backslash (\). -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -s| --source {system_name | system_oid} Migrates the virtual server from the specified virtual server or virtual-server host, identified by name or ID.

486

IBM Systems Director Commands Reference

Tip: Use the lsvrtsys command without the operand to list all virtual system names and IDs. system_oid The unique ID of the virtual-server host or virtual farm, specified as a hexadecimal value prefixed with 0x (for example, 0x37). system_name The name of the virtual-server host or virtual farm. If the host name contains a comma, prefix the comma with a backslash (\). -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully. v 1: A usage error occurred. v 29: The specified locale is not valid or not supported.

Examples
Relocate all the virtual servers This example illustrates how to relocate all virtual servers on host1 to host2.
smcli mkrelocatetask -d host2 -s host1 reloc1

mkvs command
Use the mkvs command to create a virtual server.

Syntax
smcli [-c] [-prompt] [-user user_name] [-pw password] mkvs options For information about the options listed above that are specific to smcli, enter smcli -?. smcli mkvs [-h | -? | --help] [-L language] smcli mkvs [-L language] [-v] {-A attribute_list} {-i ip_address | [-n] system} [-s option_row_parameters]

Description
None

Operands
This command uses a virtual-system host name or ID as an operand. The list can optionally be preceded by the -n | --names option.

Flags
-A | --attribute {key=value}[,key=value...]

Chapter 1. smcli

487

Sets the value of one or more specified attributes, where key is the attribute name and value is the attribute value. The key-value pairs are separated by a comma. Tip: Use the lsvrtcap command to list the editable attributes for the targeted virtual-server host. -h | -? Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -L | --lang, the options are ignored. --help Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. Tips: v If you specify additional options other than -L | --lang, the options are ignored. v (AIX and Linux only) You can also display detailed help in the form of man pages using the man command_name command. -i | --ipaddress {ip_address | host_name} Targets a virtual server, specified by IP address or host name. ip_address The IP address of the system. Tips: v You can enter lssys -A IPv4Address to list all IP addresses. v Use IPv4 format to specify the IP address. host_name Either the host name or the host name and Domain Name System (DNS) suffix of the system. If the host name contains spaces, enclose it in quotation marks. If it contains a comma, prefix the comma with a backslash (\).. Tips: v You can use the lsgp -N Hosts -A GroupMembers command to list all host names. v The host names are not locale specific. v A given IP address or hostname might resolve multiple systems. For example, both the OperatingSystem and Server instance of a particular system will have the same host name. Use system Object ID (option -n) to target a system uniquely. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian

488

IBM Systems Director Commands Reference

v v v v v

ja: Japanese ko: Korean pt_BR: Brazilian Portuguese zh_CN: Simplified Chinese zh_TW: Traditional Chinese

Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -n | --names {system_oid | system_name} Targets a virtual-server host, specified by name or ID. system_oid The unique ID of the system, specified as a hexadecimal value prefixed with 0x (for example, 0x37) or a decimal value (for example, 123). Tip: Use the lssys -o command to list all system IDs. system_name The name of the system. If the system name contains a comma, prefix the comma with a backslash (\). Tips: v The system names might not be unique. This command acts on all systems with the specified name. Use the -v | --verbose option to generate a message when this command targets multiple systems with the same name. To target a particular system that has a name that is not unique, identify the system by specifying its unique, hexadecimal ID, or use additional target options to refine the selection. v Use the lsvsm -F vsmhost command to list all virtual-system host names. v The system name is not locale specific. -s | --subjoin option_row_parameters Adds an option row to a parameter table. You must declare all parameters (CLI attributes) of an option. Tip: Use the lsvrtcap -c mkvs command to list parameter tables and the cli attributes that are available to add as option rows. -v | --verbose Writes verbose messages to standard output. If this option is not specified, this command suppresses noncritical messages.

Exit status
The following table contains the codes returned by this command. v 0: The operation completed successfully.
Chapter 1. smcli

489

v v v v v v v

1: A usage error occurred. 25: A number-formatting error occurred. 27: A specified attribute is not valid. 29: The specified locale is not valid or not supported. 100: An error occurred while retrieving targeted systems. 101: A targeted system was not found. 106: An error occurred while creating the virtual server.

Examples
Create a virtual server This example illustrates how to create a virtual server named vs_1 on a Linux system named system1. The lsvrtcap command is run with the -g option to determine the list of guest operating systems supported on system1. The guest operating system 11 (Linux) is chosen, and the lsvrtcap command is invoked with the -A option to determine the attributes that can be specified when creating a virtual server for this guest operating system on system1. The mkvs command is invoked to create a virtual server named vs_1 with one processor, 256-MB memory, 3-GB disk space, and a network label called VM Network on the virtual-server host system1.
smcli lsvrtcap -c mkvs -g -n system1 smcli lsvrtcap -c mkvs -A 11 -n system1 smcli mkvs -A "name=vs_1, gos=11, cpu=1, memsize=256, diskvolumelabel[label1]=disksize:3, net=VM Network" system1

490

IBM Systems Director Commands Reference

Chapter 2. Management server and agent commands


Use the commands in this section to perform tasks on the management server and agents, including starting and stopping IBM Systems Director processes, configuring the database, configuring security, managing Common Information Model (CIM) subscriptions, and more. Tips: v These commands do not run in the smcli interface. v Not all commands are supported on all operating systems.

cfgdbcmd command
Use the cfgdbcmd command to configure and initialize the connection from the IBM Systems Director management server running AIX, Linux, or Windows to a local or remote database.

Syntax
and
Linux

cfgdbcmd.sh -usage cfgdbcmd.sh [-dbAdmin user_ID] [-dbAdminPW password] [-dbLocal {true | false}] [-noPrompt {true | false}] {-rspfile response_file}
Windows

cfgdbcmd.cmd -usage cfgdbcmd.cmd [-dbAdmin user_ID] [-dbAdminPW password] [-dbLocal {true | false}] [-noPrompt {true | false}] {-rspfile response_file}

Description
Important: After using this command to change the database connection and before starting IBM Systems Director Server, you must run the smreset command in order to reset IBM Systems Director. All master data and database data will be lost, and existing data is not migrated. Prerequisite: v You must close all application that use the datacenter model (DCM) before running this command. v If you are configuring a database on a management server running AIX, the Bash shell must be installed. Note: This prerequisite does not apply to IBM Systems Director version 6.1.2. You can run the cfgdbcmd command locally from the management server or remotely by accessing the management server using a remote-access utility such as

Copyright IBM Corp. 1999, 2009

491

Secure Shell (SSH) or Telnet.Always use credentials with administrator rights on the management server, or the cfgdbcmd tool might not complete successfully. To run the cfgdbcmd command, navigate to the install_root\bin directory, where install_root is the root directory of your IBM Systems Director installation. Note that this path uses the backslash (\) to delimit the directory; depending on the system that you are using, you might be required to enter the path using the forward slash (/). When configuring a new Apache Derby or Microsoft SQL Server connection, you do not need to create a database instance before configuration. This command creates the database instance using the name specified in the database configuration response file. When configuring a new IBM DB2 Universal Database or Oracle Database connection, you must prepare the database yourself beforehand. To configure a database connection for the first time, you must specify the -dbAdmin and -dbAdminPW options. When reconfiguring the same database connection, you do not have to specify those options. Note: The -dbAdmin and -dbAdminPW values are only used for the duration of the command. IBM Systems Director does not store (cache) these values on the file system. Tip: The option keywords are case sensitive. If you are using Oracle Database for the system management database, you might want to adjust the setting for the maximum number of open cursors or change the number of cached prepared statements. By default, IBM Systems Director caches prepared statements that typically open a cursor with the database. The number of open cursors can grow to exceed the maximum defined for the database, resulting in a ORA-00604 error from Oracle Database. To prevent this error, increase the Oracle Database OPEN_CURSORS property or change the IBM Systems Director statement cache size in /lwi/conf/overrides/database.properties file. It is recommended that you specify an OPEN_CURSORS value that is 25% larger than the maximum number of statements that IBM Systems Director will cache. You can calculate this value by taking the sum of the products of the maxActive and maxOpenPreparedStatement properties for each definition in the database.properties file. The following examples illustrates how to calculate the OPEN_CURSORS value. To change the OPEN_CURSORS property, either update the Oracle Database init.ora file or use the ALTER SYSTEM command to update the SPFILE (system parameter file).
================================= rcs.maxActive = 3 rcs.maxOpenPreparedStatements = 1000 usmi.maxActive = 3 usmi.maxOpenPreparedStatements = 200 ================================= OPEN_CURSORS setting = ((3*100) + (3*200)) * 1.25

Important: For all changes to take effect, you must restart the Oracle Database Server after changing the init.ora file, and you must restart IBM Systems Director Server after changing the database.properties file.

492

IBM Systems Director Commands Reference

Flags
-dbAdmin user_ID Specifies the user ID for the database system administrator to use for the database configuration. Tip: v This option is required when switching to a different database, creating a new database, or configuring a database for the first time. v This option is optional when reinitializing a database that has been created and configured. -dbAdminPW password Specifies the user password for the database system-administrator user. Tip: v This option is required when switching to a different database, creating a new database, or configuring a database for the first time. v This option is optional when reinitializing a database that has been created and configured. -dbLocal {true | false} Specifies whether the database server is local. Possible values are: v true: The database server is local. That is, the database server is on same system as IBM Systems Director Server. This value is the default. v false: The database server is remote. That is, the database server is on a different system than the IBM Systems Director Server. Tip: This parameter is required if you want to connect to a remote database server. -noPrompt {true | false} Specifies whether the this command prompts you before continuing. Possible values are: v true: The command continues without prompting. v false: The command prompts you to ensure that is IBM Systems Director Server stopped no other applications are using the database. This value is the default if this option is not specified. -rspfile "response_file" Specifies the fully-qualified path of the response file that contains the database-configuration information. IBM Systems Director provides a default response file named cfgdbcmd.rsp, located in the install_root\proddata directory, where install_root is the root directory of your IBM Systems Director installation. Note that this path uses the backslash (\) to delimit the directory; depending on the system that you are using, you might be required to enter the path using the forward slash (/). When IBM Systems Director Server is installed, a response file is created based on the default in the install_root directory. Important: v (Windows only) You must enclose the fully-qualified response-file path in quotations. v Ensure that the response file is correctly configured before running this command. See Configuring the database application after IBM Systems Director installation for details.
Chapter 2. Management server and agent commands

493

v Before running the cfgdbcmd command, encrypt the password in the response file. The script that you use varies depending on which operating system you are using. See Encrypting passwords for database configuration for details. -usage Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples.

Exit status
The following table contains the codes returned by this command. v 0: The command completed successfully. v 1: An error occurred. For more information, view the install_root\tpm\config\ logs\init.log file, where install_root is the root directory of your IBM Systems Director installation. Note that this path uses the backslash (\) to delimit the directory; depending on the system that you are using, you might be required to enter the path using the forward slash (/).

Examples
1. Configure or switch to the Apache Derby database for the first time This example illustrates how to configure or switch to the Apache Derby database for the first time using the data stored in the response file cfgdbcmd.rsp and the default Apache Derby administrator ID and password. This example is run from a management server that is running Windows.
cfgdbcmd.cmd -rspfile "C:\Program Files\IBM\Director\proddata\cfgdbcmd.rsp" -dbAdmin tioadmin -dbAdminPW think4me

2. Configure a remote database other than Apache Derby for the first time or switching to a remote database other than Apache Derby This example illustrates how to configure a remote database other than Apache Derby for the first time or switch to a database other than Apache Derby using the data stored in the response file cfgdbcmd.rsp and the database system administrator ID and password. This example is run from a management server that is running Windows.
cfgdbcmd.cmd -rspfile "C:\Program Files\IBM\Director\proddata\cfgdbcmd.rsp" -dbAdmin admin -dbAdminPW passw0rd -dbLocal false

3. Reinitialize a database that has been created and previously configured This example illustrates how to recreate the database tables and repopulate default data in a database that you already created and configured using the response file cfgdbcmd.rsp. This example is run from a management server that is running Windows. Note: You can also use the smreset command to reinitialize the database.
cfgdbcmd.sh -rspfile "C:\Program Files\IBM\Director\proddata\cfgdbcmd.rsp"

4. Configure or switch to a local IBM DB2 Universal Database with Windows authentication for the first time This example illustrates how to configure or switch to the IBM DB2 Universal Database for the first time using the data stored in the response file cfgdbcmd.rsp and the default Apache Derby administrator ID and password. This example is run from a management server that is running Windows.
cfgdbcmd.cmd -rspfile "C:\Program Files\IBM\Director\proddata\cfgdbcmd.rsp" -dbAdmin db2inst1 -dbAdminPW think4me -dbLocal true

494

IBM Systems Director Commands Reference

5. Configure or switch to a local Microsoft SQL Server 2005 database with Windows authentication for the first time This example illustrates how to configure or switch to the Microsoft SQL Server 2005 database for the first time using the data stored in the response file cfgdbcmd.rsp and database administrator ID and password set to a Windows ID and password with administrator access. This example is run from a management server that is running Windows.
cfgdbcmd.cmd -rspfile "C:\Program Files\IBM\Director\proddata\cfgdbcmd.rsp" -dbAdmin <Windows ID with Administrator access> -dbAdminPW <Windows password with Administrator access>

changePassword command
Use the changePassword command to change the password for the tioadmin or tiodb user ID in IBM Systems Director.

Syntax
changePassword.sh {tioadmin | tiodb} new_password

Description
Important: v The changePassword command changes the password that is stored in IBM Systems Director for only the tioadmin user account or tiodb database account. The passwords of other user IDs must be changed separately. v You must restart IBM Systems Director for changes to take effect.

Flags
tioadmin Changes the password for the user account that you used to install IBM Systems Director. When the password changes, use this command to update IBM Systems Director with the new password for the user account. tiodb Changes the password for the database account that IBM Systems Director uses to access remote databases. When the password changes, use this command to update IBM Systems Director with the new password for the database account. new_password Sets the password that is stored in IBM Systems Director for the account to the specified password.

cimsubscribe command
Use the cimsubscribe command on systems running Windows or Linux to manage CIM subscriptions for Common Agent.

Syntax
cimsubscribe {-h | -?} cimsubscribe -b batch_filename

Chapter 2. Management server and agent commands

495

cimsubscribe -cf -fn filter_name -q query [-s {[no] | yes {{-u user_name -p password} | {-c certificate_file -k key_file}}}] [-n namespace] [-l location] cimsubscribe -ch -hn handler_name -d destination [-s {[no] | yes {{-u user_name -p password} | {-c certificate_file -k key_file}}}] [-n namespace] [-l location] cimsubscribe -cs -fn filter_name -hn handler_name [-s {[no] | yes {{-u user_name -p password} | {-c certificate_file -k key_file}}}] [-n namespace] [-l location] cimsubscribe -df -fn filter_name [-s {[no] | yes {{-u user_name -p password} | {-c certificate_file -k key_file}}}] [-n namespace] [-l location] cimsubscribe -dh -hn handler_name [-s {[no] | yes {{-u user_name -p password} | {-c certificate_file -k key_file}}}] [-n namespace] [-l location] cimsubscribe -ds -fn filter_name -hn handler_name [-s {[no] | yes {{-u user_name -p password} | {-c certificate_file -k key_file}}}] [-n namespace] [-l location] cimsubscribe -i cimsubscribe -lf cimsubscribe -lh cimsubscribe -ls

Description
The cimsubscribe command resides in the following location, depending on your operating system: v Linux: install_root/bin v Windows: install_root\cimom\bin where install_root is the root directory of your IBM Systems Director installation. You can use this command during installation to set up the default local subscriptions. You can run this command either in interactive mode or in silent mode, which allows you to include it in scripts. You can use this command to connect to a local or remote CIMOM. The command includes options for authentication. You can also use other clients for managing CIM subscriptions (for example, cimcli or wbemtest).

496

IBM Systems Director Commands Reference

Flags
-b batch_filename Reads the specified batch file and performs a sequence of operations using the command options in the batch file. Tip: The specified batch file must be a text file with one or more lines, each of which specifies options for this command. -cf | -createfilter Creates a new CIM-indication filter. -fn | -filtername filter_name Targets the specified CIM-indication filter. -q | -query query Specifies a Windows Management Instrumentation Query Language (WQL) query used to filter CIM-indication instances. -ch | -createhandler Creates a new CIM-indication handler. -hn | -handlername handler_name Targets the specified CIM-indication handler. -d | -destination destination Specifies a destination uniform resource locator (URL) used to identify an end consumer location (for example, http://localhost:6988/CIMListener/Log). Tip: The port number specified by destination should be appropriate for the specified communications protocol. -cs | -createsubscription Creates a new CIM_IndicationSubscription. Tip: On Linux systems, the CIMOM verifies that the specified handler and filter exist. -df | -deletefilter Deletes the specified CIM-indication filter if the specified filter exists and is not being used by an existing CIM-indication subscription. -dh | -deletehandler Deletes the specified CIM-indication handler if the specified handler exists and is not being used by an existing CIM-indication subscription. -ds | -deletesubscription Deletes the specified CIM-indication subscription if the specified subscription exists. -h | -? Displays command-line help information about this command. -i Performs the command in interactive mode. You will be prompted for values that are not specified on the command line. Tip: When you are deleting handlers, filters, or subscriptions in interactive mode, all objects (handlers, filters, or subscriptions) are displayed in a ordered list. Because this list can be long, it might be necessary to increase the buffer size so that you can scroll through the list to identify the number of the object to delete.

Chapter 2. Management server and agent commands

497

-lf | -listfilters Lists the current set of CIM-indication filters. -lh | -listhandlers Lists the current set of CIM-indication handlers. -ls | -listsubscriptions Lists the current set of CIM-indication subscriptions. -s | -secure {yes | [no]} Specifies whether the HTTP or HTTPS protocol is used for communications. When followed by yes, this command connects securely to port 5989 (HTTPS). If this parameter is omitted or followed by no, the command connects using port 5988 (HTTP). Tip: HTTPS communications might decrease performance because of increased processing. The port number specified by destination should be appropriate to the selected communications protocol. -u | -username user_name Specifies a user name to use when authenticating with the management server. -p | -password password Specifies a password to use when authenticating with the management server. -c | -certificate certificate_file Specifies the full system path to the client x509 certificate, for example, c:\test\client.cert. This parameter us valid only when the command is using secure communications through HTTPS. -k | -key key_file Specifies the full system path to the client private key file (for example, c:\test\client.key). Tip: This parameter is valid only when the command is using secure communications through HTTPS. -n | -namespace namespace Specifies a namespace. If you do not specify a namespace, the default value is root/ibmsd. -l | -location host_name:port Specifies the fully-qualified host name and port of the system on which subscriptions are to be modified (for example, remotehost.raleigh.ibm.com:5988). Tips: v If you do not specify a host name, the default value is localhost:5988. v If you are creating a remote filter, handler, or subscription, you must specify a fully-qualified host name. v If the destination is not the local host, you must also specify the -u | -username and -p | -password options. v There is no default Web Based Enterprise Management (WBEM) port for indications. The ports 5992 - 5998 are not reserved, so any of these ports is a good candidate for a default port. Although the system administrator can change the listener port, it is not recommended.

Examples
1. Connect to a remote host over HTTP

498

IBM Systems Director Commands Reference

This example illustrates how to create a handler named SNMP on listener 9.44.169.107 and port 5988 (HTTP). The destination for the handler is http://localhost:6988/CIMListener/SnmpConsumer.
cimsubscribe -ch -hn "SNMP" -d "http://localhost:6988/CIMListener/SnmpConsumer" -l 9.44.169.107:5988 -u user1 -p passw0rd

2. Connect to a remote host over HTTPS using a client certificate and key This example illustrates how to create a handler named SNMP on listener 9.44.169.107 and port 5989 (HTTPS). A client certificate client.cert and key client.key is used for authentication.
cimsubscribe -ch -hn "SNMP" -d "http://localhost:6988/CIMListener/SnmpConsumer" -l 9.44.169.107:5989 -s yes -c client.cert -k client.key

3. Create a filter This example illustrates how to create a filter named Sev2 on the default listener.
cimsubscribe -cf -fn Sev2 -q "SELECT * FROM IBM_AlertIndication where Severity = 2"

4. Create a handler for another namespace This example illustrates how to create a handler named SNMP for a namespace (root/cimv2) other than the default namespace.
cimsubscribe -ch -hn "SNMP" -d "http://localhost:6988/CIMListener/SnmpConsumer" -n root/cimv2

5. Create a handler using batch processing This example illustrates how to use a batch file named defaultHandlers.dat for processing.
cimsubscribe -b defaultHandlers.dat

The batch file contains the following lines:


-ch -ch -ch -ch -ch -ch -hn -hn -hn -hn -hn -hn "SNMP" "TEC" "Log" "Health" "SMS" "PopUp" -d -d -d -d -d -d "http://localhost:6988/CIMListener/SnmpConsumer" "http://localhost:6988/CIMListener/TivoliConsumer" "http://localhost:6988/CIMListener/LogConsumer" "http://localhost:6988/CIMListener/HealthConsumer" "http://localhost:6988/CIMListener/SMSConsumer" "http://localhost:6988/CIMListener/PopupConsumer"

6. Create a filter using interactive processing The following example creates a new filter using interactive processing. Note: v The interactive command does not explicitly indicate that the new filter was created, but displays the query criteria for the filter again. v After the filter is created, the interactive session prompts for a new action.
C:\Program Files\IBM\Director\cimom\bin>cimsubscribe -i What system would you like to connect to? 1. localhost 2. remote host 1 What port would you like to connect to? 1. 5988 (HTTP) 2. 5989 (HTTPS) 3. Another port 1 Enter the namespace. root/ibmsd Do you want a secure connection? 1. Yes 2. No 2 Connecting to localhost:5988... Interactive mode
Chapter 2. Management server and agent commands

499

What would you like to do? 1. Create a filter 2. Create a handler 3. Create a subscription (bind an existing filter and handler) 4. Delete an existing filter 5. Delete an existing handler 6. Delete an existing subscription 7. Exit 1 What is the name of this filter? new_filter What is the WQL query for this filter? SELECT * from IBMPSG_ProcessorPFEvent where PerceivedSeverity = 2 Name new_filter Query SELECT * from IBMPSG_ProcessorPFEvent where PerceivedSeverity = 2 What would you like to do? 1. Create a filter 2. Create a handler 3. Create a subscription (bind an existing filter and handler) 4. Delete an existing filter 5. Delete an existing handler 6. Delete an existing subscription 7. Exit 7

configAgtMgr command
Use the configAgtMgr script on management servers running AIX or Linux to configure the agent manager after installing IBM Systems Director Server. Note: Agent manager configuration on Windows is performed by the installation process and cannot be started manually with the configAgtMgr script.

Syntax
and configAgtMgr.sh
Linux

Description
Prerequisite: You can run this command only when all of the following criteria are met: v You have installed IBM Systems Director Server on a management server running either AIX or Linux. v You have not started IBM Systems Director processes on the management servers by running the smstart command. To run the configAgtMgr command, navigate to the install_root/bin directory on the management server, where install_root is the root directory of your IBM Systems Director installation. The configAgtMgr command issues the following prompts for information:

500

IBM Systems Director Commands Reference

Enter the Resource Manager user ID that you would like to set for your Agent Manager If you want to register with an existing agent manager, enter the same resource manager user ID as that of the agent manager. If you want to create a new agent manager, enter in any user ID that will then be defined as the resource manager user ID for that new agent manager. The user ID does not need to be an operating system user ID. Note: The resource manager user ID is an identifier that is used by IBM Systems Director or other resource managers to communicate with the agent manager; it is not a user ID on the operating system or an LDAP server. Enter the Resource Manager password to set for your Agent Manager If you want to register with an existing agent manager, enter the same resource manager password as that of the agent manager. If you want to create a new agent manager, enter in any password that will then be defined as the resource manager password for that new agent manager. Verify the Resource Manager password to set for your Agent Manager Reenter the password you entered for Enter the Resource Manager password to set for your Agent Manager. Enter the Agent Registration password to set for your Agent Manager If you want to register with an existing agent manager, enter the same agent registration password as that of the agent manager. If you want to create a new agent manager, enter in any password that will then be defined as the agent registration password for that new agent manager. Verify the Agent Registration password to set for your Agent Manager Reenter the password you entered for Enter the Agent Registration password to set for your Agent Manager. Would you like to use an existing Agent Manager (yes or no)? If you answer yes, ensure that the user ID and passwords that you previously entered match the user ID and passwords of the existing agent manager. If you answer no, you are done and the configuration will start. Enter the IP address for the existing Agent Manager If you answered yes to Would you like to use an existing Agent Manager (yes or no)?, you must provide the IP address of the existing agent manager. Enter the port number for the existing Agent Manager If you answered yes to Would you like to use an existing Agent Manager (yes or no)?, you must provide the port number of the existing agent manager. The port number must be a valid number between 0 and 65535. After you have provided all the requested information, the agent manager configuration script runs and displays a series of status messages.

Operands
None

Flags
None
Chapter 2. Management server and agent commands

501

Exit status
The following table contains the codes returned by this command. v 0: The command completed successfully. v 1: An error occurred. For more information, view the /opt/ibm/director/log/ usmi-cas-setup.log file.

Examples
Configure the agent manager for a new installation of IBM Systems Director on AIX or Linux This example illustrates how to start the agent manager configuration script on AIX or Linux.
. /opt/ibm/director/bin/configAgtMgr.sh

dirinstall.server command
Use the dirinstall.server command to install IBM Systems Director on a management server running AIX or Linux.

Syntax
dirinstall.server [-r response_file]

Description
Important: v Installation of IBM Systems Director installs IBM Systems Director Server, Common Agent, and Platform Agent all together. Therefore, it is not necessary to separately install Common Agent or Platform Agent on the management server after installing IBM Systems Director Server. However, after installing IBM Systems Director Server 6.1, an additional separate step is required to update to the latest releases of Common Agent or Platform Agent. In most cases, any IBM Systems Director tasks requiring Common Agent or Platform Agent will be performed for systems with IBM Systems Director Server installed. v Before installing IBM Systems Director Server on a system that has IBM Storage Configuration Manager installed, you must first uninstall IBM Storage Configuration Manager. After installing IBM Systems Director Server, you can re-install IBM Storage Configuration Manager on a different system. v IBM Systems Director Server is not supported to run on a system with workload partitions (WPARs) enabled. v You can configure IBM Systems Director for use with your database application at any point after the installation of IBM Systems Director Server, but you must not start the management server until it is completed. Starting the management server before configuring IBM Systems Director to use a database application might result in a loss of function.

Flags
-r response_file Specifies the fully-qualified path of the server response file that contains the customized installation information. IBM Systems Director provides a default response file named dirserver.rsp, which is available in the same directory as the dirinstall.server command.

502

IBM Systems Director Commands Reference

Important: It is recommended that you create and edit a local copy of the response file and not modify the default response file. You can specify the following information in the server response file: v Log options v Port numbers for the IBM Systems Director Web interface v Whether to enable or disable the nonstop service, which keeps the server continuously running v Whether to install Common Agent in managed mode v Location of the RPM files v IBM Systems Director plug-ins and features to install v Nondefault database to use with IBM Systems Director Tip: In the response file, 1 indicates that an item is to be installed and 0 indicates that an item is not to be installed.

Exit status
The following table contains the codes returned by this command. v 0: The command completed successfully. v non-zero: An error occurred.

Examples
1. Install using a default values This example illustrates how to install IBM Systems Director Server using the default settings.
dirinstall.server

2. Install using a customized response file This example illustrates how to install IBM Systems Director Server using a customized response file.
dirinstall.server -r /temp/response.rsp

getfru command
FRU (field replaceable unit) functionality was removed from the IBM Systems Director 6.x server and agents. Therefore, the getfru command, which retrieves FRU information from a systemrunning Platform Agent, is no longer supported.

smexport command
Use the smexport command to export IBM Director persistent data for migration to IBM Systems Director.

Syntax
smexport [-L language] [-e {all | cred } [-p password] ] [-d directory] [-v | --verbose] {-a } [-h | --help | -?]

Chapter 2. Management server and agent commands

503

Description
Prerequisite: Before running this command, install it on a management server running IBM Director 5.20. The smexport command is not installed as part of IBM Director 5.20. See Obtaining and installing the IBM Systems Director Migration Tool. You can run the smexport command locally from the management server or remotely by accessing the management server using a remote-access utility, such as Secure Shell (SSH) or Telnet. To run the smexport command, navigate to the tool-installation-location/bin directory and type the smexport command, where tool-installation-location is the directory where you installed the IBM Systems Director Migration Tool. The smexport command runs on the IBM Director 5.20 management server, and creates migration data files in a directory accessible to the IBM Director 5.20 management server. The migration data files are then copied (manually) to a directory that is accessible to the IBM Systems Director 6.1 management server, and the smimport command imports the migration data to the IBM Systems Director 6.1 system. The default directory used by the IBM Systems Director Migration Tool for importing and exporting data is named: tool-installation-location\migration, where tool-installation-location is the directory where the IBM Systems Director Migration Tool is installed. The smexport command provides notification if it detects data that resides on the IBM Director 5.20 system but cannot be migrated to IBM Systems Director 6.1 because there is no equivalent, or the function is not implemented in IBM Systems Director 6.1. The smexport command produces log files and error messages, so that you can determine which pieces of data are being migrated, the progress of the migration, and its success or failure. If the smexport command is run more than once on the same IBM Director 5.20 system, multiple export directories will be created, and each is given a unique name with an incremental number.

Operands
None

Flags
-a | --all Selects all supported objects for migration. -d | --dir directory Sets the directory for the migration data. -e | --encrypt {all | cred} Specifies what information should be encrypted: all cred Everything is encrypted. Credential information is encrypted. This is the default.

504

IBM Systems Director Commands Reference

-h | --help | -? Displays command-line help information about this command. If other options are present, all but the -L option are ignored. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -p | --password password Set the password used for encryption. A default password will be used if encryption is selected and no password is specified. Attention: Using this option presents a potential security risk. The password might be recorded in the shell or other operating-system areas. -v | --verbose Adds verbose messages to the log file.

Examples
This example illustrates how to export all supported objects for migration.
smexport -a

smimport command
Use the smimport command to import IBM Director persistent data for migration to IBM Systems Director.

Syntax
smimport [-L language] [-e {all | cred} [-p password] ] [-d directory] [-v | --verbose] {-a } [-h | --help | -?]

Chapter 2. Management server and agent commands

505

Description
Prerequisite: Before running this command, install it on a management server running IBM Systems Director 6.1. The smimport command is not installed as part of IBM Systems Director 6.1. See Obtaining and installing the IBM Systems Director Migration Tool. You can run the smimport command locally from the management server or remotely by accessing the management server using a remote-access utility, such as Secure Shell (SSH) or Telnet. To run the smimport command, navigate to the tool-installation-location/bin directory and type the smimport command, where tool-installation-location is the directory where you installed the IBM Systems Director Migration Tool. The smexport command runs on the IBM Director 5.20 management server, and creates migration data files in a directory accessible to the IBM Director 5.20 management server. The migration data files are then copied (manually) to a directory that is accessible to the IBM Systems Director 6.1 management server, and the smimport command imports the migration data to the IBM Systems Director 6.1 system. Note: Before running the smimport command on Linux, you must configure the Agent manager by running the director/bin/configAgtMgr.sh script. The default directory used by the IBM Systems Director Migration Tool for importing and exporting data is named: tool-installation-location\migration, where tool-installation-location is the directory where the IBM Systems Director Migration Tool is installed. The smimport command produces log files and error messages, so that you can determine which pieces of data are being migrated, the progress of the migration, and its success or failure. As part of smimport processing, after creating the Managed End Point object framework, for some managed objects a light discovery process is performed. This means that until the smimport is completed, the Inventory details for some objects will be only partially populated. When the smimport command completes, an automatic restart of the IBM Systems Director 6.1 management server is performed. Some of the migration tasks can be run during this restart. If the smimport command fails, it will be necessary to run the smreset command in order to recover.

Operands
None

Flags
-a | --all Selects all supported objects for migration. -d | --dir directory Sets the directory for the migration data.

506

IBM Systems Director Commands Reference

-e | --encrypt {all | cred} Specifies what information should be encrypted: all cred Everything is encrypted. Credential information is encrypted. This is the default.

-h | --help | -? Displays command-line help information about this command. If other options are present, all but the -L option are ignored. -L | --lang language Specifies the language to use for the command. The following languages are supported: v de: German v en: English v es: Spanish v fr: French v it: Italian v ja: Japanese v ko: Korean v pt_BR: Brazilian Portuguese v zh_CN: Simplified Chinese v zh_TW: Traditional Chinese Tips: v This option overrides other mechanisms for specifying the locale, including the environment variable DIR_LANG and operating-system settings. v If you specify the language using the format language_country, where language is a supported language but country is a not a supported country code for that language (for example, en_US), then the specified language is used (for example, in this case en would be used). An error will not be displayed. v If you specify a language that is not supported, irrespective of country code, the default language is used and an error message will be displayed. -p | --password password Set the password used for encryption. A default password will be used if encryption is selected and no password is specified. Attention: Using this option presents a potential security risk. The password might be recorded in the shell or other operating-system areas. -v | --verbose Adds verbose messages to the log file.

Examples
This example illustrates how to import all supported objects for migration.
smimport -a

smreset command
Use the smreset command to return IBM Systems Director Server to its installation default values. This command must be run when you change to a new database (for example, when upgrading from the default Apache Derby database to an enterprise database such as IBM DB2 Universal Database).
Chapter 2. Management server and agent commands

507

Syntax
smreset -l

Description
Important: The smreset command changes the configuration of IBM Systems Director Server and can be undone only by manually reconfiguring IBM Systems Director Server or by restoring a backup image. The smreset command reinitializes the databases and clears all persistent data. It deletes local data on the file system where IBM Systems Director is installed as well as deletes and rebuilds all database tables that are used by IBM Systems Director. The smreset command does not delete or reset agent manager information. The deleted data incudes: v Discovered resource data (except for 6.x Common Agents that were previously accessed) v Inventory data v Event data (event log, custom event filters, custom event actions, custom event plans) v Monitoring data v Updates data v Status data v Configuration templates v Security configurations v All other data associated with running and configuring IBM Systems Director after installation Note: After the smreset command is run, all 6.x Common Agents that were previously accessed will automatically repopulate within 15 minutes after restarting IBM Systems Director Server.

Operands
None

Flags
-l Writes verbose messages and non-zero exit statuses to standard output.

Exit status
v 0: The command completed successfully. v 1: An error occurred. For more information, view the install_root\tpm\config\ logs\init.log file, where install_root is the root directory of your IBM Systems Director installation. Note that this path uses the backslash (\) to delimit the directory; depending on the system that you are using, you might be required to enter the path using the forward slash (/).

Examples
Reset the IBM Systems Director Server configuration This example illustrates how to reinitialize the databases and clears all persistent data on the management server.
smreset

508

IBM Systems Director Commands Reference

smrestore command
Use the smrestore command to restore the IBM Systems Director persistent data ( including file-system (master) data and databases) from a backup image.

Syntax
smrestore -usage smrestore [-dbUserName user_name] [-dbUserPwd password] {-sourceDir directory} {-dbSourceDir directory } {-timestamp timestamp} [-noPrompt {true | false}]

Description
Prerequisite: v Before you run this command, stop all IBM Systems Director processes that are running on the management server and using the datacenter model (DCM). v If you are configuring a database on a management server running AIX, the Bash shell must be installed. Note: This prerequisite does not apply to IBM Systems Director version 6.1.2. You can run the smrestore command locally from the management server or remotely by accessing the management server using a remote-access utility, such as Secure Shell (SSH) or Telnet. To run the smrestore command, navigate to the install_root\bin directory, where install_root is the root directory of your IBM Systems Director installation. Note that this path uses the backslash (\) to delimit the directory; depending on the system that you are using, you might be required to enter the path using the forward slash (/). Tips: v This command must be run locally from the system on which you want to save data. v You can restore saved persistent data only on a management server running the same operating system, with same version of IBM Systems Director Server or Common Agent from which the data was saved, and with the same database type and version. v You can save a backup image of persistent data using the smsave command.

Operands
None

Flags
-usage Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples.

Chapter 2. Management server and agent commands

509

-dbUserName user_name Specifies the database user name to use for the restoring the database. If you do not specify a user name, this command uses the user name defined in dcm.xml. Tips: v The database user name must have privileges to restore the database. v This option does not apply to Apache Derby. -dbUserPwd password Specifies the password for the database user. If you do not specify a password, this command uses the password defined in dcm.xml. -sourceDir directory Specifies the directory containing the backup image of the master data. This directory could be the same directory specified for the smsave -targetDir if the backup image was not moved. If the backup images was moved, the source directory is the directory that contains the backup timestamp (for example, backup_20080206151358). -dbSourceDir directory Specifies the directory from which the database backup image is to be loaded. Note: If the database is remote, this option is required. This specified directory will be relative to the remote database system. -timestamp timestamp Specifies the timestamp of the backup image to be restored, using the format yyyymmddhhss, where yyyy is the year, mm is the month, dd is the day, hh is the hour, and ss is the seconds (for example, 20080206151358). When the smsave command completes, it displays the timestamp of the backup. The backup image is saved in install_root\backup directory in a subdirectory named backup_timestamp (for example, backup_20080206151358). You can also find the timestamp in the install_root\tpm\config\logs\ backup.log file. Note: This option is required if there is more than one backup image in the source directory. -noPrompt {true | false} Specifies whether the this command prompts you before continuing. Possible values are: v true: The command continues without prompting. v false: The command prompts you to ensure that is IBM Systems Director Server stopped no other applications are using the database. This value is the default if this option is not specified.

Exit status
The following table contains the codes returned by this command. v 0: The command completed successfully. v 1: An error occurred. For more information, view the install_root\tpm\config\ logs\restore.log file, where install_root is the root directory of your IBM Systems Director installation. Note that this path uses the backslash (\) to delimit the directory; depending on the system that you are using, you might be required to enter the path using the forward slash (/).

510

IBM Systems Director Commands Reference

Examples
1. Restore data from default location This examples illustrates how to save the data in the default location install_root/backups.
smrestore -dbUserName Administrator -dbUserPwd secrete -timestamp 20080206151358

2. Restore persistent data This example illustrates how to restore the backup image using the master data stored in the d:\MasterBackups directory on a management server running Windows.
smrestore -dbUserName Administrator -dbUserPwd secret -sourceDir "D:\MasterBackups" -dbSourceDir "d:\dbBackUp"

smsave command
Use the smsave command to save a backup image of IBM Systems Director persistent data, including file-system (master) data and databases.

Syntax
smsave -usage smsave [-dbUserName user_name] [-dbUserPwd password] [-targetDir directory] [-dbTargetDir directory] [-noPrompt {true | false}]

Description
Prerequisite: Before running this command: v Ensure that all steps have been completed to prepare the database. v If you are configuring a database on a management server running AIX, the Bash shell must be installed. Note: This prerequisite does not apply to IBM Systems Director version 6.1.2. v Stop all IBM Systems Director processes that are running on the management server and using the datacenter model (DCM). You can run the smsave command locally from the management server or remotely by accessing the management server using a remote-access utility, such as Secure Shell (SSH) or Telnet. The backup image is saved in the Director\backups\time_stamp directory unless otherwise specified. To run the smsave command, navigate to the install_root\bin directory, where install_root is the root directory of your IBM Systems Director installation. Note that this path uses the backslash (\) to delimit the directory; depending on the system that you are using, you might be required to enter the path using the forward slash (/). This command creates a backup image of IBM Systems Director persistent data. Persistent data includes file-system data (also called master data) and database data. The master data set contains the information about where the database data set is located and uses that stored location when running the restore operation. The database backup image is saved in the format specific to the database type. Backups cannot be moved from one database type and version to another database type or version.
Chapter 2. Management server and agent commands

511

Tips: v You can restore the saved data using the smrestore command. You can only restore data on a management server running the same operating system, with same version of IBM Systems Director Server or Common Agent from which the data was saved, and with the same database type and version. v If the database is remote, the backup image is stored on the database server, and not locally on the management server.

Operands
None

Flags
-usage Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples. -dbUserName user_name Specifies the database user name to use for backing up the database. If you do not specify a user name, this command uses the user name defined in dcm.xml. Tips: v The database user name must have privileges to backup the database. v This option does not apply to Apache Derby. -dbUserPwd password Specifies the password for the database user. If you do not specify a password, this command uses the password defined in dcm.xml. -targetDir directory Specifies the directory in which to save the master backup image. The default directory is install_root\backups , where install_root is the root directory of your IBM Systems Director installation. -dbTargetDir directory Specifies the directory in which to save the database backup. The default directory is install_root\backups\time_stamp , where install_root is the root directory of your IBM Systems Director installation. If the database is remote, you must specify a directory that exists on the remote database server. Tips: v This option is optional if you want to keep both the file backup and database backup in the target directory. v This option is required if the database is remote. The default directory, install_root\backups\time_stamp, does not exist on the remote database server. -noPrompt {true | false} Specifies whether the this command prompts you before continuing. Possible values are: v true: The command continues without prompting. v false: The command prompts you to ensure that is IBM Systems Director Server stopped no other applications are using the database. This value is the default if this option is not specified.

512

IBM Systems Director Commands Reference

Exit status
The following table contains the codes returned by this command. v 0: The command completed successfully. v 1: An error occurred. For more information, view the install_root\tpm\config\ logs\backup.log file, where install_root is the root directory of your IBM Systems Director installation. Note that this path uses the backslash (\) to delimit the directory; depending on the system that you are using, you might be required to enter the path using the forward slash (/).

Examples
1. Save data to the default location This examples illustrates how to save the data in the default location install_root\backups.
smsave -dbUserName Administrator -dbUserPwd secrete

2. Save master data and backup data is different locations This examples illustrates how to save the master data in the d:\MasterBackups directory and the database backup in the d:\DBBackups directory using the user ID Administrator and the password secrete.
smsave -dbUserName Administrator -dbUserPwd secrete -targetDir "D:\MasterBackups" -dbTargetDir "d:\DBBackups"

smstart command
Use the smstart command to start IBM Systems Director processes on management servers running AIX and Linux.

Syntax
smstart

Description
Important: This command starts IBM Systems Director Server processes only on management servers running AIX and Linux. For management servers running on Windows, the IBM Systems Director Server processes start automatically. If the processes have been stopped, you can manually start the processes using the net start dirserver command. To restart a process, first stop the process and then start the process again.

Operands
None

Flags
None

Exit status
v 0: The command completed successfully. v 1: An error occurred.

Chapter 2. Management server and agent commands

513

Examples
1. Start processes on Linux: This example illustrates how to start processes running on a Linux management server.
smstart

2. Start processes on Windows: This example illustrates how to start processes running on a Windows management server.
net start dirserver

smstatus command
Use the smstatus command to return the active state of IBM Systems Director Server on a management server running AIX or Linux.

Syntax
smstatus [-r]

Description
Tips: v This command must be performed on the management server on which the installation of IBM Systems Director Server to be monitored is located. v This command is not support on systems running Windows. On Windows, the active status of IBM Systems Director Server is displayed in the system tray.

Operands
None

Flags
-r Checks the state of IBM Systems Director Server and, when a status change occurs, displays the new status.

Exit status
The following table contains the codes returned by this command. v 0: Active: The process is fully active and ready for work. v 1: Starting: The process is starting but is not yet ready for work. v 2: Ending: The process was requested to end but has not yet ended. v 3: Inactive: The process has ended or was never started. v 4: Error: The process has ended abnormally. v 7: Incorrect parameters: Incorrect parameters were entered.

Examples
1. Display the state of IBM Systems Director Server This example illustrates how to display the current state of an IBM Systems Director Server that is in the process of starting but is not ready for work.
smstatus

2. Display the state of IBM Systems Director Server when the status changes

514

IBM Systems Director Commands Reference

This example illustrates how to display the current state of an IBM Systems Director Server every time the status changes.
smstatus -r

smstop command
Use the smstop command to stop IBM Systems Director Server processes on management servers running AIX and Linux.

Syntax
smstop

Description
Important: This command stops IBM Systems Director Server processes only on management servers running AIX and Linux. To stop IBM Systems Director Server processes on management servers running on Windows, use the net stop dirserver command. To restart a process, first stop the process and then start the process again.

Operands
None

Flags
None

Exit status
v 0: The command completed successfully. v 1: An error occurred.

Examples
1. Stop processes on Linux This examples illustrates how to stop processes running on a Linux management server:
smstop

2. Stop processes on Windows This examples illustrates how to stop processes running on a Windows management server:
net stop dirserver

Supported IBM Director v5.20 commands


The event-action plan commands in this section are compatible with IBM Director version 5.20. The commands listed in the following table are supported in this release for compatibility with IBM Director version 5.20. For information about the v5.20

Chapter 2. Management server and agent commands

515

commands, see the commands reference in the IBM Director v5.20 information center at publib.boulder.ibm.com/infocenter/eserver/v1r2/topic/diricinfo_5.20/ fqm0_r_cli_table_toc.html.
Table 8. Supported IBM Director v5.20 commands IBM Director v5.20 command genevent Description and supported syntax Sends a custom event from a Level-2 managed system to IBM Director Server Syntax: genevent /type:event_type text:event_description /dest:[protocol::server_address | @EventServer] /sev:[UNKNOWN | FATAL | CRITICAL | MINOR | WARNING | HARMLESS] twgreset Returns IBM Director Server to its installation default values Syntax: twgreset [-i] twgrestore Restores the IBM Director persistent data Syntax: twgrestore directory [-t] twgsave Saves the IBM Director persistent data Syntax: twgsave [-s] twgstart Starts IBM Director processes on Linux operating systems Syntax: tgwstart twgstat Returns the active state of IBM Director Server on AIX and Linux operating systems Syntax: tgwstat [-r] twgstop Stops IBM Director processes on Linux operating systems Syntax: twgstop twgend Stops IBM Director processes on IBM i operating systems Syntax: twgend smstop smstop smstatus smstart smsave smrestore smreset Equivalent smcli command genevent

516

IBM Systems Director Commands Reference

Appendix. Discontinued commands


This topic lists commands formerly available through the dircmd and dircli command-line interfaces (CLIs) and commands formerly available from the management server that are no longer available for use. In most cases, equivalent function are implemented through commands in the smcli command-line interface.

Discontinued dircli commands


This topic lists commands formerly available through the dircli command-line interface (CLI) that are no longer available for use. The following table lists dircli commands that are no longer available and provides equivalent smcli commands if they are available.
Table 9. Discontinued dircli commands dircli bundle/command configmgr/lscmcfg Description Retrieves configuration information from BladeCenter configuration profiles or BladeCenter chassis Creates BladeCenter configuration profiles Deletes BladeCenter configuration profiles Lists external-application tasks in the IBM Systems Director Web interface Equivalent smcli syntax smcli lscfgplan

configmgr/mkcmprof configmgr/rmcmprof eal/listcmdextdirs

smcli mkcfgplan smcli rmcfgplan An equivalent command is not available; however, you can perform this task from the IBM Systems Director Web interface by clicking Task Management > External Application Launch. An equivalent command is not available; however, you can perform this task from the IBM Systems Director Web interface by clicking Task Management > External Application Launch.

eal/refreshcmdextdirs

Refreshes the list of external-application tasks in the IBM Systems Director Web interface

mpa/mpcli

An equivalent command is not Starts the IBM Management Processor Command-Line Interface available. Use the mpcli interface (MPCLI) utility, which provides instead. system management functions from a CLI that connects to a service processor Lists available software development An equivalent command is not kit (SDK) and application available. programming interface (API) methods Cancels activation of the specified Remote Deployment Manager task Generates, imports, distributes, or revokes security certificates for Agentless-managed system systems An equivalent command is not available. An equivalent command is not available.

remotelib/lsmethod

scheduler/cancelrdmtaskactivation security/certmgr

Copyright IBM Corp. 1999, 2009

517

Table 9. Discontinued dircli commands (continued) dircli bundle/command ssptcli/chnsaccess Description Equivalent smcli syntax

Changes or removes the user ID and An equivalent command is not password that used to access a available. network storage switch, or lists network storage switches for which a user ID and password are set Changes the Storage Area Network (SAN) configuration of a specified host Changes a network storage path Changes the keyword for the host type identifier on a target storage system Exports XML containing the view of networked storage for the specified host Lists network storage path information in XML format or to update the fabric name in the inventory table Lists (in XML) all the storage subsystems known to the IBM Server Storage Provisioning Tool Lists network-storage volume properties for the specified storage subsystem Creates a network storage path between the specified host and volume Allocates a network storage volume and set the RAID level for later attachment to a host Removes a network storage path from a specified host to one or more volumes, and optionally remove the volume if the deleted path was the last attachment smcli chnshost

ssptcli/chnshost

ssptcli/chnspath ssptcli/chnssys

smcli chnspath smcli chnssys

ssptcli/lsnshost

smcli lsnshost

ssptcli/lsnspath

smcli lsnspath

ssptcli/lsnssys

smcli lsnsvol

ssptcli/lsnsvol

smcli lsnspath

ssptcli/mknspath

smcli mknspath

ssptcli/mknsvol

smcli mknsvol

ssptcli/rmnspath

smcli rmnspath

ssptcli/rmnsvol swd/impuapkg updatemgr/cleanlib

Removes one or more volumes on the smcli rmnsvol specified storage system Imports IBM Systems Director Web interface Update Assistant packages Deletes from the library all updates that are no longer a member of any profiles or that are out-of-date smcli importupd An equivalent command is not available; however, you can perform this task from the IBM Systems Director Web interface.

updatemgr/exportprof

Exports all updates included in a smcli lsgp -F > exportgrp single profile from the library to a specified directory location on the file system Imports System x and BladeCenter updates into the updates library smcli mkgp -f exportgrp

updatemgr/importup

518

IBM Systems Director Commands Reference

Table 9. Discontinued dircli commands (continued) dircli bundle/command user/authusrgp user/chusr user/chusrgp user/lsusr user/lsusergp user/rmusergp Description Authorizes an existing user group to access IBM Director Changes access privileges for a user Changes access privileges for a user group Lists the members of the IBM Director administrator group Lists the user groups Equivalent smcli syntax smcli authusergp smcli chuser smcli chusergp smcli lsuser smcli lsusergp

Removes a user group's authorization smcli lscfgplan to access IBM Director Server

Discontinued dircmd commands


This topic lists commands formerly available through the dircmd command-line interface that are no longer available for use. The following table lists dircmd commands that are no longer available and provides equivalent smcli commands if they are available. Tip: Although the best smcli replacement syntax is listed here, in most cases the behavior and outputs of the equivalent smcli command are not identical to the dircmd command.
Table 10. Discontinued dircmd commands dircmd bundle/command bladecenterchassis/addbcchassis bladecenterchassis/discoverbcchassis bladecenterchassis/listbcchassis bladecenterconfiguration/xmlfile chassis/chassislist chassis/chassissubsystemlist chassis/chassissubsystemtypelist cli/help cli/listbundle event/applyeventactionplan Description Adds a IBM BladeCenter chassis system Discovers IBM BladeCenter chassis systems Lists all IBM BladeCenter chassis systems Equivalent smcli syntax smcli discover smcli discover smcli lssys

Creates a IBM BladeCenter Deployment smcli mkcfgtmpl wizard profile Lists all IBM BladeCenter chassis systems Lists all IBM BladeCenter chassis subsystems Lists all chassis subsystems types Displays help for the specified dircmd command Lists all installed dircmd command bundles Applies an event action (automation) plan to a managed object (system) or group Creates an event action (automation) plan smcli lssys -t "Chassis" smcli lssys -t "Chassis" smcli lssys -t "Chassis" smcli command -help smcli lsbundle smcli evtautopln

event/createeventactionplan

smcli mkevtautopln

Appendix. Discontinued commands

519

Table 10. Discontinued dircmd commands (continued) dircmd bundle/command event/listeventactionplans event/listeventactions event/listevents event/listeventtypes event/listeventfilters monitor/applythreshold monitor/listthreshold mpa/listobjectattributes Description Lists all event action (automation) plans Lists all of the available event actions Lists the contents of the event log Lists all of the event types Lists information about event filters Applies a resource-monitor threshold task to a managed system or group Lists all the resource-monitor threshold tasks Lists information about some of the attributes that can be retrieved for managed objects by the listobjectsbyattribute command Lists attribute values for a specified managed system Lists information about managed objects that match specified attribute criteria Starts the IBM Management Processor Command Line Interface Specifies the user ID and password for communicating with a service processor Creates a Management Processor Assistant interconnect connection to one or more remote service processors using a managed service processor as a gateway Creates a system object on the management server Lists all systems Discovers systems Applies a process-monitor task to a system Creates a process monitor that can be used to generate events for processes on systems Lists the defined process-monitor tasks Cancels activation of the specified job Cancels activation of the specified Remote Deployment Manager task Equivalent smcli syntax smcli lsevtautopln smcli lsevtact smcli evtlog smcli lsevttype smcli lsevtfltr Equivalent function is not available. smcli lsresmonthresh smcli lssys -l

mpa/listobjectattributevalues mpa/listobjectbyattribute

smcli lssys -l smcli lssys -l

mpa/mpcli mpa/setcredentials

Use the mpcli interface. smcli accesssys

mpa/setsysinterconnectconnection

Equivalent function is available from the mpcli interface. See the MPCLI documentation for more information. smcli discover smcli lssys smcli discover smcli runtask smcli mkpmtask

native/addsystem native/listsystems native/startdiscovery procmon/applypmtask procmon/createpmtask

procmon/listpmtask scheduler/canceljobactivation scheduler/cancelrdmtaskactivation scheduler/getjobactivationlog scheduler/getjobstatus scheduler/listjobactivations

smcli lstask smcli rmjobhistory smcli rmjob

Lists the activation log for the specified smcli lsjob job Lists the job status of a specified job Lists all activations of all jobs with the specified job ID smcli lsjob smcli lsjobhistory

520

IBM Systems Director Commands Reference

Table 10. Discontinued dircmd commands (continued) dircmd bundle/command scheduler/listjobactivationsbysystem scheduler/listjobs server/accessobjects server/addtostaticgroup server/createdynamicgroup server/createstaticgroup server/deletegroups server/deleteobjects server/discoverall server/doconstraintdump server/listdynamicgroupcriteria server/listgroupattributes server/listgroupmembers server/listgroups server/listgroupsbyattribute server/listinventoryvalues server/listnoninteractivetasks server/listobjectattributes server/listobjects server/listobjectsbyattribute server/listtaskactivationstatus server/pingobjects server/removefromstaticgroup server/renameobject server/runtask Lists criteria that can be used to create dynamic groups Lists attributes of system groups Lists systems belonging to a specified group Lists system groups Lists system groups that meet the specified criteria Lists the database inventory value for the specified identifiers Lists noninteractive tasks Lists system attributes which can be used as query criteria Lists systems Lists systems that meet the specified criteria smcli lsgp smcli lsgp smcli lsgp smcli lsgp smcli lsgp smcli lsinv smcli lstask smcli lssys smcli lssys smcli lssys Description Equivalent smcli syntax

Lists all job activations for the specified smcli lsjob managed object (systems) Lists scheduled jobs Requests access to systems Adds systems to a static group Creates a dynamic system group Creates a static system group Removes a system group Removes a system Discovers systems smcli lsjob smcli accesssys smcli chgp smcli mkgp smcli mkgp smcli rmgp smcli rmsys smcli discover

Lists the activation and execution status smcli lstask of noninteractive tasks Performs a presence check on the specified systems Removes systems from a static group Renames the specified system smcli pingsys smcli chsys smcli chsys

smcli runtask Starts a noninteractive task Note: The replacement smcli command is also called runtask, but has different command syntax and behaviors. Creates a new SNMP system on the management server Lists all SNMP systems Discovers SNMP systems Adds access to the specified system groups for the user smcli discover smcli lssys -t "SNMP Devices" smcli discover smcli chuser

snmp/addsystem snmp/listsystems snmp/startdiscovery user/addgroupaccess

Appendix. Discontinued commands

521

Table 10. Discontinued dircmd commands (continued) dircmd bundle/command user/addtaskaccess user/listgroups user/listprivilegetokens user/listtasks user/listuserattributes user/listusers user/modifyuserattributes user/removegroupaccess user/removetaskaccess Description Adds access to the specified tasks for the user Lists user groups Lists available privilege tokens Lists available tasks Lists available user attributes Lists authorized IBM Systems Director users Changes specified user attributes for a user Removes system group access for a user Removes task access for a user Equivalent smcli syntax smcli chuser smcli lsusergp smcli lsperm smcli lstask smcli lsuser smcli lsuser smcli chuser smcli chuser smcli chuser

Discontinued management-server and agent commands


This topic lists commands formerly available from the management server that are no longer available for use. The following table lists the management-server commands that are no longer available and provides equivalent commands if they are available.
Table 11. Discontinued management-server commands Command crtauthlist Description Creates an IBM i authorization list that includes all the objects, IFS files, and directories that are required to start either IBM Systems Director Server or Common Agent. Equivalent syntax An equivalent command is not available. IBM Systems Director now supports a Light Weight Infrastructure (LWI) security model.

twgend

Stops IBM Systems Director processes smcli smstop on IBM i operating systems.

522

IBM Systems Director Commands Reference

Notices
This information was developed for products and services offered in the U.S.A. IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service. IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this document does not grant you any license to these patents. You can send license inquiries, in writing, to: IBM Director of Licensing IBM Corporation North Castle Drive Armonk, NY 10504-1785 U.S.A. For license inquiries regarding double-byte (DBCS) information, contact the IBM Intellectual Property Department in your country or send inquiries, in writing, to: IBM World Trade Asia Corporation Licensing 2-31 Roppongi 3-chome, Minato-ku Tokyo 106-0032, Japan The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you. This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice. Any references in this information to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk. IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you.
Copyright IBM Corp. 1999, 2009

523

Licensees of this program who wish to have information about it for the purpose of enabling: (i) the exchange of information between independently created programs and other programs (including this one) and (ii) the mutual use of the information which has been exchanged, should contact: IBM Corporation MW9A/050 5600 Cottle Road San Jose, CA 95193 U.S.A. Such information may be available, subject to appropriate terms and conditions, including in some cases, payment of a fee. The licensed program described in this information and all licensed material available for it are provided by IBM under terms of the IBM Customer Agreement, IBM International Program License Agreement, or any equivalent agreement between us. Any performance data contained herein was determined in a controlled environment. Therefore, the results obtained in other operating environments may vary significantly. Some measurements may have been made on development-level systems and there is no guarantee that these measurements will be the same on generally available systems. Furthermore, some measurements may have been estimated through extrapolation. Actual results may vary. Users of this document should verify the applicable data for their specific environment. Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. All statements regarding IBM's future direction or intent are subject to change or withdrawal without notice, and represent goals and objectives only. This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible, the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental. If you are viewing this information softcopy, the photographs and color illustrations may not appear.

Trademarks
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. These and other IBM trademarked terms are marked on their first occurrence in this information with the appropriate symbol ( or ), indicating US registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law

524

IBM Systems Director Commands Reference

trademarks in other countries. A complete and current list of IBM trademarks is available on the Web at www.ibm.com/legal/copytrade.shtml. Adobe, the Adobe logo, PostScript, and the PostScript logo are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States, and/or other countries. Intel, Intel logo, Intel Inside, Intel Inside logo, Intel Centrino, Intel Centrino logo, Celeron, Intel Xeon, Intel SpeedStep, Itanium, and Pentium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. Java and the Java logo are a trademark of Sun Microsystems, Inc. in the United States, other countries, or both. Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both. Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. UNIX is a registered trademark of The Open Group in the United States and other countries. Other company, product, or service names may be trademarks or service marks of others.

Notices

525

526

IBM Systems Director Commands Reference

Printed in USA

GC30-4170-04

S-ar putea să vă placă și