Catalyst 4500 Series Software Configuration Guide, 7.5
Using Switch TopN Reports

Table Of Contents

Using Switch TopN Reports

Understanding How Switch TopN Reports Works

Overview of Switch TopN Reports

Running Switch TopN Reports Without the Background Option

Running Switch TopN Reports with the Background Option

Running and Viewing Switch TopN Reports


Using Switch TopN Reports


This chapter describes how to use the Switch TopN Reports utility on the Catalyst enterprise LAN switches.


Note For complete syntax and usage information for the commands used in this chapter, refer to the Command Reference—Catalyst 4000 Family, Catalyst 2948G, and Catalyst 2980G Switches.


This chapter consists of these major sections:

Understanding How Switch TopN Reports Works

Running and Viewing Switch TopN Reports

Understanding How Switch TopN Reports Works

These sections describe how the switch TopN reports utility works:

Overview of Switch TopN Reports

Running Switch TopN Reports Without the Background Option

Running Switch TopN Reports with the Background Option

Overview of Switch TopN Reports

The Switch TopN Reports utility allows you to collect and analyze data for each physical port on a switch.

The Switch TopN Reports utility collects the following data for each physical port:

Port utilization (util)

Number of in and out bytes (bytes)

Number of in and out packets (pkts)

Number of in and out broadcast packets (bcst)

Number of in and out multicast packets (mcst)

Number of in errors (in-errors)

Number of buffer-overflow errors (buf-ovflw)

When the Switch TopN Reports utility starts, it gathers data from the appropriate hardware counters and then goes into sleep mode for a user-specified period. When the sleep time ends, the utility gathers the current data from the same hardware counters, compares the current data from the earlier data, and stores the difference. The switch sorts data for each port using a user-specified metric selected from the types listed in Table 22-1.

Table 22-1 Valid Switch TopN Reports Data Types

Data Type
Definition

util

Utilization

bytes

Input/output bytes

pkts

Input/output packets

bcst

Input/output broadcast packets

mcst

Input/output multicast packets

errors

Input errors

overflow

Buffer overflows


Running Switch TopN Reports Without the Background Option

If you enter the show top command without specifying the background option, processing begins but the system prompt does not reappear on the screen and you cannot enter other commands while the report is being generated.

You can terminate the Switch TopN process before it finishes by pressing Ctrl-C from the same console or Telnet session, or by opening a separate console or Telnet session and entering the clear top [report_num] command. After the Switch TopN Reports utility finishes processing the data, it displays the output on the screen immediately. The output is not saved.

Running Switch TopN Reports with the Background Option

If you enter the show top command and specify the background option, processing begins and the system prompt reappears immediately. When processing completes, Switch TopN reports do not display immediately on the screen, but are saved for later viewing.

The system notifies you when the Switch TopN reports are complete by sending a syslog message to the screen. Enter the show top report [report_num] command to view the completed Switch TopN reports. The system displays only those reports that are completed. For reports that are not completed, the system displays a short description of the Switch TopN process information.

You can terminate a Switch TopN process invoked with the background option only by entering the clear top [report_num] command. Pressing Ctrl-C does not terminate the process. Completed Switch TopN reports remain available for viewing until you remove them using the clear top {all | report_num} command.

Running and Viewing Switch TopN Reports

To start a Switch TopN Report in the background and view the results, perform this task in privileged mode:

 
Task
Command

Step 1 

Start the Switch TopN Reports utility in the background.

show top [N] [metric] [interval interval] [port_type] background

Step 2 

View the generated report when it is complete.

show top report [report_num]


Note You must enter the background keyword to the Switch TopN Reports utility to use the show top report command to view the completed report contents. Otherwise, the report is displayed immediately upon completion of the process, and the results are not saved.


If you specify the report_num variable with the show top report command, the associated Switch TopN report is displayed. Each process is associated with a unique report number.

If you do not specify the report_num variable, all active Switch TopN processes and all available Switch TopN reports for the switch are displayed. All Switch TopN processes (both with and without the background option) are shown in the list.

This example shows how to start the Switch TopN Reports utility with the background option:

Console> (enable) show top 5 pkts background
Console> (enable) 06/16/1998,17:21:08:MGMT-5:TopN report 4 started by Console//.
Console> (enable) 06/16/1998,17:21:39:MGMT-5:TopN report 4 available.
Console> (enable) show top report 4
Start Time:     06/16/1998,17:21:08
End Time:       06/16/1998,17:21:39
PortType:       all
Metric:         pkts (Tx + Rx)
Port  Band- Uti Bytes                Pkts       Bcst       Mcst       Error Over
      width  %  (Tx + Rx)            (Tx + Rx)  (Tx + Rx)  (Tx + Rx)  (Rx)  flow
----- ----- --- -------------------- ---------- ---------- ---------- ----- ----
 1/1    100   0                 7950         81          0         81     0    0
 2/1    100   0                 2244         29          0         23     0    0
 1/2    100   0                 1548         12          0         12     0    0
 2/10   100   0                    0          0          0          0     0    0
 2/9    100   0                    0          0          0          0     0    0
Console> (enable)

To start the Switch TopN Reports utility in the foreground and view the results immediately, perform this task in privileged mode:

Task
Command

Start the Switch TopN Reports utility in the foreground.

show top [N] [metric] [interval interval] [port_type]


This example shows how to start the Switch TopN Reports utility in the foreground:

Console> (enable) show top 5 pkts
Start Time:     06/16/1998,17:26:38
End Time:       06/16/1998,17:27:09
PortType:       all
Metric:         pkts (Tx + Rx)
Port  Band- Uti Bytes                Pkts       Bcst       Mcst       Error Over
      width  %  (Tx + Rx)            (Tx + Rx)  (Tx + Rx)  (Tx + Rx)  (Rx)  flow
----- ----- --- -------------------- ---------- ---------- ---------- ----- ----
 2/1    100   0                10838         94          2         26     0    0
 1/1    100   0                 7504         79          0         79     0    0
 1/2    100   0                 2622         21          0         21     0    0
 2/10   100   0                    0          0          0          0     0    0
 2/9    100   0                    0          0          0          0     0    0
Console> (enable)

To display stored and pending Switch TopN reports, perform this task in privileged mode:

Task
Command

Display a Switch TopN report. To display all stored and pending reports, do not specify a report number.

show top report [report_num]


This example shows how to display a specific report and how to display all stored and pending reports:

Console> (enable) show top report 5
Start Time:     06/16/1998,17:29:40
End Time:       06/16/1998,17:30:11
PortType:       all
Metric:         overflow
Port  Band- Uti Bytes                Pkts       Bcst       Mcst       Error Over
      width  %  (Tx + Rx)            (Tx + Rx)  (Tx + Rx)  (Tx + Rx)  (Rx)  flow
----- ----- --- -------------------- ---------- ---------- ---------- ----- ----
 1/1    100   0                 7880         83          0         83     0    0
 2/12   100   0                    0          0          0          0     0    0
 2/11   100   0                    0          0          0          0     0    0
 2/10   100   0                    0          0          0          0     0    0
 2/9    100   0                    0          0          0          0     0    0
Console> (enable) show top report
Rpt  Start time          Int N   Metric     Status   Owner (type/machine/user)
---  ------------------- --- --- ---------- -------- -------------------------
  1  06/16/1998,17:05:00 30  20  Util       done     telnet/172.16.52.3/
  2  06/16/1998,17:05:59 30  5   Util       done     telnet/172.16.52.3/
  3  06/16/1998,17:08:06 30  5   Pkts       done     telnet/172.16.52.3/
  4  06/16/1998,17:21:08 30  5   Pkts       done     Console//
  5  06/16/1998,17:29:40 30  5   Overflow   pending  Console//
Console> (enable)

To remove stored Switch TopN reports, perform this task in privileged mode:

Task
Command

Remove Switch TopN reports. Use the all keyword to remove all completed Switch TopN reports.

clear top {all | report_num}



Note The clear top all command does not clear pending Switch TopN reports. Only the reports that have completed are cleared.


This example shows how to remove a specific Switch TopN report and how to remove all stored reports:

Console> (enable) clear top 4
Console> (enable) 06/16/1998,17:36:45:MGMT-5:TopN report 4 killed by Console//.
Console> (enable) clear top all
06/16/1998,17:36:52:MGMT-5:TopN report 1 killed by Console//.
06/16/1998,17:36:52:MGMT-5:TopN report 2 killed by Console//.
Console> (enable) 06/16/1998,17:36:52:MGMT-5:TopN report 3 killed by Console//.
06/16/1998,17:36:52:MGMT-5:TopN report 5 killed by Console//.
Console> (enable)