vsrStat
vsrStat - read 10Gigabit VSR statistics
SYNOPSIS
vsrStat sub-command options
DESCRIPTION
The vsrStat command is used to read global and per channel VSR statistics for 10Gigabit Ethernet cards.
STANDARD OPTIONS
Global Statistics
rxChannelProtection
Disabled
Read-Only. True or false, indicating the status of the channel protection on the receiving interface.
rxChannelSkewError
Read-Only. True or false, indicating the status of the channel skew error detection on the receiving interface.
rxChannelSkewFirst
Read-Only. Indicates the channel number of the earliest channel to arrive on the receiving interface. If more than one channel arrives at the same time, Channel #1 has the highest priority and so on.
rxChannelSkewLast
Read-Only. Indicates the channel number of the latest channel to arrive on the receiving interface. If more than one channel arrives at the same time, Channel #1 has the highest priority, and so on.
rxChannelSkewMax
Read-Only. This counter increments every time the channel skew is equal to or greater than the maximum channel skew.
rxChannelSwapped
Read-Only. True indicates one or more channel swap errors and false indicates no errors.
rxCodeWordViolation
Error
Read-Only. True indicates one or more 8b/10b code word violation errors and false indicates no errors.
rxCrcCorrectedError
Counter
Read-Only. The number of corrected CRC block errors accumulated on the receiving interface.
rxCrcCorrection
Disabled
Read-Only. True or false, indicating the status of the CRC correction on the receiving interface.
rxCrcError
Read-Only. True indicates one or more detected CRC errors and false indicates no errors.
rxCrcUnCorrectedError
Counter
Read-Only. The number of uncorrected CRC block errors accumulated on the receiving interface.
rxHardwareError
Read-Only. The number of hardware errors detected on the receive side.
rxLossOf
Synchronization
Counter
Read-Only. Indicates the number of times that a protection channels was in the loss of synchronization state.
rxMultiLossOf
Synchronization
Counter
Read-Only. Indicates the number of times that two or more data or protection channels were in the Loss of Synchronization state.
rxMultiLossOf
SynchronizationStatus
Read-Only. True indicates that two or more data or protection channels are in the Loss of Synchronization state.
rxOutOfFrameCounter
Read-Only. Indicates the number of frame errors for the receiving interface.
rxOutOfFrameStatus
Read-Only. True indicates one or more out of frame errors for the receiving interface and false indicates no errors.
rxSectionBipError
Counter
Read-Only. The number of Section BIP errors detected on the receiving interface.
txHardwareError
Read-Only. The number of hardware errors detected on the transmit side.
txOutOfFrameCounter
Read-Only. The number of out of frame errors detected on the transmit side.
txOutOfFrameStatus
Read-Only. True indicates one or more out of frame errors for the transmit interface and false indicates no errors.
txSectionBipError
Counter
Read-Only. The number of Section Bit Interleaved Parity (BIP) errors which have been detected on the transmit interface.
Per-Channel Statistics
rxCodeWordViolation
Counter
Read-Only. This per-channel statistic indicates the number of codeword violations detected on the receiving channel interface. Codeword violations include running disparity errors, undefined codewords, and any control characters besides K28.5.
rxCrcErrorCounter
Read-Only. This per-channel statistic indicates the number of corrected and uncorrected errors on the receive interface.
rxLossOf
Synchronization
Read-Only. This per-channel statistic indicates the loss of synchronization status of the receiving interface as a true or false value.
rxOutOfFrame
Read-Only. This per-channel statistic indicates the out of frame status of the receiving interface for a particular channel as a true or false value.
COMMANDS
The vsrStat command is invoked with the following sub-commands. If no sub-command is specified, returns a list of all sub-commands available.
vsrStat cget option
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the vsrStat command.
vsrStat get chasID cardID portID
Gets the current VSR statistics of the indicated. Call this command before calling vsrStat cget option to get the value of the global statistics. Also call vsrStat getChannel channelID before getting statistics for a particular channel.
vsrStat getChannel channelID
Gets the statistics for the channel indicated by channelID, which must be a value between 1 and 12. The per-channel statistics are then available through the use of vsrStat cget option.
vsrStat set chasID cardID portID
Sets the vsrStat configuration of the port with id portID on card cardID, chassis chasID by reading the configuration option values set by the vsrStat config option value command.
EXAMPLES
package require IxTclHal
# Connect to chassis and get chassis ID
set host localhost
set username user
# Check if we're running on UNIX - connect to the TCL Server
# which must be running on the chassis
if [isUNIX] {
if [ixConnectToTclServer $host] {
ixPuts "Could not connect to $host"
return 1
}
}
# Now connect to the chassis
if [ixConnectToChassis $host] {
ixPuts $::ixErrorInfo
return 1
}
# Get the chassis ID to use in port lists
set chas [ixGetChassisID $host]
# Assuming that a VSR card is in slot 39
set card 39
set portList [list [list $chas $card 1]]
# Login before taking ownership
if [ixLogin $username] {
ixPuts $::ixErrorInfo
return 1
}
# Take ownership of the ports we'll use
if [ixTakeOwnership $portList] {
ixPuts $::ixErrorInfo
return 1
}
# see if the card supports VSR
if {[port isValidFeature portFeatureVsr $chas $card 1] == 0} {
ixPuts "Card $card is not a VSR card"
return 1
}
# ... Normal port, protocol, stream operations
ixWriteConfigToHardware portList
# Let's get some global stat for port 1
if [vsrStat get $chas $card 1] {
ixPuts "Can't vsrStat get for $chas.$card.1"
return 1
}
if {[vsrStat cget -rxChannelSkewError]} {
ixPuts "Channel error: "
set first [vsrStat cget -rxChannelSkewFirst]
set latest [vsrStat cget -rxChannelSkewLast]
ixPuts " Channels $first - $latest"
# And now some stat for the earliest skewed channel
if [vsrStat getChannel $first] {
ixPuts "Can't vsrStat getChannel $first"
return 1
}
ixPuts -nonewline "Number of Crc Errors on channel $first: "
ixPuts [vsrStat cget -rxCrcErrorCounter]
}
# Let go of the ports that we reserved
ixClearOwnership $portList
# Disconnect from the chassis we're using
ixDisconnectFromChassis $host
# If we're running on UNIX, disconnect from the TCL Server
if [isUNIX] {
ixDisconnectTclServer $host
}