Statistics Application Commands

Use these commands to query statistics on port utilization, flow-based traffic, and packet reception.

The statistics application gives you the ability to query for statistics on port utilization, flow-based and packet reception on programmable time slots. The statistics application collects the statistics at a configurable time range. You can specify the port number(s) or a range of ports for statistics to be displayed. The configured time range applies to all ports. Detailed statistics are collected between a specified time range in date and time format. You can define the time range as having an absolute time entry and/or a periodic time. For example, you can specify the statistics to be collected and displayed between 9:00 12 NOV 2011 (START) and 21:00 12 NOV 2012 (END) or schedule it on every Mon, Wed, and Fri 9:00 (START) to 21:00 (END).

You can receive the statistics in the following ways:

  • User requests through the CLI for a set of counters.
  • Configuring the device to display statistics using syslog or email alert. The syslog or email alert messages are sent by the statistics application at END time.

You can configure the device to display statistics on the console. The collected statistics are presented on the console at END time.

stats group (Global Config)

M4250

M4350

This command creates a new group with the specified ID and configures the time range and the reporting mechanism for that group. You can either configure a group ID or enter a keyword. You can configure multiple optional reporting methods.

Format stats group {group-id | congestion | port-utilization | received | received-errors | received-transmitted | transmitted | transmitted-errors} timerange time-range name reporting [reporting-method]
Mode Global Config
Parameter Description
group ID, name

Name of the group of statistics or its identifier to apply. The range is:

  • 1. received
  • 2. received-errors
  • 3. transmitted
  • 4. transmitted-errors
  • 5. received-transmitted
  • 6. port-utilization
  • 7. congestion

The default is None.

time-range name Name of the time range for the group or the flow-based rule. The range is 1 to 31 alphanumeric characters. The default is None.
reporting method

Report the statistics to the configured method. You can select one or multiple methods:

  • none (the default)
  • console
  • syslog
  • e-mail

Command example:

CODE
(NETGEAR Switch) (Config)# stats group received timerange test reporting console email
syslog
(NETGEAR Switch) (Config)# stats group received-errors timerange test reporting email
syslog
(NETGEAR Switch) (Config)# stats group received-   transmitted timerange test reporting
none

no stats group

This command deletes the configured group.

Format no stats group [group-id | name]
Mode Global Config

Command example:

CODE
(NETGEAR Switch) (Config)# no stats group received
(NETGEAR Switch) (Config)# no stats group received-errors
(NETGEAR Switch) (Config)# no stats group received-transmitted

stats flow-based (Global Config)

M4250

M4350

This command configures flow based statistics rules for the specified parameters over the specified time range. You can configure multiple parameters. Only an IPv4 address is allowed as source and destination IP address.

Format stats flow-based rule-id timerange time-range-name [{srcip ip-address} {dstip ip-address} {srcmac mac-address} {dstmac mac-address} {srctcpport portid} {dsttcpport portid} {srcudpport portid} {dstudpport portid}]
Mode Global Config
Parameter Description
rule ID The flow-based rule ID. The range is 1 to 16. The default is None.
time range name Name of the time range for the group or the flow-based rule. The range is 1 to 31 alphanumeric characters. The default is None.
srcip ip-address The source IP address.
dstip ip-address The destination IP address.
srcmac mac-address The source MAC address.
dstmac mac-address The destination MAC address.
srctcpport portid The source TCP port number.
dsttcpport portid The destination TCP port number.
srcudpport portid The source UDP port number.
dstudpport portid The destination UDP port number.

Command example:

CODE
(NETGEAR Switch) (Config)#stats flow-based 1 timerange test srcip 1.1.1.1 dstip 2.2.2.2
srcmac 1234 dstmac 1234 srctcpport 123 dsttcpport 123 srcudpport 123 dstudpport  123

(NETGEAR Switch) (Config)#stats flow-based 2 timerange test srcip 1.1.1.1 dstip 2.2.2.2
srctcpport 123 dsttcpport 123 srcudpport 123 dstudpport 123

no stats flow-based

This command deletes flow-based statistics.

Format no stats flow-based rule-id
Mode Global Config

Command example:

CODE
(NETGEAR Switch) (Config)# no stats flow-based 1
(NETGEAR Switch) (Config)# no stats flow-based 2

stats flow-based reporting

M4250

M4350

This command configures the reporting mechanism for all the flow-based rules configured on the system. There is no per flow-based rule reporting mechanism. Setting the reporting method as none resets all the reporting methods. You can select one or multiple methods:

  • none (the default)
  • console
  • syslog
  • e-mail.
Format stats flow-based reporting reporting-method
Mode Global Config

Command example:

CODE
(NETGEAR Switch) (Config)# stats flow-based reporting console email syslog
(NETGEAR Switch) (Config)# stats flow-based reporting email syslog
(NETGEAR Switch) (Config)# stats flow-based reporting none

stats group (Interface Config)

M4250

M4350

This command applies the group specified on an interface or interface range.

Format stats group {group-id | congestion | port-utilization | received | received-errors | received-transmitted | transmitted | transmitted-errors}
Mode Interface Config
Parameter Description
group ID, name

Name of the group of statistics or its identifier to apply on the interface. The range is:

  • 1. received
  • 2. received-errors
  • 3. transmitted
  • 4. transmitted-errors
  • 5. received-transmitted
  • 6. port-utilization
  • 7. congestion

The default is None.

Command example:

CODE
(NETGEAR Switch) (Interface 1/0/1-1/0/10)# stats group 1
(NETGEAR Switch) (Interface 1/0/1-1/0/10)# stats group 2

no stats group

This command deletes the interface or interface range from the specified group.

Format no stats group [group-id | name]
Mode Interface Config

Command example:

CODE
(NETGEAR Switch) (Interface 1/0/1-1/0/10)# no stats group 1
(NETGEAR Switch) (Interface 1/0/1-1/0/10)# no stats group 2

stats flow-based (Interface Config)

M4250

M4350

This command applies the flow-based rule specified by the ID on an interface or interface-range.

Format stats flow-based rule-id
Mode Interface Config
Parameter Description
rule-id The unique identifier for the flow-based rule.

Command example:

CODE
(NETGEAR Switch) (Interface 1/0/1-1/0/10)# stats flow-based 1
(NETGEAR Switch) (Interface 1/0/1-1/0/10)# stats flow-based 2

no stats flow-based

This command deletes the interface or interface-range from the flow-based rule specified.

Format no stats flow-based rule-id
Mode Interface Config

Command example:

CODE
(NETGEAR Switch) (Interface 1/0/1-1/0/10)# no stats flow-based 1
(NETGEAR Switch) (Interface 1/0/1-1/0/10)# no stats flow-based 2

show stats group

M4250

M4350

This command displays the configured time range and the interface list for the group specified and shows collected statistics for the specified time-range name on the interface list after the time-range expiry.

Format show stats group {group-id | congestion | port-utilization | received | received-errors | received-transmitted | transmitted | transmitted-errors}
Mode Privileged EXEC
Parameter Description
group ID, name

Name of the group of statistics or its identifier to apply. The range is:

  • 1. received
  • 2. received-errors
  • 3. transmitted
  • 4. transmitted-errors
  • 5. received-transmitted
  • 6. port-utilization
  • 7. congestion

The default is None.

Command example:

CODE
(NETGEAR Switch) #show stats group received

Group: received
Time Range: test
Interface List
-----------------
1/0/2, 1/0/4, lag 1

Counter ID                 Interface  Counter Value
-------------------------  ---------  ------------
Rx Total                       1/0/2        951600
Rx Total                       1/0/4        304512
Rx Total                       lag 1             0
Rx 64                          1/0/2             0
Rx 64                          1/0/4          4758
Rx 64                          lag 1             0
Rx 65to128                     1/0/2             0
Rx 65to128                     1/0/4             0
Rx 65to128                     lag 1             0
Rx 128to255                    1/0/2          4758
Rx 128to255                    1/0/4             0
Rx 128to255                    lag 1             0
Rx 256to511                    1/0/2             0

Command example:

CODE
(NETGEAR Switch) #show stats group port-utilization

Group: port-utilization
Time Range: test
Interface List
--------------
1/0/2, 1/0/4, lag 1
Interface  Utilization (%)
---------  ---------------
1/0/2      0
1/0/4      0
lag 1      0

show stats flow-based

M4250

M4350

This command displays the configured time range, flow-based rule parameters, and the interface list for the flow specified.

Format show stats flow-based [rule-id | all]
Mode Privileged EXEC
Parameter Description
rule-id The unique identifier for the flow-based rule.

Command example:

CODE
(NETGEAR Switch) #show stats flow-based all

Flow based rule Id............................. 1
Time Range..................................... test
Source IP...................................... 1.1.1.1
Source MAC..................................... 1234
Source TCP Port................................ 123
Source UDP Port................................ 123
Destination IP................................. 2.2.2.2
Destination MAC................................ 1234
Destination TCP Port........................... 123
Destination UDP Port........................... 123
Interface List
--------------
1/0/1 - 1/0/2

Interface  Hit Count
---------  ---------
1/0/1      100
1/0/2      0

Flow based rule Id............................. 2
Time Range..................................... test
Source IP...................................... 1.1.1.1
Source TCP Port................................ 123
Source UDP Port................................ 123
Destination IP................................. 2.2.2.2
Destination TCP Port........................... 123
Destination UDP Port........................... 123

Interface List
--------------
1/0/1 - 1/0/2

Interface  Hit Count
---------  ---------
1/0/1      100
1/0/2      0

Command example:

CODE
(NETGEAR Switch) #show stats flow-based 2

Flow based rule Id............................. 2
Time Range..................................... test
Source IP...................................... 1.1.1.1
Source TCP Port................................ 123
Source UDP Port................................ 123
Destination IP................................. 2.2.2.2
Destination TCP Port........................... 123
Destination UDP Port........................... 123
Interface List
--------------
1/0/1 - 1/0/2

Interface  Hit Count
---------  ---------
1/0/1      100
1/0/2      0