portCpu
portCpu - control a port's CPU.
SYNOPSIS
portCpu sub-command options
DESCRIPTION
This command allows to control the CPU associated with many Ixia load modules. 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 only sub-command currently available is the reset command, which causes the port to reboot its operating system and return to its initial state. Any optional loaded packages are removed.
STANDARD OPTIONS
memory
Read-only. The amount of memory, expressed in Mbytes, associated with the CPU on the port.
COMMANDS
The portCpu command is invoked with the following sub-commands. If no sub-command is specified, returns a list of all sub-commands available.
portCpu cget option
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the portCpu command.
portCpu get chasID cardID portID
Gets the current configuration of the port CPU for the indicated port. Call this command before calling port cget option value to get the value of the configuration option. Specific errors are:
- No connection to a chassis
- Invalid port number
portCpu reset chasID cardID portID
Resets the CPU on the indicated port. Specific errors are:
- No connection to a chassisThe port is owned by another user
- The port does not have a local CPU
EXAMPLES
package require IxTclHal
set host localhost
set username user
# Assume card 1 is a card that has a CPU
set card 1
set port 1
if [isUNIX] {
if [ixConnectToTclServer $host] {
ixPuts "Could not connect to $host"
return 1
}
}
if [ixConnectToChassis $host] {
ixPuts $::ixErrorInfo
return 1
}
set chas [ixGetChassisID $host]
if {[port isValidFeature $chas $card 1 portFeatureLocalCPU] == 0} {
ixPuts "$chas:$card does not have a local CPU"
return 1
}
if [portCpu reset $chas $card $port] {
ixPuts $::ixErrorInfo
return 1
}
ixPuts "$chas:$card:$port has been reset"
if [portCpu get $chas $card $port] {
ixPuts $::ixErrorInfo
return 1
}
ixPuts "Port $chas:$card:$port has [portCpu cget -memory] MB of memory"
SEE ALSO
port.