pcsLaneStatistics
pcsLaneStatistics - retrieves the rx stats per each physical lane.
SYNOPSIS
pcsLaneStatistics sub-command options
DESCRIPTION
The pcsLaneStatistics command is used to retrieve the rx stats per each physical lane.
STANDARD OPTIONS
syncHeaderLock
Indicates if the received PCS lane achieved sync-bit lock. (default = pcsLaneStateLock)
Option |
Value |
Usage |
---|---|---|
pcsLaneStateLock |
1 |
lane state: lock |
pcsLaneStateNoLock |
0 |
lane state: not locked |
pcsLaneMarkerLock
Indicates if the received PCS lane has achieved alignment marker lock. (default = pcsLaneStateLock)
Option |
Value |
Usage |
---|---|---|
kError |
0 |
red led, currently there is an error condition |
kNa |
1 |
green led, not used in lostPcsLaneMarkerLock |
kNoError |
2 |
grey led, no error condition since clearing stats |
kLatched |
3 |
yellow led, there was an error since the last clear but no error at present |
pcsLaneMarkerMap
The PCS lane number identified by the alignment marker.
relativeLaneSkew
Shows the actual skew in nanoseconds. Skew measurements are valid only when all lanes are locked with 20 unique lane markers. The first lane markers to arrive have skew of 0. All other lane skews are relative to them.
syncHeaderErrorCount
The number of synchronization bit errors received.
pcsLaneMarkerError
Count
The number of incorrect PCS lane markers received while in PCS lane lock state.
bip8ErrorCount
The number of BIP-8 errors for a PCS lane. BIP-8 = Bit-Interleaved Parity with eight bit errors (BIP-8). Each bit in the BIP field is an even parity calculation over all previous selected bits of a PCS lane.
lostSyncHeaderLock
Indicates the loss of sync header lock since the last statistic was read. (default = pcsLaneStateLock)
Option |
Value |
Usage |
---|---|---|
pcsLaneStateLock |
1 |
lane state: lock |
pcsLaneStateNoLock |
0 |
lane state: not locked |
lostPcsLaneMarkerLock
Indicates the loss of PCS lane marker lock sincethe last statistic was read. (default = pcsLaneStateLock)
Option |
Value |
Usage |
---|---|---|
kError |
0 |
red led, currently there is an error condition |
kNa |
1 |
green led, not used in lostPcsLaneMarkerLock |
kNoError |
2 |
grey led, no error condition since clearing stats |
kLatched |
3 |
yellow led, there was an error since the last clear but no error at present |
COMMAND
The pcsLaneStatistics command is invoked with the following sub-commands. If no sub-command is specified, returns a list of all sub-commands available.
pcsLaneStatistics get chasID cardID portID
Retrieves the rx PCS lane skew statistics from ixServer for port with id portID on card cardID, chassis chasID. Specific errors are:
- No connection to a chassis
- Invalid port number
pcsLaneStatistics getLane physicalLane
Retrieves the data from local IxHAL after the get has been issued and updates the object with one row of the rx lane stats, indexed per physical lane id. Specific errors are:
- No connection to a chassis
- Invalid physical lane
pcsLaneStatistics setDefault
Sets to IxTclHal default values for all configuration options.
clearPcsLaneStatistics portList
This command eliminates all pcs data lane stats on all ports specified in portList.
EXAMPLES
package req IxTclHal
set hostname loopback
if {[ixConnectToChassis $hostname]} {
errorMsg "error connecting $hostname chassis"
return "FAIL"
}
set chasId [chassis cget -id]
set cardId 140
set portId 1
set portList [list [list $chasId $cardId $portId ] ]
set physicalLaneList [txLane getLaneList $chasId $cardId $portId]
set laneData {\
2 6.206 \
6 291.682 \
17 310.3 \
1 949.518 \
3 12.412 \
8 1681.826 \
18 633.012 \
4 316.506 \
15 2023.156 \
13 2823.73 \
16 1272.23 \
19 633.012 \
5 2147.276 \
12 1073.638 \
11 3165.06 \
7 1445.998 \
10 55.854 \
14 229.622 \
9 2699.61 \
0 0 \
}
txLane setDefault
set index 0
txLane select $chasId $cardId $portId
foreach {lane skew} $laneData {
txLane config -pcsLane $lane
txLane config -skew $skew
if {[txLane setLane [lindex $physicalLaneList $index]]} {
errorMsg "Error setting lane [lindex $physicalLaneList $index]"
set retCode $::TCL_ERROR
break
}
incr index
}
ixWritePortsToHardware portList
clearPcsLaneStatistics portList ; #usage: used with port list.
set plist [ list [ list 1 1 1] ]
clearPcsLaneStatistics $plist
start_test() ;# something to test this with
# now get stats
pcsLaneStatistics get $chasId $cardId $portId
set title [format "%8s\t%8s\t%8s\t%8s\t%8s\t%8s\t%8s\t%8s" pcsLane skew 6466Lock laneLock pcsError vlError lostPcs lostVl]
ixPuts $title
ixPuts [string repeat "-" [string length $title]]
foreach lane $physicalLaneArray {
if {[pcsLaneStatistics getLane $lane]} {
errorMsg "Error getting pcsLaneStats for lane $lane"
return $::TCL_ERROR
}
ixPuts [format "%8s\t%8s\t%8s\t%8s\t%8s\t%8s\t%8s\t%8s" \
[pcsLaneStatistics cget -pcsLaneMarkerMap] \
[pcsLaneStatistics cget -relativeLaneSkew] \
[pcsLaneStatistics cget -syncHeaderLock] \
[pcsLaneStatistics cget -pcsLaneMarkerLock] \
[pcsLaneStatistics cget -pcsLaneMarkerErrorCount] \
[pcsLaneStatistics cget -bip8ErrorCount] \
[pcsLaneStatistics cget -lostSyncHeaderLock] \
[pcsLaneStatistics cget -lostPcsLaneMarkerLock]]
}
ixPuts
cleanUp