ALARM Functions

sth::alarms_control

Purpose

The sth::alarms_control command emulates the specified momentary or continuous alarms on Synchronous Optical Network (SONET) or Synchronous Digital Hierarchy (SDH) links.

SONET alarms fall into three different types — section, line, and path. Section, line and path errors occur over different spans of the SONET network which is comprised of section-terminating equipment (STE), line-terminating equipment (LTE) and path-terminating equipment (PTE). Typically, a SONET device sends alarms both upstream and downstream in order to notify other devices of the problem condition.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::alarms_control
    [-alarm_type {line_ais | line_bip24 | line_bip96 | line_bip384|
                  line_rdi|line_rei | path_ais | path_bip8 | path_rdi |
                  path_rei | sec_bip8 | unequip }  M]
    [-port_handle <port_handle>]
    [-count <integer>]
    [-interval <integer>]
    [-mode {momentary|continuous}]
    [-reset {1|0}]
    [-state {1|0}]

Arguments

-port_handle

Specifies the port on which to trigger the alarms. This argument is Mandatory .

-alarm_type

Specifies the type of the alarm to be performed. This argument is mandatory. The types are described below: :

line_ais
Triggers Alarm Indication Signal-Line (AIS-L) by inserting 111 in bits 6,7, and 8 of K2 byte for five consecutive frames.
line_bip24
Inverts B2 bytes to insert BIP errors. This argument is applicable for OC-3 interfaces only.
line_bip96
Inverts B2 bytes to insert BIP errors. This argument is applicable for OC-12 interfaces only.
line_bip384
Inverts B2 bytes to insert BIP errors. This argument is applicable for OC-48 interfaces only.
line_rdi
Enables Remote Defect Indication-line (RDI-L) alarmsI by inserting 110 in bits 6,7, and 8 of K2 byte for five consecutive frames.
line_rei
Indicates the alarm type is Remote Error Indication-line (REI-L). REI-L is sent to the upstream LTE when errors are detected in the B2 byte.
path_ais
Enables Alarm Indication Signal path (AIS-P) by setting all bits except section overhead to one before scrambling to start AIS-P.
path_bip8
Inverts the B3 byte to insert BIP errors.
path_rdi
Enables Path Remote Defect Indication (PRDI) alarm by sets the yellow alarm (bit 5) in the G1 byte
path_rei
Indicates the alarm is a Remote Error Indication-path (REI-P). REI-P is sent to the upstream PTE when errors are detected in the B3 byte.
sec_bip8
Inverts the B1 byte to insert BIP errors.
unequip
Specifies the alarm type is an unequipped payload (UNEQ-P) alarm. UNEQ-P indicates a possible provisioning problem and occurs when the router detects a value of 0x00 in the C2 byte.
pause_frame
Sends a pause frame.

Note

Spirent HLTAPI does not support pause_frame.

-count

Specifies the number of momentary alarm conditions to trigger. The default value is 5. This argument is only applicable for momentary alarms.

-interval

Specifies the interval, measured in seconds, between triggers of momentary alarms. This argument is only applicable for momentary alarms. The default value is 30s.

-mode

Spirent Extension (for Spirent HLTAPI only).

Specifies whether the alarm type specified by the -alarm_type argument should be triggered continuously or on a momentary basis. Possible values are momentary and continuous. The default value is momentary.

-reset

Spirent Extension (for Spirent HLTAPI only).

Determines whether to reset indications from all Sonnet alarms or not. Possible values are 0 and 1. When it is set to 1, Spirent HLTAPI will reset all the existing alarm indications. The default value is 0.

-state

Turns on or off the specified momentary or continuous alarm. Possible values are 0 (off) and 1 (on). The default value is 0. When the -mode is set to continuous, the -state argument will turn on or off the specified continuous alarm.

Arguments Unsupported by Save as HLTAPI

The sth::alarms_control function is not supported by Save as HLTAPI. To test with this function, you must configure it manually in the script generated using Save as HLTAPI.

Return Values

Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):

status
Success (1) or failure (0) of the operation.
log
An error message (if the operation failed).

Description

The sth::alarms_control function emulates different kinds of SONET or SDH alarms momentarily or continuously on a specified port. Use the -alarm_type argument to specify the alarm to emulate. (See the -alarm_type argument description for information about the alarm types.)

When you specify the -port_handle argument, the alarm type specified by the -alarm_type argument will be triggered momentarily on the specified port. You can specify the -mode argument to trigger continuous alarms. You can use the -state option to turn on or turn off the specified momentary or continuous alarm.

If the control of SONET alarm fails, Spirent HLTAPI returns an error message.

Examples

The following example turns on the momentary line_ais alarm on port1:

sth::alarms_control -port_handle port1\
     -alarm_type line_ais \
     -state 1

The example below turns on the momentary line_bip24 alarm on OC3 interface twice with an interval of 1 second:

sth::alarms_control -port_handle port1\
     -alarm_type line_bip24 \
     -count 2 \
     -interval 1 \
     -state 1

The following example turns on the continuous line_ais alarm on port1:

sth::alarms_control -port_handle  port1\
     -alarm_type line_bip24 \
     -mode continuous \
     -state 1

The following example turns off line_ais alarm on port1:

sth::alarms_control -port_handle port1\
               -alarm_type line_ais \
               -state 0

The following example resets all the existing alarm indications:

sth::alarms_control -port_handle port1 \
               -reset 1 \

Sample output for examples shown above:

{status 1}

End of Procedure Header

sth::alarms_stats

Purpose

Returns alarms information for the specified test port.

Synopsis

Note

M indicates that the argument is Mandatory .

sth::alarms_stats
   [-port_handle <port_handle>]

Arguments

-port_handle

Specifies the port from which to get the statistics.

Cisco-specific Arguments

The following arguments are specific to the Cisco HLTAPI but are not supported by Spirent HLTAPI:

-a_header

Return Values

The sth::alarms_stats function returns a keyed list using the following keys (with corresponding data):

port_handle       Specifies the port from which to get statistics.

status               Success (1) or failure (0) of the operation.

The following statistics are Spirent Extension statistics:

hdlc_abort_count     Returns the number of aborted Packet over
                     SONET/SDH (POS) packets.
hdlc_drop_count      Returns the number of the dropped POS packets.
b1_error_count       Returns the number of the B1 BIP-8 errors that
                     have been detected
b2_error_count       Returns the number of theB2 BIP-8 errors that
                     have been detected
reil_count           Returns the Remote Error Indication number,
                     which is the number of the B2 errors received
                     the remote end.
b3_error_count       Returns the number of the B3 BIP-8 errors that
                     have been detected.
reip_count           Returns a REI error number, which is the number
                     of the B3 BIP-8 detected at the remote end
                     device.
hdlc_abort_rate      Returns the rate in error(s) of the aborted POS
                     packets.
hdlc_drop_rate       Returns the rate in error(s) of the dropped POS
                     packets.
b1_error_rate        Returns the ratio of B1 BIP-8 errors to the
                     number of bits in the SONET frame received
                     during the elapsed test time.
b2_error_rate        Returns the ratio of B2 BIP-8 errors to the
                     number of bits in the SONET frame received
                     during the elapsed test time.
reil_rate            Returns the ratio of REI errors to the number of
                     bits in the SONET frame (except for section
                     overhead) received during the elapsed test time.
b3_error_rate        Returns the number of the B3 BIP-8 errors that
                     have been detected.
reip_rate            Returns a REI error number, which is the number
                     of the B3 BIP-8 detected at the far end device.
active_alarms        Indicates the defects that local interface can
                     report. The alarms might be one or several of the
                     options below:  :

                      J0unst - J0 unstable alarm
                      Lof - section LOF alarm
                      Los - section LOS alarm
                      Oof - Out of Frame (OOF) alarm
                      Aisl - line AIS alarm
                      Rdil - line RDI alarm
                      Kchg - K1/K2 changed alarm
                      Kunst - K1/K2 unstable alarm
                      Aisp - path AIS alarm
                      Lopp - path LOP alarm
                      J1unst - J1 unstable alarm
                      Plmp - path PLM alarm
                      Rdip - path RDI alarm
                      Timp - path TIM alarm
                      Uneqp - path Unequipped alarm
                      -- - The "--" indicates no defects were detected.

The OC-xxx interfaces statistics and IPoATM alarm statistics defined in Cisco specification are not supported. The sth::alarms_stats command will return Spirent Extension return values as listed below:

****** OC-xxx interfaces statistics (Not supported) *****

section_unequip_secs          Section Unequipped seconds
section_unequip_free          Section Unequip non-errored %
section_los_secs              Section LOS seconds
section_los_free              Section LOS non-errored %
section_oof_secs             Section Out of Frame (OOF) seconds
section_oof_free             Section OOF non-errored %
section_lof_secs              Section LOF seconds
section_lof_free              Section LOF non-errored %
section_j0_oof_secs          Section J0 OOF seconds
section_j0_oof_free          Section J0 OOF non-errored %
section_noclock_secs         Section No Clock seconds
section_noclock_free         Section No Clock non-errored %
line_ais_secs               Line AIS seconds
line_ais_free               Line AIS non-errored %
line_rdi_secs               Line RDI seconds
line_rdi_free               Line RDI non-errored %
line_signal_degrade_secs     Line Signal Degrade seconds
line_signal_degrade_free     Line Signal Degrade non-errored %
line_signal_fail_secs          Line Signal Fail seconds
line_signal_fail_free          Line Signal Fail non-errored %
line_k1_unstable_secs          Line K1 Unstable seconds
line_k1_unstable_free          Line K1 Unstable non-errored %
line_k1_change_secs          Line K1 Change seconds
line_k1_change_free          Line K1 Change non-errored %
line_k2_change_secs          Line K2 Change seconds
line_k2_change_free          Line K2 Change non-errored %
line_s1_sync_secs            Line S1 Synchronous seconds
line_s1_sync_free            Line S1 Synchronous non-errored %
line_s1_fail_secs             Line S1 Fail seconds
line_s1_fail_free             Line S1 Fail non-errored %
path_ais_secs               Path AIS seconds
path_ais_free               Path AIS non-errored %
path_lop_secs               Path LOP seconds
path_lop_free               Path LOP non-errored %
path_rdi_secs               Path RDI seconds
path_rdi_free               Path RDI non-errored %
path_label_change_secs       Path Label change seconds
path_label_change_free       Path Label change non-errored %

***** IPoATM alarms (Not supported) *****

oocd_secs               Out-of-Cell delineation seconds
oocd_free               Out-of-Cell delineation non-errored %
locd_secs               Loss-of-Cell delineation seconds
locd_free               Loss-of-Cell delineation non-errored %

Description

The sth::alarms_stats function provides information about the SONET alarms.

This function returns the requested data and a status value (1 for success). If there is an error, the function returns the status value (0) and an error message. Function return values are formatted as a keyed list (supported by the Tcl extension software - TclX). Use the TclX function keylget to retrieve data from the keyed list. (See Return Values for a description of each key.)

Examples

Sample Input:

sth::alarms_stats -port_handle port1

Sample Output:

{port_handle port1} {reip_count 16} {b2_error_rate 0}
{hdlc_abort_count 0} {hdlc_drop_rate 0} {reip_rate 0}
{b1_error_count 17} {b2_error_count 46} {hdlc_abort_rate 0}
{b3_error_count 249284} {hdlc_drop_count 0} {b1_error_rate 0}
{b3_error_rate 15994}
{active_alarms {oof kchg rdip lopp los lof plmp timp}}
{reil_count 0} {reil_rate 0} {status 1}

Note

The OC-xxx interfaces statistics and IPoATM alarm statistics defined in Cisco’s specifications are not supported. The sth::alarms_stats command will return Spirent Extension return values.

The following return values are not supported by Spirent HLTAPI:

errored_secs
elapsed_time