Sei sulla pagina 1di 12

BMC Server Automation Network Shell Command Reference Manual

Supporting
BMC Server Automation version 8.2.00
February 2012

www.bmc.com

Contacting BMC Software


You can access the BMC Software website at http://www.bmc.com. From this website, you can obtain information about the company, its products, corporate offices, special events, and career opportunities.

United States and Canada


Address BMC SOFTWARE INC 2101 CITYWEST BLVD HOUSTON TX 77042-2827 USA Telephone 1 713 918 8800 or 1 800 841 2031 Fax 1 713 918 8000

Outside United States and Canada


Telephone +01 713 918 8800 Fax +01 713 918 8000

Copyright 2012 BladeLogic, Inc. BMC, BMC Software, and the BMC Software logo are the exclusive properties of BMC Software, Inc., are registered with the U.S. Patent and Trademark Office, and may be registered or pending registration in other countries. All other BMC trademarks, service marks, and logos may be registered or pending registration in the U.S. or in other countries. All other trademarks or registered trademarks are the property of their respective owners. BladeLogic and the BladeLogic logo are the exclusive properties of BladeLogic, Inc. The BladeLogic trademark is registered with the U.S. Patent and Trademark Office, and may be registered or pending registration in other countries. All other BladeLogic trademarks, service marks, and logos may be registered or pending registration in the U.S. or in other countries. All other trademarks or registered trademarks are the property of their respective owners. IBM and AIX are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. Linux is the registered trademark of Linus Torvalds. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. UNIX is the registered trademark of The Open Group in the US and other countries. The information included in this documentation is the proprietary and confidential information of BMC Software, Inc., its affiliates, or licensors. Your use of this information is subject to the terms and conditions of the applicable End User License agreement for the product and to the proprietary and restricted rights notices included in the product documentation.

Restricted rights legend


U.S. Government Restricted Rights to Computer Software. UNPUBLISHED -- RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF THE UNITED STATES. Use, duplication, or disclosure of any data and computer software by the U.S. Government is subject to restrictions, as applicable, set forth in FAR Section 52.227-14, DFARS 252.227-7013, DFARS 252.227-7014, DFARS 252.227-7015, and DFARS 252.227-7025, as amended from time to time. Contractor/Manufacturer is BMC SOFTWARE INC, 2101 CITYWEST BLVD, HOUSTON TX 77042-2827, USA. Any contract notices should be sent to this address.

Customer support
You can obtain technical support by using the BMC Support Central website or by contacting Customer Support by telephone or e-mail. To expedite your inquiry, see Before contacting BMC.

Support website
You can obtain technical support from BMC 24 hours a day, 7 days a week at http://www.bmc.com/support. From this website, you can

read overviews about support services and programs that BMC offers find the most current information about BMC products search a database for issues similar to yours and possible solutions order or download product documentation download products and maintenance report an issue or ask a question subscribe to receive proactive e-mail alerts when new product notices are released find worldwide BMC support center locations and contact information, including e-mail addresses, fax numbers, and telephone numbers

Support by telephone or e-mail


In the United States and Canada, if you need technical support and do not have access to the web, call 1 800 537 1813 or send an e-mail message to customer_support@bmc.com. (In the subject line, enter SupID:<yourSupportContractID>, such as SupID:12345). Outside the United States and Canada, contact your local support center for assistance.

Before contacting BMC


Have the following information available so that Customer Support can begin working on your issue immediately:

product information product name product version (release number) license number and password (trial or permanent)

operating system and environment information machine type operating system type, version, and service pack or other maintenance level such as PUT or PTF system hardware configuration serial numbers related software (database, application, and communication) including type, version, and service pack or maintenance level

sequence of events leading to the issue commands and options that you used messages received (and the time and date that you received them) product error messages messages from the operating system, such as file system full messages from related software

License key and password information


If you have questions about your license key or password, use one of the following methods to get assistance:

Send an e-mail message to customer_support@bmc.com. Use the Customer Support website at http://www.bmc.com/support.

BMC Server Automation Network Shell Command Reference Manual

Introduction
The Network Shell (NSH) commands are file manipulation utilities designed to look and feel like their UNIX counterparts. The difference is that the NSH commands are able to access and manipulate both local and remote files without using NFS/RFS or the .rhost remote authentication mechanisms. Using the NSH commands, you can manage your network of UNIX and Windows machines as one large host. You can perform system administrative functions on multiple remote hosts from a single machine. Instead of having to rlogin or telnet to a host to see what is going is on, or to make a quick change, you can just use the NSH commands to access files on local and remote hosts directly from the command line. You can use the NSH commands to write new scripts, or modify existing scripts and make them distributed. The BMC Server Automation Network Shell Command Reference Manual provides both summarized and complete descriptions of all commands and utilities available in Network Shell. Use this document as follows:

To view summarized descriptions of commands and utilities, see the alphabetized table in Summarized descriptions of commands on page 8. To view complete descriptions of commands and utilities, see Complete descriptions of commands on page 12.

Authenticating with Network Shell


When you use Network Shell in conjunction with a Network Shell Proxy Server, you must first authenticate. Once you successfully authenticate, you are issued a session credential, which grants you access to the proxy server. If you are using Network Shell interactively, you can obtain a session credential using the BMC Server Automation Console or you can use the blcred command line utility.

Introduction

ZSH support

When using the console, open the login dialog as you normally would. Select Options, which displays additional authentication choices. Then select Save Credential for this session. After you select Connect to authenticate, a session credential is cached, even if you exit the console. For more information about using blcred to obtain a session credential, refer to the blcred man page. Alternatively, BMC technical documentation shows some typical scenarios for using blcred at https://docs.bmc.com/docs/display/bsa82/Administering+security. If you are running Network Shell in batch mode, you must use blcred to obtain a session credential. If you are using Network Shell to connect directly to servers without routing traffic through a Network Shell Proxy Server, no authentication is required.

ZSH support
Network Shell supports both 4_0_4 and 4_3_4 versions of ZSH. By default, Network Shell calls the 4_3_4 version of ZSH. If you want to access the older version of ZSH, do the following:

NOTE
HP-UX platforms do not support ZSH 4.3.4. The default ZSH version on HP-UX remains 4.0.4. The following functionality described in the NSH man page only applies to the default zsh 4.3.4 (zsh-4_3_4) based Network Shell executable. When using the older zsh 4.0.4 (zsh) based Network Shell executable, the following behavior will not be present.

The ability to use fully qualified paths to specify execution of native commands when those commands have Network Shell equivalents. The implicit nexec of a native command on a remote host.

1 Cd to <BladeLogic install directory>\bin. By default, this is C:\Program Files\BMC Software\BladeLogic\NSH\bin on Windows and /opt/bmc/bladelogic/NSH/bin on UNIX. 2 Do one of the following:

On UNIX, enter the following commands:


mv nsh nsh-4_3_4 ln s zsh nsh

BMC Server Automation Network Shell Command Reference Manual

Shared memory segments requirements

On Windows, do the following: A. Rename the existing "nsh.exe" executable to "nsh-4_3_4.exe". B. Copy the "zsh.exe" executable to "nsh.exe".

Shared memory segments requirements


On a server where multiple users run Network Shell, assure there is at least N * X shared memory segments available, where N is the number of simultaneous Network Shell login sessions and X is the number of times the chrole command is executed during the Network Shell session lifetime.

Internationalization support
Most of the Network Shell commands support multibyte characters for internationalization (I18N). For a list of NSH commands that support multibyte characters, see Summarized descriptions of commands on page 8 (as indicated in the I18N Support column).

Prerequisites for internationalization


I18N support depends on several locale category (LC_*) environment variables, specifically LC_ALL and LC_CTYPE. Ensure that these environment variables are set properly before starting the Network Shell and the RSCD Agent.

NOTE
The applicability of these environment variables to the Network Shell and the RSCD Agent depends on the operating system where they are installed:

The Network Shell uses these variables, whether hosted on a UNIX operating system or a Windows operating system. The RSCD Agent uses these variables only if installed on a UNIX operating system. On Windows, the RSCD Agent uses the operating systems language settings.

Introduction

Summarized descriptions of commands

Summarized descriptions of commands


The following table provides a brief description of all Network Shell commands and utilities. Commands that have been internationalized to support multibyte characters are indicated in the column on the right.
Network Shell Command agentctl agentinfo awk bl_gen_ssl blcred blexpr blkeylogman bllogman blquery I18N Support NA NA no NA yes yes yes yes yes

Description Controls the functions of an RSCD agent. Provides information about an RSCD agent. Scans files for specified patterns. Creates an X.509 certificate.

Manages authentication profiles, session credentials, and trusted certificates.


Creates and evaluates an expression based on input in the form of arguments. Remotely manages keystroke logfiles on a machine running an RSCD agent. Remotely manages live RSCD agent logfiles. Extends the functionality of blexpr by providing functions that are able to query the asset types supported by the BMC Server Automation environment. Utility for compressing files using the Burrows-Wheeler block sorting text compression algorithm, and Huffman coding. Compression is generally considerably better than that achieved by more conventional compressors. Concatenates and prints files. Sets or changes the agent password on one or more Windows servers that have the RSCD agent running. Changes group (and user) ownership of files. Changes the mode (protection attributes) of a file. Changes user (and group) ownerships of files. Changes the current role. Display file checksums and block counts. Compares the content of two files checking to see if they are identical. Removes columns from a file. Selects or rejects lines common to two files. Compresses data. Copies files. Converts data in a comma-separated value format to XML format. Selects portions of each line of a file.

bzip2

yes

cat chapw chgrp chmod chown chrole cksum cmp colrm comm compress cp csv2xml cut

yes NA yes yes yes NA yes yes yes yes yes yes yes yes

BMC Server Automation Network Shell Command Reference Manual

Summarized descriptions of commands

Network Shell Command daalinfo dd diff df df2 dsync du echo expand fields file find fold fqdn funzip grep head hexdump hgrep hostname join lam less lesskey link ln ls man md5sum mkdir mkfifo mknod mv ncp ncpu ndf ndircmp

Description Displays an overview of the local DAAL registry. Converts and copies a file. Compares the differences between files and directories. Executes a remote df command. Reports file system disk usage. Synchronizes two directories. Displays disk usage information for files. Echoes arguments. Expands tabs to spaces. Extracts specified fields from a data row. Determines file type. Walks a file hierarchy. Filters the contents of files to limit line length. Prints fully qualified domain name of the current or specified host. Extracts files from a ZIP archive in a pipe. Searches files and selects lines matching specified patterns. Displays the first few lines of a file. Performs an ASCII, decimal, hexadecimal, or octal dump. Highlights the results of a grep. Prints the name of the current host. Provides a relational database operator. Outputs files side by side. Displays files on a CRT. Specifies key bindings that are used by the less command. Creates a link to a file. Creates a link to a file. Lists the contents of a directory. Get man pages from a remote host. Calculate the MD5 checksum of files. Create directories. Creates a named pipe. Creates a special file. Moves or renames files. Copies/synchronizes multiple sources to multiple destinations. Displays CPU information. View usage statistics from one or more hosts. Compares contents of multiple directories.

I18N Support NA yes yes yes yes yes yes yes yes NA yes yes yes NA yes yes yes yes yes yes yes yes yes NA yes yes yes NA yes yes yes yes yes yes NA NA yes Introduction 9

Summarized descriptions of commands

Network Shell Command ndsync nexec nlogin nmem nnet nohup nover nprocsum nps nsh NSH-Perl nshopt nshpath nstats ntop nukecert nunzip order paste pax pkgadd pr prune putcert redi renice rm rmdir rscd rsu runcmd runscript

Description Copies/synchronizes multiple sources to multiple destinations. Provides an interface for running remote commands. Log in to a remote host. View memory and swap statistics from one or more hosts. Displays network adaptor configuration data for one or more servers. Invokes a command immune to hangups. Displays a system overview in a standardized format independent of the servers operating system. Displays process summary from one or more hosts. Displays process information from one or more hosts. Outlines the differences between Network Shell and other shells. Describes the use of the Network Shell Perl module. Tests different network write buffer sizes. Shows the path where an nsh executable resides. Displays a system overview in a standardized format independent of the servers operating system. Provides a collection of commands used to view information and statistics for one or more servers. Removes certificates from servers. Decompresses or compresses files. Sorts a list of strings (or lines) in a specified order. Merges corresponding or subsequent lines of files. Reads and writes file archives and copies directory hierarchies. Provides a Network Shell wrapper to the pkgadd command. Print files. Prunes log files to a specified size. Pushes a certificate generated by bl_gen_ssl to one or more servers. Redirects input to a file. Alters the priority of running processes. Removes a file. Removes an empty directory. Describes the Remote System Call Daemon (the RSCD agent). Runs an NSH command with alternate privileges. Runs a Network Shell command on one or more hosts. Runs a Network Shell script on one or more hosts.

I18N Support yes yes NA NA NA yes NA NA NA yes NA NA yes NA NA NA yes yes yes yes NA yes yes NA yes NA yes yes yes yes yes yes

10

BMC Server Automation Network Shell Command Reference Manual

Summarized descriptions of commands

Network Shell Command scriptutil sdiff secadmin sed sort split strings su tail tar tee test touch tr uname uncompress uncp unexpand uniq unlink unzip unzipsfx uuencode uudecode version vi vsh vshview vtree wc zcat zip zipcloak zipgrep

Description Copies and executes scripts on remote servers. Compares the differences between files and directories sideby-side. Defines encryption security when modifying the secure file. Provides a stream editor. Sorts or merges text files. Splits a file into pieces. Finds printable strings in a file. Substitutes a user identity. Outputs the last part of files. Reads and writes file archives and copies directory hierarchies. Copies standard input to standard output, making copies of the input. Tests the value of an expression. Changes the last update and modification times of a file. Translates or deletes characters. Prints the operating system name. Expands compressed data. Uncopies files that were backed up during a cp or dsync. Replaces spaces with tabs (see also expand). Reports or filters out repeated lines in a file. Unlinks a file and/or directory. Lists, tests, and extracts compressed files in a ZIP archive. Provides a self-extracting stub for prepending to ZIP archives. Encodes a binary file. Decodes a binary file. Tells what version of BMC Server Automation software is installed on a server. Provides a text editor. Starts a shell and captures input and output. Views the log files created by vsh. Shows the directory structure of a file system. Counts the number of lines, words, and/or characters in a file. Expands compressed data. (zcat is an alias for uncompress.) Packages and compresses (archives) files. Packages and compresses (archives) files. Searches files in an archive for lines matching a pattern.

I18N Support yes yes NA yes yes yes yes NA yes yes yes yes yes yes NA yes yes yes yes yes yes yes yes yes NA no NA NA yes yes yes yes yes yes

Introduction

11

Complete descriptions of commands

Network Shell Command zipinfo zipnote zipsplit zshall

Description Lists detailed information about an archive. Packages and compresses (archives) files. Packages and compresses (archives) files. Provides man pages for Network Shells preferred command interpreter, the Z shell.

I18N Support yes yes yes Zsh 4.0.4: no Zsh 4.3.4: yes

Complete descriptions of commands


The following pages provide complete documentation for all commands and utilities available in Network Shell other than the BMC Server Automation configuration files. To view documentation for a particular command, use Adobe Acrobat to click on the bookmark for that command. When viewed in Acrobat, bookmarks are listed alphabetically on the left.

12

BMC Server Automation Network Shell Command Reference Manual

Potrebbero piacerti anche