Command Line Interface

Overview

This appendix describes the CLI commands that are available on the Cisco Unified Communications Operating System server.

Starting a CLI Session

You can access the Cisco Unified Communications Operating System CLI remotely or locally:

•From a web client workstation, such as the workstation that you use for Cisco Unified Communications Operating System Administration, you can use SSH to connect securely to the Cisco Unified Communications Operating System.

•You can access the Cisco Unified Communications Operating System CLI directly by using the monitor and keyboard that you used during installation or by using a terminal server that is connected to the serial port. Use this method if a problem exists with the IP address.

Before You Begin

Ensure you have the following information that gets defined during installation:

•A primary IP address and hostname

•An administrator ID

•A password

You will need this information to log in to the Cisco IPT Platform.

Perform the following steps to start a CLI session:

Step 1 Do one of the following actions depending on your method of access:

•From a remote system, use SSH to connect securely to the Cisco IPT Platform. In your SSH client, enter

ssh adminname@hostname

where adminname specifies the Administrator ID and hostnamespecifies the hostname that was defined during installation.

For example, ssh admin@ipt-1.

•From a direct connection, you receive this prompt automatically:

ipt-1 login:

where ipt-1 represents the host name of the system.

Enter your administrator ID.

In either case, the system prompts you for a password.

Step 2 Enter your password.

The CLI prompt displays. The prompt represents the Administrator ID; for example:

admin:

CLI Basics

The following section contains basic tips for using the command line interface.

Completing Commands

To complete commands, use Tab:

•Enter the start of a command and press Tab to complete the command. For example, if you enter se and press Tab, set gets completed.

•Enter a full command name and press Tab to display all the commands or subcommands that are available. For example, if you enter set and press Tab, you see all the set subcommands. An * identifies the commands that have subcommands.

•If you reach a command, keep pressing Tab, and the current command line repeats; this indicates that no additional expansion is available.

Getting Help on Commands

You can get two kinds of help on any command:

•Detailed help that includes a definition of the command and an example of its use

•Short query help that includes only command syntax

Procedure

To get detailed help, at the CLI prompt, enter

help command

Where command specifies the command name or the command and parameter. See Example A-1.

To query only command syntax, at the CLI prompt, enter

command?

Where command represents the command name or the command and parameter. See Example A-2.

Note If you enter a ? after a menu command, such as set, it acts like the Tab key and lists the commands that are available.

Example A-1 Detailed Help Example:

admin:help file list activelog

activelog help:

This will list active logging files

options are:

page - pause output

detail - show detailed listing

reverse - reverse sort order

date - sort by date

size - sort by size

file-spec can contain '*' as wildcards

Example:

admin:file list activelog platform detail

02 Dec,2004 12:00:59 <dir> drf

02 Dec,2004 12:00:59 <dir> log

16 Nov,2004 21:45:43 8,557 enGui.log

27 Oct,2004 11:54:33 47,916 startup.log

dir count = 2, file count = 2

Example A-2 Query Example:

admin:file list activelog?

Syntax:

file list activelog file-spec [options]

file-spec mandatory file to view

options optional page|detail|reverse|[date|size]

Ending a CLI Session

At the CLI prompt, enter quit. If you are logged in remotely, you get logged off, and the ssh session gets dropped. If you are logged in locally, you get logged off, and the login prompt returns.

Cisco IPT Platform CLI Commands

The following sections list and describe the CLI commands that are available for the Cisco Unified Communications Operating System.

delete account

This command allows you to delete an administrator account.

Command Syntax

delete account account-name

Parameters

•account-name represents the name of an administrator account.

Requirements

Command privilege level: 4

Allowed during upgrade: No

delete dns

This command allows you to delete the IP address for a DNS server.

Command Syntax

delete dns ip-address

Parameters

•ip-address represents the IP address of the DNS server you want to delete.

Usage Guidelines

The system asks whether you want to continue to execute this command.

Caution If you continue, this command causes a temporary loss of network connectivity.

Requirements

Command privilege level: 1

Allowed during upgrade: No

delete ipsec

This command allows you to delete IPSec policies and associations.

Command Syntax

delete ipsec

policy {ALL | policy-name}

associationpolicy name {ALL | association-name}

Parameters

•policy-name represents an IPSec policy.

•association-name represents an IPSec association.

Requirements

Command privilege level: 1

Allowed during upgrade: No

delete process

This command allows you to delete a particular process.

Command Syntax

delete process process-id [force | terminate | crash]

Parameters

•process-id represents the process ID number.

Options

•force—Tells the process to stop

•terminate—Tells the operating system to terminate the process

•crash—Crashes the process and produces a crash dump

Usage Guidelines

Note Use the force option only if the command alone does not delete the process and use the terminate option only if force does not delete the process.

Requirements

Command privilege level: 1

Allowed during upgrade: Yes

delete smtp

This command allows you to delete the SMTP host.

Command Syntax

delete smtp

Requirements

Command privilege level: 1

Allowed during upgrade: No

file check

This command checks the /usr directory tree to see whether any files or directories have been added, removed, or changed in size since the last fresh installation or upgrade and displays the results.

Command Syntax

file check [detection-size-kb]

Options

detection-size-kb specifies the minimum file size change that is required for the command to display the file as changed.

Usage Guidelines

The command notifies you about a possible impact to system performance and asks you whether you want to continue.

Caution Because running this command can affect system performance, Cisco recommends that you run the command during off-peak hours.

The display includes both deleted and new files.

Defaults

The default value of detection-size-kb is 100 KB.

Requirements

Command privilege level: 0

Allowed during upgrade: No

file delete

This command deletes one or more files.

Command Syntax

file delete

activelogdirectory/filename [detail] [noconfirm]

inactivelogdirectory/filename [detail] [noconfirm]

installdirectory/filename [detail] [noconfirm]

tftpdirectory/filename [detail]

Parameters

•activelog specifies a log on the active side.

•inactivelog specifies a log on the inactive side.

•install specifies an installation log.

•tftp specifies a TFTP file.

•directory/filename specifies the path and filename of the file(s) to delete. You can use the wildcard character, *, for filename.

Options

•detail—Displays a listing of deleted files with the date and time.

•noconfirm—Deletes files without asking you to confirm each deletion.

Usage Guidelines

Caution You cannot recover a deleted file except, possibly, by using the Disaster Recovery System.

If you delete a TFTP data file on the inactive side, you may need to manually restore that file if you switch versions to the inactive side.

Requirements

Command privilege level: 1

Allowed during upgrade: Yes

Example

The following example deletes the install log.

file delete install install.log

file dump

This command dumps the contents of a file to the screen, a page at a time.

Command Syntax

file dump

activelogdirectory/filename [detail] [hex]

inactivelogdirectory/filename [detail] [hex]

installdirectory/filename [detail] [hex]

tftpdirectory/filename[detail] [hex]

Parameters

•activelog specifies a log on the active side.

•inactivelog specifies a log on the inactive side.

•install specifies an installation log.

•tftp specifies a TFTP file.

•directory/filename specifies the path and filename of the file to dump. You can use the wildcard character, *, for filename as long as it resolves to one file.

Options

•detail—Displays listing with the date and time

•hex—Displays output in hexadecimal

Requirements

Command privilege level: 1 for logs, 0 for TFTP files

Allowed during upgrade: Yes

Example

This command dumps contents of file _cdrIndex.idx.

file dump activelog cm/cdr/_cdrIndex.idx

file get

This command sends the file to another system by using SFTP.

Command Syntax

file get

activelogdirectory/filename [reltime] [abstime] [match] [recurs]

inactivelogdirectory/filename [reltime] [abstime] [match] [recurs]

installdirectory/filename [reltime] [abstime] [match] [recurs]

tftpdirectory/filename [reltime] [abstime] [match] [recurs]

Parameters

•activelog specifies a log on the active side.

•inactivelog specifies a log on the inactive side.

•install specifies an installation log.

•tftp specifies a TFTP file.

•directory/filename specifies the path to the file(s) to delete. You can use the wildcard character, *, for filename as long as it resolves to one file.

•directory/filename represents the path to the file(s) to search. You can use the wildcard character, *, to represent all or part of the filename.

Options

•abstime—Specifies which files to search based on file creation time. Enter a start time and an end time.

•days|hours|minutes—Specifies whether the file age is in days, hours, or minutes.

•ignorecase—Ignores case when searching

•reltime—Specifies which files to search based on file creation time. Enter the age of files to search.

•hh:mm:ss mm/dd/yyyy—An absolute time, in the format hours:minutes:seconds month/day/year.

•timevalue—The age of files to search. The unit of this value is specified with the {days | hours | minutes}option.

Usage Guidelines

Write the search term in the form of a regular expression, which is a special text string for describing a search pattern.

If the search term is found in only one file, the filename appears at the top of the output. If the search term is found in multiple files, each line of the output begins with the filename in which the matching line was found.

Requirements

Command privilege level: 0

Allowed during upgrade: Yes

Example

file search activelog platform/log/platform.log Err[a-z] ignorecase

file tail

This command tails (prints the last few lines) of a log file.

Command Syntax

file tail

activelogdirectory/filename [detail] [hex] [lines]

inactivelogdirectory/filename [detail] [hex] [lines]

installdirectory/filename [detail] [hex] [lines]

tftpdirectory/filename [detail] [hex] [lines]

Parameters

•activelog specifies a log on the active side.

•inactivelog specifies a log on the inactive side.

•install specifies an installation log.

•tftp specifies a TFTP file.

•directory/filename specifies the path to the file to tail. You can use the wildcard character, *, for filename as long as it resolves to one file.

Options

•detail—Long listing with date and time

•hex—Hexadecimal listing

•lines—Number of lines to display

Requirements

Command privilege level: 1 for logs, 0 for TFTP files

Allowed during upgrade: Yes

Example

This example tails the operating system CLI log file.

file tail activelog platform/log/cli00001.log

file view

This command displays the contents of a file.

Command Syntax

file view

activelogdirectory/filename

inactivelogdirectory/filename

installdirectory/filename

tftp directory/filename

Parameters

•activelog specifies a log on the active side.

•inactivelog specifies a log on the inactive side.

•install specifies an installation log.

•tftp specifies a TFTP file.

•directory/filename specifies the path to the file to view. You can use the wildcard character, *, for filename as long as it resolves to one file.

Usage Guidelines

Caution Do not use this command to view binary files because this can corrupt the terminal session.

Requirements

Command privilege level: 0

Allowed during upgrade: Yes

Examples

This example displays the install log.

file view install install.log

This example displays a particular CDR file.

file view activelog /cm/cdr_repository/processed/20058012/{filename}

run sql

This command allows you to run an SQL command.

Command Syntax

run sqlsql_statement

Parameters

•sql_statement represents the SQL command to run.

Requirements

Command privilege level: 1

Allowed during upgrade: No

Example

This example runs an SQL command.

run sql select name from device

set account

This command sets up a new account on the operating system.

Command Syntax

set account name

Parameters

•name represents the username for the new account.

Usage Guidelines

After you enter the username, the system prompts you to enter the privilege level and password for the new account.

Requirements

Command privilege level: 0

Allowed during upgrade: No

set commandcount

This command changes the CLI command prompt, so it displays how many CLI commands have executed.

Command Syntax

set commandcount {enable | disable}

Parameters

•unit-name represents the name of the certificate that you want to regenerate.

utils disaster_recovery show_backupfiles network

•path represents the location of the backup files on the remote server.

•servername represents the IP address or host name of the server where you stored the backup files.

•username represents the username that is needed to log in to the remote server.

Usage Guidelines

Note The system prompts you to enter the password for the account on the remote server.

Requirements

Command privilege level: 1

Allowed during upgrade: No

utils disaster_recovery show_backupfiles tape

This command displays information about the backup files that are stored on a tape.

Command Syntax

utils disaster_recovery show_backupfiles tapetapeid

Parameters

•tapeid represents the ID of an available tape device.

Requirements

Command privilege level: 1

Allowed during upgrade: No

utils disaster_recovery show_registration

This command displays the registered features and components on the specified server.

Command Syntax

utils disaster_recovery show_registrationhostname

Parameters

•hostname specifies the server for which you want to display registration information.

Requirements

Command privilege level: 1

Allowed during upgrade: No

utils disaster_recovery show_tapeid

This command displays a list of tape device IDs.

Command Syntax

utils disaster_recovery show_tapeid

Requirements

Command privilege level: 1

Allowed during upgrade: No

utils disaster_recovery status

This command displays the status of the current backup or restore job.

Command Syntax

utils disaster_recovery statusoperation

Parameters

•operation specifies the name of the ongoing operation: backup or restore.

Requirements

Command privilege level: 1

Allowed during upgrade: No

utils fior

This command allows you to monitor the I/O on the server. The File I/O Reporting service provides a kernel based daemon for collecting file I/O per process.

Command Sntax

utils fior

disable

enable

list

start

status

stop

top

Options

•disable—Prevents the file I/O reporting service from starting automatically when the machine boots. This command does not stop the service without a reboot. Use the stop option to stop the service immeditately.

•enable—Enables the file I/O reporting service to start automatically when the machine boots. This command does not start the service without a reboot. Use the start option to start the service immediately.

•list—This command displays a list of file I/O events, in chronological order, from oldest to newest.

•start—Starts a previously stopped file I/O reporting service. The service remains in a started state until it is manually stopped or the machine is rebooted.

•status—Displays the status of the file I/O reporting service.

•stop—Stops the file I/O reporting service. The service remains in a stopped state until it is manually started or the machine is rebooted.

•top—Displays a list of top processes that create file I/O. This list can be sorted by the total number of bytes read, the total number of bytes written, the rate of bytes read, or the rate of bytes written.

utils iothrottle enable

This command enables I/O throttling enhancements. When enabled, I/O throttling enhancements lower the impact of upgrades on an active system.

Command Syntax

utils iothrottle enable

utils iothrottle disable

This command disables I/O throttling enhancements. This could adversely affect the system during upgrades.

Command Syntax

utils iothrottle disable

utils iothrottle status

This command displays the status of I/O throttling enhancements.

Command Syntax

utils iothrottle status

utils netdump client

This command configures the netdump client.

Command Syntax

utils netdump client

startip-address-of-netdump-server

status

stop

Parameters

•start starts the netdump client.

•status displays the status of the netdump client.

•stop stops the netdump client.

•ip-address-of-netdump-server specifies the IP address of the netdump server to which the client will send diagnostic information.

Usage Guidelines

In the event of a kernel panic crash, the netdump client sends diagnostic information about the crash to a netdump server.

Requirements

Command privilege level: 0

Allowed during upgrade: No

utils netdump server

This command configures the netdump server.

Command Syntax

utils netdump server

add-clientip-address-of-netdump-client

delete-clientip-address-of-netdump-client

list-clients

start

status

stop

Parameters

•add-client adds a netdump client.

•delete-client deletes a netdump client.

•list-clients lists the clients that are registered with this netdump server.

•start starts the netdump server.

•status displays the status of the netdump server.

•stop stops the netdump server.

•ip-address-of-netdump-client specifies the IP address of a netdump client.

Usage Guidelines

In the event of a kernel panic crash, a netdump-enabled client system sends diagnostic information about the crash to the netdump server.

netdump diagnostic information gets stored in the following location on the netdump server: crash/. The subdirectories whose names comprise a client IP address and a date contain netdump information.

You can configure each Cisco Unified Communications Operating System server as both a netdump client and server.

If the server is on another Cisco Unified Communications Operating System server, only the kernel panic trace signature gets sent to the server; otherwise, an entire core dump gets sent.

For screen output, the maximum number of bytes equals 128, for file output, the maximum of bytes can be any number or ALL

•srcaddr—Specifies the source address of the packet as a host name or IPV4 address

•destaddr—Specifies the destination address of the packet as a host name or IPV4 address

•portnum—Specifies the port number of the packet, either source or destination

Requirements

Command privilege level: 0

Allowed during upgrade: Yes

utils network host

This command resolves a host name to an address or an address to a host name.

Command Syntax

utils network hosthostname [serverserver-name] [page] [detail] [srv]

Parameters

•hostname represents the host name or IP address that you want to resolve.

Options

•server-name—Specifies an alternate domain name server

•page—Displays the output one screen at a time

•detail—Displays a detailed listing

•srv—Displays DNS SRV records.

Requirements

Command privilege level: 0

Allowed during upgrade: Yes

utils network ping

This command allows you to ping another server.

Command Syntax

utils network pingdestination [count]

Parameters

•destination represents the hostname or IP address of the server that you want to ping.

Options

•count—Specifies the number of times to ping the external server. The default count equals 4.

Requirements

Command privilege level: 0

Allowed during upgrade: Yes

utils network tracert

This command traces IP packets that are sent to a remote destination.

Command Syntax

utils network tracertdestination

Parameters

•destination represents the hostname or IP address of the server to which you want to send a trace.

Requirements

Command privilege level: 0

Allowed during upgrade: Yes

utils ntp

This command displays the NTP status or configuration.

Command Syntax

utils ntp {status | config}

Requirements

Command privilege level: 0

Allowed during upgrade: Yes

utils remote_account

This command allows you to enable, disable, create, and check the status of a remote account.

Command Syntax

utils remote_account

status

enable

disable

createusernamelife

Parameters

•username specifies the name of the remote account. The username can contain only lowercase characters and must be more than six-characters long.

•life specifies the life of the account in days. After the specified number of day, the account expires.

Usage Guidelines

A remote account generates a pass phrase that allows Cisco Systems support personnel to get access to the system for the specified life of the account. You can have only one remote account that is enabled at a time.