EasyManua.ls Logo

Cisco 11503 - CSS Content Services Switch User Manual

Cisco 11503 - CSS Content Services Switch
392 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #287 background imageLoading...
Page #287 background image
8-19
Cisco Content Services Switch Administration Guide
OL-5647-02
Chapter 8 Using the CSS Scripting Language
Special Variables
In the following example, notice that the error that is most likely to occur is not a
syntax error, but an error with the command being initiated. In this case, a nonzero
value results in a “Failure to connect to remote host” message. This could be a
special case where you want to catch the error and then perform another action
instead.
set CONTINUE_ON_ERROR “1”
socket connect host 1.1.1.1 port 9
if STATUS “NEQ” “0”
echo “Failure to connect to remote host”
endbranch
no set CONTINUE_ON_ERROR
EXIT_MSG Variable
Use the EXIT_MSG variable to tell the CLI to print out a custom message when
a script exits. Typically, you set this variable to a string value that is printed when
the script terminates. Set this variable to prepare for potential errors, and unset it
using the no set command before the script exits cleanly. This variable allows you
to take advantage of the CLI's exit upon error behavior, while permitting the
flexibility of customizing the error message. For example, enter:
set EXIT_MSG “Failure to connect to host”
socket connect host 1.1.1.1 port 9
no set EXIT_MSG
The example above shows how you can create a custom error message that will
print “Failure to connect to host” if the socket connect command returns a
non-zero STATUS variable. When this occurs (unless the
CONTINUE_ON_ERROR variable is set), the script terminates automatically
and the CLI prints the EXIT_MSG string to the screen.
If the socket connect command succeeds, then the CLI executes the next
command in the script. In this case, the script performs a no set EXIT_MSG
command. This allows the script to terminate normally without printing an exit
message to the screen, which would be inappropriate because no error occurred.

Table of Contents

Other manuals for Cisco 11503 - CSS Content Services Switch

Question and Answer IconNeed help?

Do you have a question about the Cisco 11503 - CSS Content Services Switch and is the answer not in the manual?

Cisco 11503 - CSS Content Services Switch Specifications

General IconGeneral
BrandCisco
Model11503 - CSS Content Services Switch
CategorySwitch
LanguageEnglish

Summary

CHAPTER 1 Managing the CSS Software

CSS Software Overview

Describes the CSS software files, installation methods, and version format.

Using the Running-Config and Startup-Config Files

Covers saving, copying, clearing, and showing running and startup configuration files.

CHAPTER 2 Specifying the CSS Boot Configuration

Specifying the Primary Boot Configuration

Details configuring the primary boot file, type (disk, FTP, network), and configuration path.

Specifying the Secondary Boot Configuration

Describes configuring the secondary boot file, type (disk, FTP, network), and configuration path.

Configuring a Boot Configuration Record for the Passive SCM

Covers configuring boot records for the passive SCM, including gateway, IP, boot file, and type.

Booting the CSS from a Network Drive

Details the process of network booting the CSS using a .zip file from www.cisco.com.

CHAPTER 3 Configuring User Profiles

User Profiles Overview

Explains user profiles, customizable settings like CLI prompt, expert mode, and terminal parameters.

Configuring User Terminal Parameters

Covers configuring terminal idle time, length, prompt, netmask format, and timeout.

CHAPTER 4 Using the CSS Logging Features

Logging Overview

Introduces CSS logging, log files, destinations, and default logging levels.

Configuring Logging for a Subsystem

Details how to select CSS subsystems and log activity at different logging levels.

Specifying a Log File Destination

Covers specifying destinations for log files: disk, host, or CSS active session.

CHAPTER 5 Configuring Simple Network Management Protocol (SNMP)

SNMP Overview

Provides an overview of SNMP, its standards, and the manager/agent communication model.

Management Information Base (MIB) Overview

Explains MIBs, MIB objects, the MIB tree structure, and MIB variables.

Defining the CSS as an SNMP Agent

Details the steps for configuring the CSS as an SNMP agent, including communities, traps, and contact info.

Configuring Denial of Service (DoS)

Covers configuring enterprise traps for DoS attacks and displaying/resetting DoS statistics.

CHAPTER 6 Configuring Remote Monitoring (RMON)

RMON Overview

Introduces RMON, its supported groups (Statistics, History, Alarm, Event), and MIB objects.

Configuring an RMON Event

Details how to configure RMON events, including quick start, index, attributes, and activation.

Configuring an RMON Alarm

Covers configuring RMON alarms, including sampling methods, thresholds, and events.

Configuring an RMON History

Explains how to configure RMON history for ports, including data sources, buckets, and intervals.

CHAPTER 7 Using an XML Document to Configure the CSS

Creating XML Code

Provides guidelines for developing XML code for the Content API, including tag usage and special characters.

CHAPTER 8 Using the CSS Scripting Language

Using the Command Scheduler

Details scheduling CLI commands and scripts for periodic execution.

Using Variables

Covers creating, setting, removing, and modifying variables, including types and operations.

Using Logical and Relational Operators and Branch Commands

Explains using 'if' and 'while' commands for structured script logic and operators.

Using socket Commands

Explains socket commands for ASCII/hexadecimal send/receive, connection handling, and inspection.

APPENDIX A Upgrading Your CSS Software

Configuring an FTP Server Record on the CSS

Explains how to create an FTP record file on the CSS to identify the ADI for the upgrade.

Upgrading Your CSS Software

Provides information on upgrading CSS software, including restrictions and methods.

Using the Upgrade Script

Details how to run the upgrade script automatically or interactively.

Manually Upgrading the CSS Software

Explains the CLI commands required to manually upgrade the CSS software version.

APPENDIX B Using the Offline Diagnostic Monitor Menu

Using the Boot Configuration Menu

Illustrates the boot process flowchart and describes menu options for boot configuration.

Configuring Disks in a Two-Disk CSS

Details configuring PCMCIA slots for primary/secondary boot, logging, and core dumps.

Related product manuals