Port CPU Control

Three commands are available which relate to port CPU operation and are covered in the next three sub-sections.

Note: When connecting to chassis via TCL Server, always import IxTclServices after running "ixConnectToTclServer" and "ixInitialize" commands.

Port CPU Control

Each Ixia port that has a local CPU may be reset through the use of the portCPU reset command. Refer to portCpu for a full description of this command.

The port command’s isValidFeature sub-command may be used to determine if a given port has a CPU. Use the following sequence:

if [port isValidFeature $chas $card $port portFeatureLocalCPU] {

... port has a CPU ...

}

The important sub-commands and options of this command are mentioned in the following table:

Table: portCpu Sub-Commands

Member Usage

reset

Causes the port to reboot its operating system and return to its initial state. Any optional loaded packages are removed. The current port and stream configuration is not affected.

Table: portCpu Options

Member Usage

memory

The amount of memory, expressed in MB, associated with the port.

Issue Port CPU Command

Most intelligent Ixia port runs the Linux Operating system. Any Linux command may be remotely executed by TCL programming. The port command’s isValidFeature sub-command may be used to determine if a given port runs Linux. Use the following sequence:

if [port isValidFeature $chas $card $port portFeatureIxRouter] {

... port runs Linux ...

}

pcpuCommandService

The pcpuCommandService command allows commands to be sent to a set of ports and executed simultaneously. Different commands may be executed on different ports.

Refer to pcpuCommandService for a full description of this command. The important sub-commands and options of this command are mentioned in the following table:

Table: pcpuCommandService Sub-Commands

Member Usage

add

Adds a command to a specific port’s list.

del

Deletes a command from a specific port’s list.

execute

Sends commands to all ports and executes them.

getFirst/getNext

Cycles through list of ports and commands. Command results may be retrieved.

Table: pcpuCommandService Options

Member Usage

chassisID/cardID/portID

The port being addressed.

command

The command to be executed (add) or executed (get).

input

Optional lines of text that is used as the command’s standard input stream.

output

The text from standard output from the executed command. A maximum of 1024 bytes is saved.

error

The text from standard error from the executed command. A maximum of 1024 bytes is saved.

result

The result code of a command’s execution. In general zero means no error and a non-zero indicates an error.

A high-level command, issuePcpuCommand, is also offered.

serviceManager

Most intelligent Ixia ports run the Linux Operating system. Software may be developed for these ports using the guidelines documented in the Ixia Linux SDK Guide. Such software must be combined in a set of files called a package and downloaded to a set of ports. Software packages must have been previously placed on the chassis associated with any affected port, in the following folder:

C:\Program Files\Ixia\packages\

The following files constitute a package:

<package>/<processor>/package.tgz

For example, a package named sample which supports the PPC 405 and 750 processors would have the following files:

C:\Program Files\Ixia\packages\sample.ini

C:\Program Files\Ixia\packages\sample\ppc405\sample.tgz

C:\Program Files\Ixia\packages\sample\ppc750\sample.tgz

Control File Format

Each package must have a control file named <package>.ini, where <package> is a unique name. The following types of statements are allowed in a control file:

A version is of the form n.n[.n...]. That is, two or more decimal separated numbers. For example, 3.65 or 3.70.24.9.

An example ini file is shown below:

#sample.ini

package processor=ppc405, path=sample/ppc405/sample.tgz

package processor=ppc750, platform=3.65-3.70, path=sample/
ppc750/sampleOld.tgz

package processor=ppc750, platform=3.80, path=sampleNew.tgz

Data Files

The data files associated with a package are contained in a single gzipped tar file. The Linux command line to create such a package is as follows:

tar -czf <package>.tgz <file1> <file2> ...

The files in the tar file is unpacked on each processor to the following:

/opt/<package>

folder. The following types of files are contained in the tar file:

serviceManager

The serviceManager command is used to download and manage packages. Refer to serviceManager for a complete explanation of these sub-commands. Note the serviceManager command is valid in Windows based environments.

The important sub-commands of this command are mentioned in the following table:

Table: serviceManager Sub-Commands

Member Usage

downloadPackage

Downloads and starts a package to the ports associated with a port group. The port group is built using the portGroup commands.

deletePackage

Stops and deletes a package from the ports associated with a port group.

getInstalledPackages

Returns a list of packages installed on a particular port.