Table of ContentsView in Frames

Viewing or clearing CDP statistics

You can analyze the CDP statistics to detect any network connectivity issues. You can use the cdpd show-stats command to view the CDP send and receive statistics. CDP statistics are cumulative from the time they were last cleared. To clear the CDP statistics, you can use the cdpd zero-stats command.

Before you begin

CDP must be enabled.

Step

  1. Depending on whether you want to view or clear the CDP statistics, complete the following step:
    If you want to... Then, enter the following command...
    View the CDP statistics cdpd show-stats
    Clear the CDP statistics cdpd zero-stats

Example of showing the statistics before and after clearing them

The following example shows the CDP statistics before they are cleared:
system1> cdpd show-stats 
 
RECEIVE  
 Packets:          9116  | Csum Errors:         0  | Unsupported Vers:    4561
 Invalid length:      0  | Malformed:           0  | Mem alloc fails:        0
 Missing TLVs:        0  | Cache overflow:      0  | Other errors:           0

TRANSMIT  
 Packets:          4557  | Xmit fails:          0  | No hostname:            0  
 Packet truncated:    0  | Mem alloc fails:     0  | Other errors:           0
This output displays the total packets that are received from the last time the statistics were cleared.
The following command clears the CDP statistics:
system1> cdpd zero-stats
The following output shows the statistics after they are cleared:
system1> cdpd show-stats

RECEIVE
 Packets:             0  | Csum Errors:         0  | Unsupported Vers:    0
 Invalid length:      0  | Malformed:           0  | Mem alloc fails:     0
 Missing TLVs:        0  | Cache overflow:      0  | Other errors:        0


TRANSMIT
 Packets:             0  | Xmit fails:          0  | No hostname:         0
 Packet truncated:    0  | Mem alloc fails:     0  | Other errors:        0


OTHER
 Init failures:       0

After the statistics are cleared, the statistics get added from the time the next CDP advertisement is sent or received.