Contents

Introduction

Prerequisites

Requirements

Components Used

Background Information

Counters

Event Levels

Logical-Type All, Core, and Edge

Use of Portguard

The Built-in Slowdrain Port-monitor Policy

NX-OS 4.2(7d) to 8.4(x) Slowdrain Policy

NX-OS 8.5(1) to 9.2(2) Slowdrain Policy

NX-OS 9.3(1) to 9.4(1a) (or Later) Slowdrain Policy

Configure

Sample Port-Monitor Policies

Separate Core and Edge Policies with no Portguard Actions (for NX-OS prior to 8.5(1)):

Single Policy with no Portguard Actions (for NX-OS prior to 8.5(1)):

Dual Core and Edge Policies with Portguard Actions (for NX-OS Prior to 8.5(1)):

Separate Core and Edge Policies with no Portguard Actions (for NX-OS 8.5(1) or 9.2(1) and Later):

Single Policy with no Portguard Actions (for NX-OS 8.5(1) or 9.2(1) and Later)

Dual Core and Edge Policies with Portguard Actions (for NX-OS 8.5(1) or 9.2(1) and Later)

Verify

Troubleshoot

Related Information

Introduction

This document describes the Multilayer Data Switch (MDS) port-monitor feature.

Prerequisites

Requirements

Cisco recommends that you have knowledge of these topics:

- Cisco Multilayer Data Switch (MDS)

- Fibre Channel protocol

Components Used

The information in this document is based on Multilayer Data Switch feature on Cisco MDS 9000 Series Multilayer Switches.

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.

Background Information

MDS port-monitor is a monitoring service that runs in MDS switches. It monitors 22 Fibre Channel (FC) counters(up from 17 starting in NX-OS 8.5(1)) and 2 system counters on MDS 9700 director switches. This article is updated to include the many enhancements made in NX-OS 8.5(1). This includes all NX-OS 9.x releases.

Theses are port-monitor features:

- Port-monitor is activated in policies.

- Port-monitor policy names are case sensitive.

- There are 3 types of policies available:

1. logical-type all — Covers all FC ports

2. logical-type core — Covers all core FC ports. These are ISLs and F ports to NPV switches.

3. logical-type edge — Covers all edge FC ports. These are F ports to end devices.

- Port-monitor monitors up to 22 individual counters

The definition of each counter contains these elements:

- Counter name

- poll-interval — The interval for which the warning-threshold and rising-threshold values are evaluated. As of 8.5(1), port-monitor has an 'early detection' feature where every second, regardless of the poll-interval, the counter delta value is checked against the warning-threshold and rising-threshold. If the delta value reaches or exceeds one of those thresholds then the configured alerts and port-guard action (if any) are immediately taken. Previously, this was only done at the end of the poll-interval. At the end of the poll-interval the current value of the counter still replaces the previous value of the counter to, in effect, start a new value for the delta calculations.

- Type — Counters are of two types:

1. Absolute — These match when the absolute value of the counter reaches or exceeds the rising-threshold value.

2. Delta — These match when the difference between the counter current value and the counter previous value(a.k.a the delta) reaches or exceeds the rising-threshold value. Most counters are 'delta' type counters.

- warning-threshold — The value the counter must reach or exceed to generate a warning-threshold alert

- Rising-threshold — The value the counter must reach or exceed to generate a rising-threshold alert

- Falling-threshold — The value the counter must reach or be less than to generate a falling-threshold alert

- Event - The severity of the alert. New in NX-OS 8.5(1) and 9.x only a single event can be specified. This simplifies configuration.

- Alerts — These are the types of alerts can can be generated. There can be none, one, or more than one of the next alerts for each counter specified:

1. none — Do not generate any alert

2. rmon — Generate rmon alert. This is an SNMP trap.

3. syslog — Generate an message to the syslog (logging logfile). New in NX-OS 8.5(1) and 9.x syslog messages contain the severity specified via the 'event' parameter in the counter.

4. obfl — Generate an entry to OBFL Onboard Failure Logging Buffer (show logging onboard datarate). Applies only to the four datarate counters (tx-datarate, tx-datarate-burst, rx-datarate, rx-datarate-burst)

- portguard action — (optional) Action to take when rising-threshold is reached. The next actions are available. Not all apply to all counters. Only one can be specified per counter:

1. dirl — Dynamic Ingress Rate Limit the port. New in NX-OS 8.5(1) and 9.x.

2. fpin — Notify fpm process about the event and generate Fabric Performace Impact Notification Extended Link Service frames. New in NX-OS 8.5(1) and 9.x.

3. cong-isolate — Isolate congested flow to a slow path.

4. cong-isolate-recover —  Isolate congested flow to a slow path and then de-isolate congested flow path. New in NX-OS 8.5(1) and 9.x.

5. errordisable — Error disable the port. Once a port is error disabled for any reason it must be manually 'shutdown' and 'no shutdown' to bring it back up again.

6. flap — Flap the port.

Port-monitor works on a rising-threshold and falling-threshold basis. When a counter reaches or exceeds the rising-threshold specified a rising-threshold alert is generated once. If the counter remains over the falling-threshold in subsequent polling intervals no further alerts are generated. Once the counter reaches a value that is less than the falling-threshold a falling-threshold alert is generated once. Consequently, the time of the event (or problem) is between the rising and falling thresholds.

Counters

Here are explanations of each counter and sample policies that can be used to get started.

These are descriptions of the counters that are included in the policy:

Note: Currently, as of NX-OS 9.4(1) port-monitor only monitors FC ports. There is no monitoring for Ethernet, Virtual Fibre Channel (VFC), or Fibre Channel over IP (FCIP) ports.

lr-rx

- Number of times a Link Reset (LR) was received.

- Applies to all MDS switches and FC modules.

lr-tx

- Number of times a LR was transmitted (lr-tx).

- Similar to credit-loss-reco counter.

- Applies to all MDS switches and FC modules.

credit-loss-reco

- Number of times credit loss recovery was initiated due to port at 0 Tx credits for 1(F port)/1.5(E port) seconds.

- Most severe indication of congestion.

- Normally other counters such as timeout-discards can also increment.

- Applies to all MDS switches and FC modules.

timeout-discards

- Number of packets dropped due to reaching the congestion-drop (timeout) threshold.

- Applies to all MDS switches and FC modules.

tx-credit-not-available

- Indicates 100ms intervals of a port at 0 Tx credits rising-threshold is configured as a percentage of polling-interval (one second). So 10 is 10% and means 100ms with a one second polling-internal.

- Applies to all MDS switches and FC modules.

tx-discards

- The number of packets dropped at egress for a variety of reasons. This counter would include timeout-drops as well.

- Applies to all MDS switches and FC modules.

slowport-count

- Counts the number of times the slowport-monitor threshold was reached.

- Only applies to MDS 9500 with Generation 3 linecards:

- 1/2/4/8 Gbps 24-Port Fibre Channel switching module (DS-X9224-96K9)

- 1/2/4/8 Gbps 48-Port Fibre Channel switching module (DS-X9248-96K9)

- 1/2/4/8 Gbps 4/44-Port Fibre Channel switching module (DS-X9248-48K9)

- Only counts a maximum of once per 100ms interval (ten per second).

- Indicates 0 Tx credits for at least the slowport-monitor interval system.

- The timeout slowport-monitor must be configured for this to alert.

slowport-oper-delay

- Alerts on slowport operational (actual) delay.

- Only applies to these:

- MDS 9500 with Generation 4 linecards

- MDS 9000 Family 32-Port 8-Gbps Advanced Fibre Channel Switching Module (DS-X9232-256K9)

- MDS 9000 Family 48-Port 8-Gbps Advanced Fibre Channel Switching Module (DS-X9248-256K9)

- MDS 9700 48-Port 16-Gbps Fibre Channel Switching Module (DS-X9448-768K9)

- MDS 9700 Family 24/10 SAN Extension Module (DS-X9334-K9) - FC ports only

- MDS 9700 48-Port 32-Gbps Fibre Channel Switching Module (DS-X9648-1536K9)

- MDS 9148S 16G Multilayer Fabric Switch

- MDS 9250i Multiservice Fabric Switch

- MDS 9396S 16G Multilayer Fabric Switch

- MDS 9132T 32-Gbps 32-Port Fibre Channel Switch

- MDS 9148T 32-Gbps 48-Port Fibre Channel Switch

- MDS 9396T 32-Gbps 96-Port Fibre Channel Switch

- MDS 9124V 64-Gbps 24-Port Fibre Channel Switch

- MDS 9148V 64-Gbps 48-Port Fibre Channel Switch

- MDS 9396V 64-Gbps 96-Port Fibre Channel Switch

- MDS 9220i Multiservice Fabric Switch

- Alerts on operational (actual) delay not on the admin (configured) delay.

- System timeout slowport-monitor must also be configured or this never alerts.

txwait

- Measures time port is at 0 Tx credits and frames are queued to send.

- Configured as a percentage of the polling interval. So 40 is 40% and with a polling-interval of one second represents 400ms of total Txwait in the one second interval.

- Only applies to these:

- MDS 9500 with Generation 4 linecards

- MDS 9000 Family 32-Port 8-Gbps Advanced Fibre Channel Switching Module (DS-X9232-256K9)

- MDS 9000 Family 48-Port 8-Gbps Advanced Fibre Channel Switching Module (DS-X9248-256K9)

- MDS 9700 48-Port 16-Gbps Fibre Channel Switching Module (DS-X9448-768K9)

- MDS 9700 Family 24/10 SAN Extension Module (DS-X9334-K9) - FC ports only

- MDS 9700 48-Port 32-Gbps Fibre Channel Switching Module (DS-X9648-1536K9)

- MDS 9148S 16G Multilayer Fabric Switch

- MDS 9250i Multiservice Fabric Switch

- MDS 9396S 16G Multilayer Fabric Switch

- MDS 9132T 32-Gbps 32-Port Fibre Channel Switch

- MDS 9148T 32-Gbps 48-Port Fibre Channel Switch

- MDS 9396T 32-Gbps 96-Port Fibre Channel Switch

- MDS 9124V 64-Gbps 24-Port Fibre Channel Switch

- MDS 9148V 64-Gbps 48-Port Fibre Channel Switch

- MDS 9396V 64-Gbps 96-Port Fibre Channel Switch

- MDS 9220i Multiservice Fabric Switch

tx-datarate

- Measures the actual tx-datarate as a percentage of operational link speed. It compares the number of bytes (octets) transmitted over the polling-interval. Then, that delta number of bytes is compared against the operational (actual) link speed and a percentage is calculated. This is an average utilization over the polling-interval. This counter is essential in order to determine the causes of over utilization where ports request more data than can be immediately transmitted on the link. Over utilization can cause a slow drain-like backup in the fabric.

- Configure the polling-internal as 10 seconds, the rising-threshold as 80% and the falling-threshold as 70%-79% to get the best indication of when the port operates in the highly utilized range.

- Applies to all MDS switches and FC modules.

rx-datarate

- Measures the actual rx-datarate as a percentage of operational link speed. It compares the number of bytes (octets) received over the polling-interval. Then, that delta number of bytes is compared against the operational (actual) link speed and a percentage is calculated. This is an average utilization over the polling-interval. This counter can be used when FC ports are connected to other types of switches that do not have the port-monitor tx-datarate feature (like UCS Fabric Interconnects or Nexus 5000/6000). It can help determine over utilization where ports request more data than can be immediately transmitted on the link. Over utilization can cause a slow drain-like backup in the fabric.

- Configure the polling-internal as 10 seconds, the rising-threshold as 80%, and the falling-threshold as 79% to get the best indication of when the port operates in the highly utilized range.

- Applies to all MDS switches and FC modules.

err-pkt-from-port

- This counter increments if the port receives a good Cyclical Redundancy Checked (CRCed) frame, but corrupts it internally in the FC port ASIC. This is an internal CRC drop.

- Only applies to MDS 9500 with Generation 3 and 4 linecards.

err-pkt-to-xbar

- This counter increments if the port receives a good CRCed frame, but corrupts it prior to transmission to the module Crossbar (XBAR) ASIC. This is an "internal CRC" drop.

- Both the err-pkt-to-xbar and err-pkt-from-xbar counters are non-standard port-monitor counters.

- Not included by default in any policy.

- Needs to be configured in at most one policy. Regardless of the port-type or logical-type, when these two counters are configured in one policy they turn on these for all FC ports in the switch.

- Do not apply to edge or core specifically, but all ports/linecards.

- Check-interval does not function for these XBAR counters.

- Non-standard processing:

- Every 10 (non-configurable) seconds the counters' values are obtained for each FC ASIC on each module.

- If the counter has increased by any value, then port monitor increments its internal err-pkt-to/from-xbar counter by one for that specific FC ASIC.

- The counter would have to increase for a specific FC ASIC to a value that equals or exceeds the configured rising threshold in the configured poll-interval time for it to trigger a rising threshold alert.

- Portguard cannot be configured for these two counters.

- Only applies to these switches:

- MDS 9500 (all FC modules)

- MDS 9700 (all FC modules)

err-pkt-from-xbar

- This counter increments if the module XBAR ASIC port receives a corrupted frame from the central XBAR. This is an internal CRC drop.

- These are non-standard port-monitor counters. See the err-pkt-to-xbar counter for more details.

- Only applies to these switches:

- MDS 9500 (all FC modules)

- MDS 9700 (all FC modules)

link-loss

- This counter increments when a FC port fails.

- Applies to all MDS switches and FC modules.

sync-loss

- This counter increments when a FC port fails due to a loss of synchronization.

- Applies to all MDS switches and FC modules.

signal-loss

- This counter increments when a FC port fails due to a loss of signal.

- Applies to all MDS switches and FC modules.

invalid-words

- This counter increments when a FC port receives bad FC words. These are words that fail the encoding check.

- Applies to all MDS switches and FC modules.

invalid-crc

- This counter increments when a FC port receives bad frames. These are frames that fail the CRC check when received on a FC interface.

- Applies to all MDS switches and FC modules.

These counters are new in NX-OS 8.5(1) and 9.x:

tx-datarate-burst

- Measures high Tx utilization in 1 second bursts leading to congestion

- Configured as the number of 1 second bursts in a polling interval at a Tx utilization percentage

rx-datarate-burst

- Measures high Rx utilization in 1 second bursts leading to congestion on the adjacent device

- Configured as the number of 1 second bursts in a polling interval at a Rx utilization percentage

input-errors

- Alerts when non-specific input errors occur on a port

- Some errors are not strictly speaking Invalid CRCs

- Examples:

- Too short

- Too long

- Missing/corrupt CRC

- Delimitor Error/Fragmented

- Applies to all MDS switches and FC modules.

- Introduced in NX-OS 8.5(1)

sfp-rx-power-low-warn

- Alerts on SFP Rx Power Low Warning threshold

- Polling internal must be in multiples of 600 seconds(10 minutes)

- At most 1 event can occur in 600 seconds

- Percentage specifies the percentage of the actual SFP low Rx Warning threshold. This is SFP type/manufacturer specific.

- 100% — Equal to SFP low Rx Warning threshold.

- > 100% — Less than SFP low Rx Warning threshold (between Low Warning and Alarm thresholds). Percentage values less than 100% give an early warning

- < 100% — Greater than SFP low Rx Warning threshold (between Low Warning and Normal thresholds)

- Applies to all MDS switches and FC modules.

- Introduced in NX-OS 8.5(1)

sfp-tx-power-low-warn

- Alerts on SFP Tx Power Low Warning threshold

- Similar in function to sfp-rx-power-low-warn but for Tx Power

- Percentage specifies the percentage of the actual SFP low Tx Warning threshold. This is SFP type/manufacturer specific.

- 100% — Equal to SFP low Tx Warning threshold

- > 100% — Less than SFP low Tx Warning threshold (between Low Warning and Alarm thresholds). Percentage values less than 100% give an early warning.

- < 100% — Greater than SFP low Tx Warning threshold (between Low Warning and Normal thresholds)

- Applies to all MDS switches and FC modules.

- Introduced in NX-OS 8.5(1)

Note: The err-pkt-* counters are for internal CRC detection and can only be specified on one policy, regardless of the policy port-type or logical-type.

In order to have the MDS 9700 take automatic action when it detects internal CRC drops, the hardware fabric crc threshold <xxx> command can be used. For more information, consult this documentation:

- Cisco MDS 9000 Series High Availability Configuration Guide, Release 8.x - High Availability Overview - Internal CRC Detection and Isolation

- Cisco MDS 9000 Series High Availability Configuration Guide, Release 8.x - Configuring Internal CRC Detection and Isolation

Event Levels

These are the default rmon event levels in the switch:

rmon event 1 log trap public description FATAL(1) owner PMON@FATAL

rmon event 2 log trap public description CRITICAL(2) owner PMON@CRITICAL

rmon event 3 log trap public description ERROR(3) owner PMON@ERROR

rmon event 4 log trap public description WARNING(4) owner PMON@WARNING

rmon event 5 log trap public description INFORMATION(5) owner PMON@INFO

These correspond to the event x values in these port-monitor counter definitions. The counters are categorized with the event severity values:

- Fatal — None of the port monitor counters describe fatal type errors, so this event level must not be used.

- Critical — Use this level for counters that can indicate a failure of a link.

- link-loss, sync-loss, and signal-loss all indicate link failures. These are very similar to each other and one or more could be deleted. These can be classified as warning on logical-type edge policies because, for example, they can occur under normal circumstances when a server reboots.

- lr-rx, lr-tx and credit-loss-reco, these are the most serious slow drain indications.

- Also, can be used when any portguard action is taken.

- Error — Use this level for counters that indicate packet/frame loss.

- invalid — words, invalid-crc, tx-discards, and timeout-discards.

- Warning — Use this level for counters that indicate delay/slowness

- All other counters which typically just indicate some delay.

Note: Differentiation of event levels by severity give a visual distinction to the alerts as viewed in DCNM. It is highly recommended.

Logical-Type All, Core, and Edge

Ports are classified as either logical-type core or logical-type edge.

- Logical-type core ports include Inter-Switch Link Protocol (ISLs) (E, TE) ports as well as F ports which connect to/from NPV switches (F, Tf, NP, TNP) since these function similarly to ISLs.

- Logical-type edge ports must only include ports connected to actual end devices (F ports).

You can check a port classification via the show interface or the show interface brief commands:

MDS9710-1# show interface fc9/1

fc9/1 is trunking

Port description is ISL to F241-15-10-9706-2 fc6/1

Hardware is Fibre Channel, SFP is long wave laser cost reduced

Port WWN is 22:01:54:7f:ee:ea:6f:00

Peer port WWN is 21:41:00:2a:6a:a4:b2:80

Admin port mode is auto, trunk mode is on

snmp link state traps are enabled

Port mode is TE

Port vsan is 1

Admin Speed is auto max 32 Gbps

Operating Speed is 32 Gbps

Rate mode is dedicated

Port flow-control is R_RDY

Transmit B2B Credit is 500

Receive B2B Credit is 500

B2B State Change Number is 14

Receive data field Size is 2112

Beacon is turned off

fec is enabled by default

Logical type is core

Trunk vsans (admin allowed and active) (1-2,100,209,237-238,802,2237)

Trunk vsans (up)                       (1,100,209,237)

Trunk vsans (isolated)                 (2,238,802,2237)

Trunk vsans (initializing)             ()

5 minutes input rate 1184 bits/sec,148 bytes/sec, 1 frames/sec

5 minutes output rate 768 bits/sec,96 bytes/sec, 1 frames/sec

14079 frames input,1229484 bytes

0 discards,0 errors

0 invalid CRC/FCS,0 unknown class

0 too long,0 too short

14079 frames output,764364 bytes

0 discards,0 errors

0 input OLS,0  LRR,0 NOS,0 loop inits

0 output OLS,0 LRR, 0 NOS, 0 loop inits

500 receive B2B credit remaining

500 transmit B2B credit remaining

500 low priority transmit B2B credit remaining

Interface last changed at Tue Mar 27 16:26:56 2018

Last clearing of "show interface" counters :  never

MDS9710-1#

MDS9710-1# show interface brief

-----------------------------------------------------------------------------------------

Interface  Vsan   Admin  Admin   Status       SFP    Oper  Oper   Port     Logical

Mode   Trunk                       Mode  Speed  Channel   Type

Mode                              (Gbps)

-----------------------------------------------------------------------------------------

fc1/1       1      auto   on      sfpAbsent    --     --    --     --       --

...snip

fc1/8       1      E      auto    trunking     swl   TE     16     149      core

...snip

fc9/15      1      auto   on      sfpAbsent    --     --    --     --       --

fc9/16      1      auto   off     up           swl   F      4      --       edge

fc9/17      237    auto   off     up           swl   F      4      --       edge

In general, you must not use portguard with slow drain type counters (txwait, timeout-discards, credit-loss-reco, tx-credit-not-available, and so on) on logical-type core ports. This is because the problem is not normally on these ports, but on the actual edge (F) ports where the end devices are connected. If portguard is done on core ports for slow drain type counters, then typically all of the ports in the port-channel (E or F) end up getting errordisabled or flapped. This is because the MDS loads balance all exchanges across all port-channel members and as a result, all the member ports can be affected.

These examples are the new logical-type specification which is available on NX-OS 8.1(1). Prior to 8.1(1), port-type access|trunk must be used.

Note: counter tx-slowport-count is only available on MDS 9500s. It is not included in these policies.

Use of Portguard

The portguard feature is a very powerful feature to enable the switch to automatically handle certain error conditions. Consider these points:

- Link failure type counters (Link-loss, sync-loss, signal-loss,invalid-words) are counters where portguard errordisable can and must be used. A port that flaps or bounces causes many problems in a SAN. Error disabling the port after 3 or so link failures in a 60 second interval must be considered a best practice. If it is a logical-type core port (ISL< link to NPV switch) then almost always there is physical redundancy with multiple links in a port-channel (or even not in a port-channel) so error disabling a single port must not cause any issues. For a logical-type edge port, error disabling the port allows the multi-pathing software on the host to behave correctly and switch the IO to other functioning paths.

- For the congestion related counters(TxWait, Tx-datarate, Tx-datarate-burst, credit-loss-reco, timeout-discards, tx-credit-not-available, tx-slowport-count) portguard must not specified for logical-type core ports. This is because these core ports typically just reflect the congestion caused by other logical-type edge ports on the adjacent switch. They are almost always not the actual cause of congestion. For the congestion related counters on logical-type edge ports, it is OK to specify portguard errordisable for the more severe counters like credit-loss-reco, timeout-discards. It could also be OK for counters like TxWait and tx-credit-not-available if the rising-threshold values are set high.

- Congestion mitigation portgaurd actions can only be specified for certain counter names:

- DIRL — Initiate Dynamic Ingress Rate Limiting

- TxWait

- Tx-datarate

- Tx-datarate-burst

FPIN — Initiate Fabric Performance Impact Notifications

- Congestion

- Link-loss

- sync-loss

- signal-loss

- invalid-words

- invalid-crc

- txwait

cong-isolate-recover — Congestion Isolation with automatic recovery

- credit-loss-reco

- tx-credit-not-available

- tx-slowport-oper-delay

- txwait

The Built-in Slowdrain Port-monitor Policy

Starting many years ago Cisco introduced a pre-built into NX-OS port-monitor policy called slowdrain.  This policy has minimal counters and is only for logical-type edge ports. It has changed over the last couple of years to accommodate congestion troubleshooting. This policy cannot be modified.

NX-OS 4.2(7d) to 8.4(x) Slowdrain Policy

F241-16-10-9132T-1# show port-monitor slowdrain

Policy Name : slowdrain

Admin status : Active

Oper status : Active

Port type : All Edge Ports

-------------------------------------------------------- ----------------------------------------------------------------------

Counter                 Threshold Interval Rising Threshold event Falling Threshold  event Warning Threshold PMON Portguard

-------                 --------- -------- ---------------- ----- ------------------ ----- --------------------- --------------

Credit Loss Reco        Delta     1        1                4     0                  4     Not enabled           Not enabled

TX Credit Not Available Delta     1        10%              4     0%                 4     Not enabled           Not enabled

-------------------------------------------------------- ----------------------------------------------------------------------

NX-OS 8.5(1) to 9.2(2) Slowdrain Policy

F241TS.14.09-9220i-1# show port-monitor slowdrain

Policy Name : slowdrain

Admin status : Active

Oper status : Active

Port type : All Edge Ports

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

|          Counter        | Threshold  | Interval |      Warning       | Thresholds                  |     Rising/Falling actions | Congestion-signal              |

|                         | Type       |  (Secs)  |--------------------|---------------------|-------------------------------------------------|-------------------|

|                         |            |          | Threshold | Alerts | Rising   | Falling  | Event |     Alerts       |     PortGuard        | Warning | Alarm   |

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

| Credit Loss Reco        | Delta      | 1        | none       | n/a   | 1        | 0        | 4        | syslog,rmon   | none                 | n/a      | n/a    |

| TX Credit Not Available | Delta      | 1        | none       | n/a   | 10%      | 0%       | 4        | syslog,rmon   | none                 | n/a      | n/a    |

| TX Datarate             | Delta      | 10       | none       | n/a   | 80%      | 70%      | 4        | syslog,obfl   | none                 | n/a      | n/a    |

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

NX-OS 9.3(1) to 9.4(1a) (or Later) Slowdrain Policy

F241-15-09-9710-1# show port-monitor slowdrain

Policy Name : slowdrain

Admin status : Active

Oper status : Active

Port type : All Edge Ports

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

|          Counter        | Threshold  | Interval |      Warning       | Thresholds                  |     Rising/Falling actions | Congestion-signal              |

|                         | Type       |  (Secs)  |--------------------|---------------------|-------------------------------------------------|-------------------|

|                         |            |          | Threshold | Alerts | Rising   | Falling  | Event |     Alerts       |     PortGuard        | Warning | Alarm   |

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

| Credit Loss Reco        | Delta      | 1        | none       | n/a   | 1        | 0        | 4        | syslog,rmon   | none                 | n/a      | n/a    |

| TX Credit Not Available | Delta      | 1        | none       | n/a   | 10%      | 0%       | 4        | syslog,rmon   | none                 | n/a      | n/a    |

| TX Datarate             | Delta      | 10       | none       | n/a   | 80%      | 70%      | 4        | syslog,obfl   | none                 | n/a      | n/a    |

| TXWait                  | Delta      | 1        | none       | n/a   | 30%      | 10%      | 4        | syslog,rmon   | none                 | n/a      | n/a    |

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

Configure

Only an active policy can exist for each logical-type setting. That is, if logical-type all is configured in the policy then no other policies can be made active until that policy is deactivated. If a logical-type core or edge policy is configured, then another of the same logical-type cannot also be made active.

The poll-intervals are in seconds.

Several counters are configured as percentages of the polling interval. These are txwait, tx-credit-not-available, tx-datarate, and rx-datarate. For example, with txwait, if a value of 10 is configured with a polling-interval of 1 (second) then it is 10% of 1 second which is 100ms. If there is a total txwait accumulation of 100ms over the 1 second polling-interval then txwait can alert.

Sample Port-Monitor Policies

Separate Core and Edge Policies with no Portguard Actions (for NX-OS prior to 8.5(1)):

This policy alerts under the next conditions:

1. There are 3 or more link-loss, sync-loss, signal-loss events in a 60 second period.

2. There are 5 or more invalid-words (ITWs) or invalid-crcs in a 60 second period.

3. There are 100 or more timeout drops events in a 60 second period.

4. There are 5 or more Link Reset transmitted or received events in a 60 second period.

5. There are 1 or more credit-loss-recovery events in a 60 second period.

6. There are 10 or more 100ms Tx-credit-not-available events in a 60 second period.

7. The average Tx-datarate is 80% or more in a 10 second interval.

8. There are 3 or more internal CRC errors sent or received from the XBARs (fabric modules).

9. There are instances of 80ms or more of zero credits (tx-slowport-oper-delay)

10. There are instances of txwait greater than or equal to 30% in one second. This amounts to 30ms.

Note: The two policies are similar except the logical-type core policy has somewhat higher thresholds

port-monitor name CorePorts

logical-type core

counter link-loss poll-interval 60 delta rising-threshold 3 event 2 falling-threshold 0 event 2

counter sync-loss poll-interval 60 delta rising-threshold 3 event 2 falling-threshold 0 event 2

counter signal-loss poll-interval 60 delta rising-threshold 3 event 2 falling-threshold 0 event 2

counter invalid-words poll-interval 60 delta rising-threshold 5 event 3 falling-threshold 0 event 3

counter invalid-crc poll-interval 60 delta rising-threshold 5 event 3 falling-threshold 0 event 3

counter tx-discards poll-interval 60 delta rising-threshold 100 event 3 falling-threshold 10 event 3

counter lr-rx poll-interval 60 delta rising-threshold 5 event 2 falling-threshold 1 event 2

counter lr-tx poll-interval 60 delta rising-threshold 5 event 2 falling-threshold 1 event 2

counter timeout-discards poll-interval 60 delta rising-threshold 100 event 3 falling-threshold 10 event 3

counter credit-loss-reco poll-interval 60 delta rising-threshold 1 event 2 falling-threshold 0 event 2

counter tx-credit-not-available poll-interval 1 delta rising-threshold 10 event 4 falling-threshold 0 event 4

counter tx-datarate poll-interval 10 delta rising-threshold 80 event 4 falling-threshold 70 event 4

counter err-pkt-to-xbar poll-interval 300 delta rising-threshold 3 event 3 falling-threshold 0 event 3

counter err-pkt-from-xbar poll-interval 300 delta rising-threshold 3 event 3 falling-threshold 0 event 3

counter tx-slowport-oper-delay poll-interval 1 absolute rising-threshold 80 event 4 falling-threshold 0 event 4

counter txwait poll-interval 1 delta rising-threshold 20 event 4 falling-threshold 0 event 4

monitor counter err-pkt-to-xbar

monitor counter err-pkt-from-xbar

no monitor counter err-pkt-from-port

no monitor counter state-change

no monitor counter rx-datarate

port-monitor activate CorePorts

port-monitor name EdgePorts

logical-type edge

counter link-loss poll-interval 60 delta rising-threshold 3 event 4 falling-threshold 0 event 4

counter sync-loss poll-interval 60 delta rising-threshold 3 event 4 falling-threshold 0 event 4

counter signal-loss poll-interval 60 delta rising-threshold 3 event 4 falling-threshold 0 event 4

counter invalid-words poll-interval 60 delta rising-threshold 5 event 3 falling-threshold 0 event 3

counter invalid-crc poll-interval 60 delta rising-threshold 5 event 3 falling-threshold 0 event 3

counter tx-discards poll-interval 60 delta rising-threshold 50 event 3 falling-threshold 10 event 3

counter lr-rx poll-interval 60 delta rising-threshold 5 event 2 falling-threshold 1 event 2

counter lr-tx poll-interval 60 delta rising-threshold 5 event 2 falling-threshold 1 event 2

counter timeout-discards poll-interval 60 delta rising-threshold 50 event 3 falling-threshold 10 event 3

counter credit-loss-reco poll-interval 60 delta rising-threshold 4 event 2 falling-threshold 0 event 2

counter tx-credit-not-available poll-interval 1 delta rising-threshold 10 event 4 falling-threshold 0 event 4

counter tx-datarate poll-interval 10 delta rising-threshold 80 event 4 falling-threshold 79 event 4

counter tx-slowport-oper-delay poll-interval 1 absolute rising-threshold 50 event 4 falling-threshold 0 event 4

counter txwait poll-interval 1 delta rising-threshold 20 event 4 falling-threshold 0 event 4

no monitor counter err-pkt-from-port

no monitor counter err-pkt-to-xbar

no monitor counter err-pkt-from-xbar

no monitor counter state-change

no monitor counter rx-datarate

port-monitor activate EdgePorts

Single Policy with no Portguard Actions (for NX-OS prior to 8.5(1)):

Note: Invalid-words are not necessarily needed since the MDS monitors all ports for bit errors but it is included to ensure it is covered.

port-monitor name AllPorts

logical-type all

counter link-loss poll-interval 60 delta rising-threshold 3 event 4 falling-threshold 0 event 4

counter sync-loss poll-interval 60 delta rising-threshold 3 event 4 falling-threshold 0 event 4

counter signal-loss poll-interval 60 delta rising-threshold 3 event 4 falling-threshold 0 event 4

counter invalid-words poll-interval 60 delta rising-threshold 5 event 3 falling-threshold 1 event 3

counter invalid-crc poll-interval 60 delta rising-threshold 5 event 3 falling-threshold 0 event 3

counter tx-discards poll-interval 60 delta rising-threshold 50 event 3 falling-threshold 10 event 3

counter lr-rx poll-interval 60 delta rising-threshold 5 event 2 falling-threshold 1 event 2

counter lr-tx poll-interval 60 delta rising-threshold 5 event 2 falling-threshold 1 event 2

counter timeout-discards poll-interval 60 delta rising-threshold 50 event 3 falling-threshold 10 event 3

counter credit-loss-reco poll-interval 60 delta rising-threshold 1 event 2 falling-threshold 0 event 2

counter tx-credit-not-available poll-interval 1 delta rising-threshold 10 event 4 falling-threshold 0 event 4

counter tx-datarate poll-interval 10 delta rising-threshold 80 event 4 falling-threshold 70 event 4

counter err-pkt-to-xbar poll-interval 300 delta rising-threshold 3 event 3 falling-threshold 0 event 3

counter err-pkt-from-xbar poll-interval 300 delta rising-threshold 3 event 3 falling-threshold 0 event 3

counter tx-slowport-oper-delay poll-interval 1 absolute rising-threshold 80 event 4 falling-threshold 0 event 4

counter txwait poll-interval 1 delta rising-threshold 10 event 4 falling-threshold 0 event 4

monitor counter err-pkt-to-xbar

monitor counter err-pkt-from-xbar

no monitor counter err-pkt-from-port

no monitor counter state-change

no monitor counter rx-datarate

port-monitor activate AllPorts

Dual Core and Edge Policies with Portguard Actions (for NX-OS Prior to 8.5(1)):

Ports can be shut down (error disabled) or flapped upon reaching the rising-threshold via the portguard errordisable | flap parameter. This can be used for both ISLs and F port connections to N-Port Virtualizer (NPV) switches (logical-type core) as well as regular end device F ports (logical-type edge). However, if it is desired to take a portguard action for a counter related to slow drain, then that must normally only be done on a logical-type edge policy.

The logical-type core policy is the same as the previous CorePorts policy except it can error-disable the port for these next conditions:

1. There are 4 or more link failures(link-loss, sync-loss, signal-loss)  in a 60 second interval

2. There are are 10 or more invalid CRC frames received in a 60 second interval.

3. There are are 10 or more invalid words(ITWs) received in a 60 second interval.

Because the ports are shutdown (error disabled), the event level has been raised from 4 (warning) to 2 (error) on any port with  portguard errordisable :

port-monitor name CorePorts_w_Portguard

logical-type core

counter link-loss poll-interval 60 delta rising-threshold 4 event 2 falling-threshold 0 event 2 portguard errordisable

counter sync-loss poll-interval 60 delta rising-threshold 4 event 2 falling-threshold 0 event 2 portguard errordisable

counter signal-loss poll-interval 60 delta rising-threshold 4 event 2 falling-threshold 0 event 2 portguard errordisable

counter invalid-words poll-interval 60 delta rising-threshold 5 event 2 falling-threshold 1 event 3 portguard errordisable

counter invalid-crc poll-interval 60 delta rising-threshold 10 event 2 falling-threshold 0 event 3 portguard errordisable

counter tx-discards poll-interval 60 delta rising-threshold 100 event 3 falling-threshold 10 event 3

counter lr-rx poll-interval 60 delta rising-threshold 5 event 2 falling-threshold 1 event 2

counter lr-tx poll-interval 60 delta rising-threshold 5 event 2 falling-threshold 1 event 2

counter timeout-discards poll-interval 60 delta rising-threshold 100 event 3 falling-threshold 10 event 3

counter credit-loss-reco poll-interval 60 delta rising-threshold 1 event 2 falling-threshold 0 event 2

counter tx-credit-not-available poll-interval 1 delta rising-threshold 10 event 4 falling-threshold 0 event 4

counter tx-datarate poll-interval 10 delta rising-threshold 80 event 4 falling-threshold 70 event 4

counter err-pkt-to-xbar poll-interval 300 delta rising-threshold 3 event 3 falling-threshold 0 event 3

counter err-pkt-from-xbar poll-interval 300 delta rising-threshold 3 event 3 falling-threshold 0 event 3

counter tx-slowport-oper-delay poll-interval 1 absolute rising-threshold 80 event 4 falling-threshold 0 event 4

counter txwait poll-interval 1 delta rising-threshold 20 event 4 falling-threshold 0 event 4

monitor counter err-pkt-to-xbar

monitor counter err-pkt-from-xbar

no monitor counter err-pkt-from-port

no monitor counter state-change

no monitor counter rx-datarate

port-monitor activate CorePorts_w_portguard

The logical-type edge policy is the same as the previous EdgePorts policy except it can  errordisable  a port under these conditions:

1. There are 4 or more link failures in a 60 second interval.

2. There are 10 or more invalid CRC frames received in a 60 second interval.

3. There are 10 or more invalid words in a 60 second interval.

4. There are 50 or more transmit (Tx) discards, for any reason, in a 60 second interval.

5. There are 50 or more timeout discards, in a 60 second interval. This is where the switch has been unable to transmit a received frame within the congestion-drop threshold (default 500ms).

6. There are 4 or more instances of Credit Loss Recovery in a 60 second interval. This is where a F port is a zero Tx credits for one full second.

Because the ports are shutdown (error disabled), the event level has been raised from 4 (warning) to 2 (error) on any port with  portguard errordisable  :

port-monitor name EdgePorts_w_Portguard

logical-type edge

counter link-loss poll-interval 60 delta rising-threshold 6 event 2 falling-threshold 0 event 2 portguard errordisable

counter sync-loss poll-interval 60 delta rising-threshold 6 event 2 falling-threshold 0 event 2 portguard errordisable

counter signal-loss poll-interval 60 delta rising-threshold 6 event 2 falling-threshold 0 event 2 portguard errordisable

counter invalid-crc poll-interval 60 delta rising-threshold 5 event 2 falling-threshold 0 event 3 portguard errordisable

counter invalid-words poll-interval 60 delta rising-threshold 5 event 2 falling-threshold 0 event 3 portguard errordisable

counter tx-discards poll-interval 60 delta rising-threshold 50 event 2 falling-threshold 10 event 3 portguard errordisable

counter lr-rx poll-interval 60 delta rising-threshold 5 event 2 falling-threshold 1 event 2

counter lr-tx poll-interval 60 delta rising-threshold 5 event 2 falling-threshold 1 event 2

counter timeout-discards poll-interval 60 delta rising-threshold 50 event 2 falling-threshold 10 event 3 portguard errordisable

counter credit-loss-reco poll-interval 60 delta rising-threshold 4 event 2 falling-threshold 0 event 2 portguard errordisable

counter tx-credit-not-available poll-interval 1 delta rising-threshold 10 event 4 falling-threshold 0 event 4

counter tx-datarate poll-interval 10 delta rising-threshold 80 event 4 falling-threshold 70 event 4

counter tx-slowport-oper-delay poll-interval 1 absolute rising-threshold 50 event 4 falling-threshold 0 event 4

counter txwait poll-interval 1 delta rising-threshold 20 event 4 falling-threshold 0 event 4

no monitor counter err-pkt-from-port

no monitor counter err-pkt-to-xbar

no monitor counter err-pkt-from-xbar

no monitor counter state-change

no monitor counter rx-datarate

port-monitor activate EdgePorts_w_Portguard

Separate Core and Edge Policies with no Portguard Actions (for NX-OS 8.5(1) or 9.2(1) and Later):

These policies are the same as the previous pre NX-OS 8.5(1) policies except they include the next policies as well.

New counters monitored:

1. input-errors — This would can alert when there are 5 or more input errors in a 60 second interval.

2. sfp-tx-power-low-warn — This can alert every 10 minutes when the transceiver Tx power is 80% of the Tx power low warning threshold.

3. sfp-rx-power-low-warn — This can alert every 10 minutes when the transceiver Rx power is 80% of the Tx power low warning threshold.

4. tx-datarate-burst — This counter can alert when there are 5 x 1 second intervals when the Tx datarate is 90% or more.

5. rx-datarate-burst — This counter can alert when there are 5 x 1 second intervals when the Rx datarate is 90% or more.

port-monitor name CorePorts

logical-type core

counter link-loss poll-interval 60 delta rising-threshold 3 event 2 falling-threshold 0 event 4 alerts syslog rmon

counter sync-loss poll-interval 60 delta rising-threshold 3 event 2 falling-threshold 0 event 4 alerts syslog rmon

counter signal-loss poll-interval 60 delta rising-threshold 3 event 2 falling-threshold 0 event 4 alerts syslog rmon

counter invalid-words poll-interval 60 delta rising-threshold 5 event 3 falling-threshold 0 event 4 alerts syslog rmon

counter invalid-crc poll-interval 60 delta rising-threshold 5 event 3 falling-threshold 0 event 4 alerts syslog rmon

no monitor counter state-change

counter tx-discards poll-interval 60 delta rising-threshold 100 event 3 falling-threshold 10 event 4 alerts syslog rmon

counter lr-rx poll-interval 60 delta rising-threshold 5 event 2 falling-threshold 1 event 4 alerts syslog rmon

counter lr-tx poll-interval 60 delta rising-threshold 5 event 2 falling-threshold 1 event 4 alerts syslog rmon

counter timeout-discards poll-interval 60 delta rising-threshold 100 event 3 falling-threshold 10 event 4 alerts syslog rmon

counter credit-loss-reco poll-interval 60 delta rising-threshold 1 event 2 falling-threshold 0 event 4 alerts syslog rmon

counter tx-credit-not-available poll-interval 1 delta rising-threshold 10 event 4 falling-threshold 0 event 4 alerts syslog rmon

no monitor counter rx-datarate

counter tx-datarate poll-interval 10 delta rising-threshold 80 event 4 falling-threshold 70 event 4 alerts syslog rmon obfl

no monitor counter err-pkt-from-port

monitor counter err-pkt-to-xbar

counter err-pkt-to-xbar poll-interval 300 delta rising-threshold 5 event 4 falling-threshold 0 event 4 alerts syslog rmon

monitor counter err-pkt-from-xbar

counter err-pkt-from-xbar poll-interval 300 delta rising-threshold 5 event 4 falling-threshold 0 event 4 alerts syslog rmon

counter tx-slowport-oper-delay poll-interval 1 absolute rising-threshold 80 event 4 falling-threshold 0 event 4 alerts syslog rmon

counter txwait poll-interval 1 delta rising-threshold 20 event 4 falling-threshold 0 event 4 alerts syslog rmon

monitor counter sfp-tx-power-low-warn

counter sfp-tx-power-low-warn poll-interval 600 delta rising-threshold 1 event 4 falling-threshold 0 event 4 alerts syslog rmon percentage 80

monitor counter sfp-rx-power-low-warn

counter sfp-rx-power-low-warn poll-interval 600 delta rising-threshold 1 event 4 falling-threshold 0 event 4 alerts syslog rmon percentage 80

counter rx-datarate-burst poll-interval 10 delta rising-threshold 5 event 4 falling-threshold 1 event 4 alerts syslog rmon obfl datarate 90

counter tx-datarate-burst poll-interval 10 delta rising-threshold 5 event 4 falling-threshold 1 event 4 alerts syslog rmon obfl datarate 90

counter input-errors poll-interval 60 delta rising-threshold 5 event 4 falling-threshold 1 event 4 alerts syslog rmon

port-monitor name EdgePorts

logical-type edge

counter link-loss poll-interval 60 delta rising-threshold 3 event 4 falling-threshold 0 event 4 alerts syslog rmon

counter sync-loss poll-interval 60 delta rising-threshold 3 event 4 falling-threshold 0 event 4 alerts syslog rmon

counter signal-loss poll-interval 60 delta rising-threshold 3 event 4 falling-threshold 0 event 4 alerts syslog rmon

counter invalid-words poll-interval 60 delta rising-threshold 5 event 3 falling-threshold 0 event 4 alerts syslog rmon

counter invalid-crc poll-interval 60 delta rising-threshold 5 event 3 falling-threshold 0 event 4 alerts syslog rmon

no monitor counter state-change

counter tx-discards poll-interval 60 delta rising-threshold 50 event 3 falling-threshold 10 event 4 alerts syslog rmon

counter lr-rx poll-interval 60 delta rising-threshold 5 event 2 falling-threshold 1 event 4 alerts syslog rmon

counter lr-tx poll-interval 60 delta rising-threshold 5 event 2 falling-threshold 1 event 4 alerts syslog rmon

counter timeout-discards poll-interval 60 delta rising-threshold 50 event 3 falling-threshold 10 event 4 alerts syslog rmon

counter credit-loss-reco poll-interval 60 delta rising-threshold 4 event 2 falling-threshold 0 event 4 alerts syslog rmon

counter tx-credit-not-available poll-interval 1 delta rising-threshold 10 event 4 falling-threshold 0 event 4 alerts syslog rmon

no monitor counter rx-datarate

counter tx-datarate poll-interval 10 delta rising-threshold 80 event 4 falling-threshold 79 event 4 alerts syslog rmon obfl

no monitor counter err-pkt-from-port

no monitor counter err-pkt-to-xbar

no monitor counter err-pkt-from-xbar

counter tx-slowport-oper-delay poll-interval 1 absolute rising-threshold 50 event 4 falling-threshold 0 event 4 alerts syslog rmon

counter txwait poll-interval 1 delta rising-threshold 20 event 4 falling-threshold 0 event 4 alerts syslog rmon

monitor counter sfp-tx-power-low-warn

counter sfp-tx-power-low-warn poll-interval 600 delta rising-threshold 1 event 4 falling-threshold 0 event 4 alerts syslog rmon percentage 80

monitor counter sfp-rx-power-low-warn

counter sfp-rx-power-low-warn poll-interval 600 delta rising-threshold 1 event 4 falling-threshold 0 event 4 alerts syslog rmon percentage 80

counter rx-datarate-burst poll-interval 10 delta rising-threshold 5 event 4 falling-threshold 1 event 4 alerts syslog rmon obfl datarate 90

counter tx-datarate-burst poll-interval 10 delta rising-threshold 5 event 4 falling-threshold 1 event 4 alerts syslog rmon obfl datarate 90

counter input-errors poll-interval 60 delta rising-threshold 5 event 4 falling-threshold 1 event 4 alerts syslog rmon

port-monitor activate EdgePorts

Single Policy with no Portguard Actions (for NX-OS 8.5(1) or 9.2(1) and Later)

port-monitor name AllPorts

logical-type all

counter link-loss poll-interval 60 delta rising-threshold 3 event 4 falling-threshold 0 event 4 alerts syslog rmon

counter sync-loss poll-interval 60 delta rising-threshold 3 event 4 falling-threshold 0 event 4 alerts syslog rmon

counter signal-loss poll-interval 60 delta rising-threshold 3 event 4 falling-threshold 0 event 4 alerts syslog rmon

counter invalid-words poll-interval 60 delta rising-threshold 5 event 3 falling-threshold 1 event 4 alerts syslog rmon

counter invalid-crc poll-interval 60 delta rising-threshold 5 event 3 falling-threshold 0 event 4 alerts syslog rmon

no monitor counter state-change

counter tx-discards poll-interval 60 delta rising-threshold 50 event 3 falling-threshold 10 event 4 alerts syslog rmon

counter lr-rx poll-interval 60 delta rising-threshold 5 event 2 falling-threshold 1 event 4 alerts syslog rmon

counter lr-tx poll-interval 60 delta rising-threshold 5 event 2 falling-threshold 1 event 4 alerts syslog rmon

counter timeout-discards poll-interval 60 delta rising-threshold 50 event 3 falling-threshold 10 event 4 alerts syslog rmon

counter credit-loss-reco poll-interval 60 delta rising-threshold 1 event 2 falling-threshold 0 event 4 alerts syslog rmon

counter tx-credit-not-available poll-interval 1 delta rising-threshold 10 event 4 falling-threshold 0 event 4 alerts syslog rmon

no monitor counter rx-datarate

counter tx-datarate poll-interval 10 delta rising-threshold 80 event 4 falling-threshold 70 event 4 alerts syslog rmon obfl

no monitor counter err-pkt-from-port

monitor counter err-pkt-to-xbar

counter err-pkt-to-xbar poll-interval 300 delta rising-threshold 5 event 4 falling-threshold 0 event 4 alerts syslog rmon

monitor counter err-pkt-from-xbar

counter err-pkt-from-xbar poll-interval 300 delta rising-threshold 5 event 4 falling-threshold 0 event 4 alerts syslog rmon

counter tx-slowport-oper-delay poll-interval 1 absolute rising-threshold 80 event 4 falling-threshold 0 event 4 alerts syslog rmon

counter txwait poll-interval 1 delta rising-threshold 10 event 4 falling-threshold 0 event 4 alerts syslog rmon

monitor counter sfp-tx-power-low-warn

counter sfp-tx-power-low-warn poll-interval 600 delta rising-threshold 1 event 4 falling-threshold 0 event 4 alerts syslog rmon percentage 80

monitor counter sfp-rx-power-low-warn

counter sfp-rx-power-low-warn poll-interval 600 delta rising-threshold 1 event 4 falling-threshold 0 event 4 alerts syslog rmon percentage 80

counter rx-datarate-burst poll-interval 10 delta rising-threshold 5 event 4 falling-threshold 1 event 4 alerts syslog rmon obfl datarate 90

counter tx-datarate-burst poll-interval 10 delta rising-threshold 5 event 4 falling-threshold 1 event 4 alerts syslog rmon obfl datarate 90

counter input-errors poll-interval 60 delta rising-threshold 5 event 4 falling-threshold 1 event 4 alerts syslog rmon

port-monitor activate AllPorts

Dual Core and Edge Policies with Portguard Actions (for NX-OS 8.5(1) or 9.2(1) and Later)

Ports can be shut down (error disabled) or flapped upon reaching the rising-threshold via the portguard errordisable | flap parameter. This can be used for both ISLs and F port connections to N-Port Virtualizer (NPV) switches (logical-type core) as well as regular end device F ports (logical-type edge). However, if it is desired to take a portguard action for a counter related to slow drain, then that must normally only be done on a logical-type edge policy.

The logical-type core policy is the same as the previous CorePorts policy except it is errordisable under these next conditions:

1. There are 4 or more link failures (link-loss, sync-loss, signal-loss) in a 60 second interval

2. There are 10 or more invalid CRC frames or input errors received in a 60 second interval.

3. There are are 10 or more invalid words (ITWs) received in a 60 second interval.

4. There are are 10 or more input errors received in a 60 second interval.

Because the ports are shutdown (error disabled), the event level has been raised from 4 (warning) to 2 (error) on any port with portguard errordisable:

port-monitor name CorePorts_w_Portguard

logical-type core

counter link-loss poll-interval 60 delta rising-threshold 4 event 2 falling-threshold 0 event 2 alerts syslog rmon portguard errordisable

counter sync-loss poll-interval 60 delta rising-threshold 4 event 2 falling-threshold 0 event 2 alerts syslog rmon portguard errordisable

counter signal-loss poll-interval 60 delta rising-threshold 4 event 2 falling-threshold 0 event 2 alerts syslog rmon portguard errordisable

counter invalid-words poll-interval 60 delta rising-threshold 10 event 3 falling-threshold 1 event 2 alerts syslog rmon portguard errordisable

counter invalid-crc poll-interval 60 delta rising-threshold 10 event 3 falling-threshold 0 event24 alerts syslog rmon portguard errordisable

no monitor counter state-change

counter tx-discards poll-interval 60 delta rising-threshold 100 event 3 falling-threshold 10 event 4 alerts syslog rmon

counter lr-rx poll-interval 60 delta rising-threshold 5 event 2 falling-threshold 1 event 4 alerts syslog rmon

counter lr-tx poll-interval 60 delta rising-threshold 5 event 2 falling-threshold 1 event 4 alerts syslog rmon

counter timeout-discards poll-interval 60 delta rising-threshold 100 event 3 falling-threshold 10 event 4 alerts syslog rmon

counter credit-loss-reco poll-interval 60 delta rising-threshold 1 event 2 falling-threshold 0 event 4 alerts syslog rmon

counter tx-credit-not-available poll-interval 1 delta rising-threshold 10 event 4 falling-threshold 0 event 4 alerts syslog rmon

no monitor counter rx-datarate

counter tx-datarate poll-interval 10 delta rising-threshold 80 event 4 falling-threshold 70 event 4 alerts syslog rmon obfl

no monitor counter err-pkt-from-port

monitor counter err-pkt-to-xbar

counter err-pkt-to-xbar poll-interval 300 delta rising-threshold 5 event 4 falling-threshold 0 event 4 alerts syslog rmon

monitor counter err-pkt-from-xbar

counter err-pkt-from-xbar poll-interval 300 delta rising-threshold 5 event 4 falling-threshold 0 event 4 alerts syslog rmon

counter tx-slowport-oper-delay poll-interval 1 absolute rising-threshold 80 event 4 falling-threshold 0 event 4 alerts syslog rmon

counter txwait poll-interval 1 delta rising-threshold 20 event 4 falling-threshold 0 event 4 alerts syslog rmon

monitor counter sfp-tx-power-low-warn

counter sfp-tx-power-low-warn poll-interval 600 delta rising-threshold 1 event 4 falling-threshold 0 event 4 alerts syslog rmon percentage 80

monitor counter sfp-rx-power-low-warn

counter sfp-rx-power-low-warn poll-interval 600 delta rising-threshold 1 event 4 falling-threshold 0 event 4 alerts syslog rmon percentage 80

counter rx-datarate-burst poll-interval 10 delta rising-threshold 5 event 4 falling-threshold 1 event 4 alerts syslog rmon obfl datarate 90

counter tx-datarate-burst poll-interval 10 delta rising-threshold 5 event 4 falling-threshold 1 event 4 alerts syslog rmon obfl datarate 90

counter input-errors poll-interval 60 delta rising-threshold 10 event 4 falling-threshold 1 event 2 alerts syslog rmon portguard errordisable

port-monitor activate CorePorts_w_Portguard

The logical-type edge policy is the same as the previous EdgePorts policy except it can  errordisable  a port under these conditions:

1. There are 4 or more link failures(link-loss, sync-loss and signal-loss) in a 60 second interval.

2. There are 5 or more invalid CRC frames or invalid-words(ITWs) received in a 60 second interval.

3. There are 50 or more transmit (Tx) discards, for any reason, in a 60 second interval.

4. There are 50 or more timeout discards, in a 60 second interval. This is where the switch has been unable to transmit a received frame within the congestion-drop threshold (default 500ms).

5. There are 4 or more instances of Credit Loss Recovery in a 60 second interval. This is where a F port is a zero Tx credits for one full second.

6. There are 5 or more input errors received in a 60 second interval.

port-monitor name EdgePorts_w_Portguard

logical-type edge

counter link-loss poll-interval 60 delta rising-threshold 4 event 2 falling-threshold 0 event 2 alerts syslog rmon portguard errordisable

counter sync-loss poll-interval 60 delta rising-threshold 4 event 2 falling-threshold 0 event 2 alerts syslog rmon portguard errordisable

counter signal-loss poll-interval 60 delta rising-threshold 4 event 2 falling-threshold 0 event 2 alerts syslog rmon portguard errordisable

counter invalid-words poll-interval 60 delta rising-threshold 10 event 3 falling-threshold 0 event 2 alerts syslog rmon portguard errordisable

counter invalid-crc poll-interval 60 delta rising-threshold  event 10 falling-threshold 0 event 2 alerts syslog rmon portguard errordisable

no monitor counter state-change

counter tx-discards poll-interval 60 delta rising-threshold 50 event 3 falling-threshold 10 event 2 alerts syslog rmon portguard errordisable

counter lr-rx poll-interval 60 delta rising-threshold 5 event 2 falling-threshold 1 event 4 alerts syslog rmon

counter lr-tx poll-interval 60 delta rising-threshold 5 event 2 falling-threshold 1 event 4 alerts syslog rmon

counter timeout-discards poll-interval 60 delta rising-threshold 50 event 3 falling-threshold 10 event 2 alerts syslog rmon portguard errordisable

counter credit-loss-reco poll-interval 60 delta rising-threshold 4 event 2 falling-threshold 0 event 2 alerts syslog rmon portguard errordisable

counter tx-credit-not-available poll-interval 1 delta rising-threshold 10 event 4 falling-threshold 0 event 4 alerts syslog rmon

no monitor counter rx-datarate

counter tx-datarate poll-interval 10 delta rising-threshold 80 event 4 falling-threshold 70 event 4 alerts syslog rmon obfl

no monitor counter err-pkt-from-port

no monitor counter err-pkt-to-xbar

no monitor counter err-pkt-from-xbar

counter tx-slowport-oper-delay poll-interval 1 absolute rising-threshold 50 event 4 falling-threshold 0 event 4 alerts syslog rmon

counter txwait poll-interval 1 delta rising-threshold 20 event 4 falling-threshold 0 event 4 alerts syslog rmon

monitor counter sfp-tx-power-low-warn

counter sfp-tx-power-low-warn poll-interval 600 delta rising-threshold 1 event 4 falling-threshold 0 event 4 alerts syslog rmon percentage 80

monitor counter sfp-rx-power-low-warn

counter sfp-rx-power-low-warn poll-interval 600 delta rising-threshold 1 event 4 falling-threshold 0 event 4 alerts syslog rmon percentage 80

counter rx-datarate-burst poll-interval 10 delta rising-threshold 5 event 4 falling-threshold 1 event 4 alerts syslog rmon obfl datarate 90

counter tx-datarate-burst poll-interval 10 delta rising-threshold 5 event 4 falling-threshold 1 event 4 alerts syslog rmon obfl datarate 90

counter input-errors poll-interval 60 delta rising-threshold 10 event 4 falling-threshold 1 event 2 alerts syslog rmon portguard errordisable

port-monitor activate EdgePorts_w_Portguard

Verify

There is currently no verification procedure available for this configuration.

Troubleshoot

There is currently no specific troubleshooting information available for this configuration.

Related Information

- Cisco Technical Support & Downloads