Sunteți pe pagina 1din 7

Chapter 3.

Using the Command-Line Interface


This section provides information about how to start and end an administrative session with Tivoli Storage Manager. You can start an administrative command-line session from the server console or from an administrative client.

Using the Server Console


Tivoli Storage Manager provides a user ID named SERVER_CONSOLE that allows you to administer the server from the server console after Tivoli Storage Manager is installed. At installation, SERVER_CONSOLE is automatically registered as an administrator and is given system authority. You can use the SERVER_CONSOLE user ID to issue administrative commands. An administrator with system privilege can revoke or grant new privileges to the SERVER_CONSOLE user ID. However, you cannot: Register or update the SERVER_CONSOLE user ID Lock or unlock the SERVER_CONSOLE user ID Rename the SERVER_CONSOLE user ID Remove SERVER_CONSOLE user ID Route commands from the SERVER_CONSOLE user ID

Using the Administrative Command Line Client


The administrative command-line client is a program that runs on a file server, workstation, or mainframe that allows administrators to control and monitor the server through administrative commands. You can start an administrative client session in console, mount, batch, or interactive mode by using the DSMADMC command. In each of these modes, you can specify certain options with commands. For details, see Using Administrative Client Options. You can redirect output to a file using redirection characters. For details, see Redirecting Command Output.

Starting the Administrative Command Line Client


The TSM server must be running before any client can connect. See Quick Start for specific instructions. To start an administrative client session in command line mode, enter this command on your workstation: dsmadmc -id=admin -password=admin Note: Enter the DSMADMC command with your user ID and password by using the -ID and PASSWORD options as shown if you do not want to be prompted for that information.

Stopping the Administrative Command Line Client


End an administrative command line client session by entering this command on your workstation: quit

Console Mode
Use console mode to monitor Tivoli Storage Manager activities as they occur or to capture processing messages to an output file. For example, you can monitor migration processes and clients logging on to Tivoli Storage Manager. You cannot enter any administrative commands in console mode. To start an administrative client session in console mode, enter: dsmadmc -consolemode You are prompted for a password if authentication is turned on for the server. If you do not want to be prompted for your user ID and password, enter the DSMADMC command with the -ID and -PASSWORD options. To have Tivoli Storage Manager redirect all output to a file, specify the -OUTFILE option with a destination file name. For example, enter: dsmadmc -id=sullivan -password=secret -consolemode -outfile=save.out To end an administrative client session in console mode, see Table 4. Table 4. Keyboard Break Sequences Environment UNIX-based clients CMS DOS and OS/2, Windows and Windows NT TSO
(R)

Break Sequence Ctrl+C HX Ctrl+C, Ctrl+Break ATTN

Mount Mode
Use mount mode to monitor removable media mount activities. While the session is running in mount mode, you cannot enter any administrative commands. To start an administrative client session in mount mode, enter: dsmadmc -mountmode You are prompted for a password if authentication is turned on for the server. If you do not want to be prompted for your user ID and password, enter the DSMADMC command with the -ID and -PASSWORD options. To have Tivoli Storage Manager redirect all output to a file, specify the -OUTFILE option with a destination file name. For example, enter: dsmadmc -id=sullivan -password=secret -mountmode -outfile=save.out To end an administrative client session in mount mode, see Table 4.

Batch Mode
Use batch mode to enter a single administrative command. Your administrative client session automatically ends when the command has processed. To start an administrative client session in batch mode, enter: dsmadmc You can enter the DSMADMC command with your user ID and password by using the -ID and PASSWORD options, respectively if you do not want to be prompted for that information. To have Tivoli Storage Manager redirect all output to a file, specify the -OUTFILE option with a destination file name. For example, to issue the QUERY NODE command in batch mode with the output redirected to the SAVE.OUT file, enter: dsmadmc -id=sullivan -password=secret -outfile=save.out query node In batch mode, you must enter the complete command on one line. If a command does not fit on one line, enter the command by using a macro or a script. If you specify a parameter with a string of text using batch mode, enclose the text in single quotation marks (' ') in the macro. Double quotes are not allowed in batch mode.

Interactive Mode
Use the interactive mode to enter a series of administrative commands. You can automatically restart your administrative client session by entering another command each time the Tivoli Storage Manager:servername > prompt appears. To start an administrative client session in interactive mode, a server session must be available. To ensure the availability of server sessions for both administrative and client node sessions, the interactive mode of the administrative client is disconnected if one or more of the following conditions is true: The server was stopped using the HALT command. Commands were not issued from the administrative client session for the length of time specified with the IDLETIMEOUT server option. The administrative client session was canceled with the CANCEL SESSION command.

You can use continuation characters when using interactive mode. For more information, see Using Continuation Characters. To start an administrative session in interactive mode, enter: dsmadmc

Using the Administrative Web Interface


The TSM server must be running before any client can connect. See Quick Start for specific instructions.

Starting the Web Administrative Client


To start the Web interface, enter the URL on a Web browser on your client workstation: http://server_name:1580 server_name Is the IP address (name, dotted name, or dotted number - for example, server1 or 9.115.2.15) of the Tivoli Storage Manager server you want to contact. 1580 Is the value specified in either the server option HTTPTCPPort or HTTPICSPort. The default is 1580.

Stopping the Web Administrative Client


To end a Web administrative client session: Select Log Off from Options. Enter this command at the command line on the Web administrative interface: quit

Using Administrative Client Options


In all administrative client modes, the administrative client options modify your administrative client session responses. The following administrative client options can be specified with the DSMADMC command and are valid from an administrative client session only: -DISPLaymode=LISt or TABle Allows you to force the QUERY output to tabular or list format regardless of the command line window column width. If you want the output to go to a file and you are using the -DISPLaymode option, use redirection to write to the file. Do not use the -OUTfile option. -ID=userid Specifies the administrator's user ID. -PAssword=password Specifies the administrator's password. -NOConfirm Specifies that you do not want Tivoli Storage Manager to request confirmation before processing commands that affect the availability of the server or data managed by the server. -Quiet Specifies that Tivoli Storage Manager does not display standard output messages to your screen. However, when you use this option, certain error messages still appear. -CONsolemode Specifies that Tivoli Storage Manager runs in console mode. All unsolicited server console output is echoed to your screen.

-MOUNTmode Specifies that Tivoli Storage Manager runs in mount mode. All server removable-media mount messages are echoed to your screen. -Itemcommit Specifies that Tivoli Storage Manager commits commands inside a script or a macro as each command is processed. -OUTfile=filename Specifies that output from a server query is redirected to a specified file. In batch mode, output is redirected to a file you specify and the format of the output matches the format of the output on your screen. In interactive, console, or mount mode sessions, output displays on your screen. -OUTfile Specifies that output from a server query is formatted one line per query. This option is available in batch mode only. -COMMAdelimited Specifies that any tabular output from a server query is to be formatted as comma-separated strings rather than in readable format. This option is intended to be used primarily when redirecting the output of an SQL query (SELECT command). The comma-separated value format is a standard data format which can be processed by many common programs, including spreadsheets, data bases, and report generators. -TABdelimited Specifies that any tabular output from a server query is to be formatted as tab-separated strings rather than in readable format. This option is intended to be used primarily when redirecting the output of an SQL query (SELECT command). The tab-separated value format is a standard data format which can be processed by many common programs, including spreadsheets, databases, and report generators. Besides the options listed here, you can also specify any option that is in the client options file. Each option must be preceded with a hyphen and delimited with a space.

Using Continuation Characters


You can use continuation characters in the interactive mode of the administrative client. Continuation characters are useful when you want to process a command that is longer than your screen or window width. Attention: Without continuation characters you can enter up to 256 characters. With continuation characters you can enter up to 1500 characters. In the MACRO command, these maximums are after any substitution variables have been applied. With continuation characters, you can do the following: Enter a dash at the end of the line you want to continue. For example: register admin pease mypasswd -

contact="david, ext1234" Continue a list of values by entering a dash or a back slash, with no preceding blank spaces, after the last comma of the list that you enter on the first line. Then, enter the remaining items in the list on the next line with no preceding blank spaces. For example: stgpools=stg1,stg2,stg3,stg4,stg5,stg6 Continue a string of values enclosed in quotation marks by entering the first part of the string enclosed in quotation marks, followed by a dash or a back slash at the end of the line. Then, enter the remainder of the string on the next line enclosed in the same type of quotation marks. For example: contact="david pease, bldg. 100, room 2b, san jose,""ext. 1234, alternate contact-norm pass,ext 2345" Tivoli Storage Manager concatenates the two strings with no intervening blanks. You must use only this method to continue a quoted string of values across more than one line.

Redirecting Command Output


You can redirect output from any command. However, the most common use for redirecting output is to save the output from query commands. The output from some query commands can be quite lengthy. It may be easier for you to browse the contents of a file or, in some cases, print the contents of the file. Some platforms support redirection of output via special characters like >, >>, and |. You can save the output from a command by entering redirection characters at the end of the command. Redirection characters direct the output of a command to a file or program you specify instead of to your screen. See the examples below. Output is not redirected if you do NOT leave a blank after the > symbol. The following will not redirect the output: SELECT * FROM NODES WHERE CLIENT_VERSION >2 Note: When redirecting output, follow the naming conventions of the operating system running your administrative client. If you want to: Enter this:

dsmadmc -id=xxx -pa=xxx query domain acctg > Redirect the output of a QUERY DOMAIN command to a new file in batch dominfo.acc or interactive mode A single greater-than sign (>) indicates that Tivoli Storage Manager redirects the output to a new file or writes over an existing file. Append the output of a QUERY DOMAIN dsmadmc -id=xxx -pa=xxx query domain acctg >> command to the end of an existing file in dominfo.acc batch or interactive mode Double greater-than signs (>>) indicates that Tivoli Storage Manager appends the output to the end of an existing file.

Redirect all output from an administrative dsmadmc -console -id=admin -password=xxx | filter.exe client session in console mode to a program called filter.exe. The program can be set up to monitor the output for individual messages as they occur and take appropriate action, such as sending mail to another user.

S-ar putea să vă placă și