21-Network Management and Monitoring Command Reference

HomeSupportRoutersMSR5600-X3 Series(Comware V9)Reference GuidesCommand ReferencesH3C MSR5680-X3 Router Command Reference-R9141-6W10121-Network Management and Monitoring Command Reference
17-IP traffic statistics collection commands
Title Size Download
17-IP traffic statistics collection commands 89.54 KB

IP traffic statistics collection commands

display ip traffic-statistics live application

Use display ip traffic-statistics live application to display real-time traffic statistics for applications.

Syntax

display ip traffic-statistics live application [ app app-name | direction { both | downlink | uplink } [ top top-number ] ] [ slot slot-number ]

display ip traffic-statistics live application top top-number [ slot slot-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

app app-name: Specifies an application by its name, a case-insensitive string of 1 to 63 characters. If you do not specify this option, the command displays real-time traffic statistics based on the top top-number option.

direction { both | downlink | uplink }: Specifies the traffic direction to rank application traffic. The both keyword specifies the total traffic (uplink traffic plus downlink traffic). The downlink keyword specifies the downlink traffic. The uplink keyword specifies the uplink traffic. If you do not specify this option, the command ranks application traffic by total traffic.

top top-number: Displays real-time traffic statistics for the top top-number applications. The value range for the top-number argument is 10 to 100. If you do not specify this option, the command displays the top 10 applications by traffic rate.

slot slot-number: Specifies a card by its slot number. The slot-number argument represents the slot number of the card. If you do not specify a card, this command displays the total traffic rate of all cards.

Usage guidelines

Application scenarios

This command can help you monitor the traffic rates of applications in real time.

Operating mechanism

This command ranks applications in descending order of the traffic rate based on the specified conditions.

If the specified application does not exist, this command does not displays any traffic statistics.

If the collected traffic rate is smaller than 0.01 KB/s, it is displayed as 0.01 KB/s.

Examples

# Display real-time traffic statistics for applications.

<Sysname> display ip traffic-statistics live application

AppName               Total(KB/s)    Uplink(KB/s)   Downlink(KB/s)

test1                 1022.46        411.11         611.35

QQ                    835.87         523.52         312.34

Genshen               601.08         550.02         51.06

Table 1 Command output

Field

Description

AppName

Application name.

Total

Total rate of the uplink traffic and downlink traffic during the specified time period, up to two decimal places and in KB/s.

Uplink

Uplink traffic rate during the specified time period, up to two decimal places and in KB/s.

Downlink

Downlink traffic rate during the specified time period, up to two decimal places and in KB/s.

 

Related commands

ip traffic-statistics live application enable

display ip traffic-statistics history

Use display ip traffic-statistics history to display historical traffic statistics.

Syntax

display ip traffic-statistics history application [ time start-date start-time end-date end-time ] [ direction { both | downlink | uplink } ] [ user-ip { ip-address | ipv6-address } ] [ top top-number ]

display ip traffic-statistics history user [ time start-date start-time end-date end-time ] [ direction { both | downlink | uplink } ] [ app app-name ] [ top top-number ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

application: Displays historical traffic statistics for applications.

user: Displays historical traffic statistics for users.

time: Specifies a time period for which historical traffic statistics are displayed. If you do not specify a time period, this command displays all locally stored traffic statistics.

·     start-date: Specifies the start date in the format of MM/DD/YYYY or YYYY/MM/DD. MM represents the value of month in the range of 1 to 12. DD represents the value of the specified day that depends on the value of the month. YYYY represents the value of year in the range of 2000 to 2035.

·     start-time: Specifies the start time in the format of HH:MM:SS. HH represents the value of hour in the range of 0 to 23. MM represents the value of minute in the range of 0 to 59. SS represents the value of second in the range of 0 to 59. To configure whole minutes, you do not need to enter seconds. To configure whole hours, you do not need to enter minutes or seconds. For example, to configure 0 o’clock, specify 0 for the start-time argument.

·     end-date: Specifies the end date in the format of MM/DD/YYYY or YYYY/MM/DD. MM represents the value of month in the range of 1 to 12. DD represents the value of the specified day that depends on the value of the month. YYYY represents the value of year in the range of 2000 to 2035.

·     end-time: Specifies the end time in the format of HH:MM:SS. HH represents the value of hour in the range of 0 to 23. MM represents the value of minute in the range of 0 to 59. SS represents the value of second in the range of 0 to 59. To configure whole minutes, you do not need to enter seconds. To configure whole hours, you do not need to enter minutes or seconds. For example, to configure 0 o’clock, specify 0 for the end-time argument.

app app-name: Specifies an application by its name, a case-insensitive string of 1 to 63 characters. If you do not specify this option, the command displays historical traffic statistics based on the top top-number option.

direction { both | downlink | uplink }: Specifies the traffic direction to rank application traffic. The both keyword specifies the total traffic (uplink traffic plus downlink traffic). The downlink keyword specifies the downlink traffic. The uplink keyword specifies the uplink traffic. If you do not specify this option, the command ranks historical traffic by total traffic.

user-ip { ip-address | ipv6-address }: Specifies a user by its IPv4 or IPv6 address. If you do not specify this option, the command displays historical traffic statistics for all users.

top top-number: Displays historical traffic statistics for the top top-number users. The value range for the top-number argument is 10 to 100. If you do not specify this option, the command displays historical traffic statistics for the top 10 users.

Usage guidelines

Application scenarios

This command can help you monitor the traffic sizes of users and applications.

Operating mechanism

This command ranks users or applications in descending order of the traffic size based on the specified conditions.

If the specified application does not exist the start date and time is later than the end date and time, this command does not displays any traffic statistics.

If the collected traffic size is smaller than 0.01 MB, it is displayed as 0.01 MB.

Examples

# Display historical traffic statistics for applications.

<Sysname> display ip traffic-statistics history application time 7/28/2022 14:19:03 7/28/2022 14:23:03

AppName               Total(MB)    Uplink(MB)   Downlink(MB) Packet count

test1                 1986.88      998.32       988.56       38321

QQ                    462.85       198.02       264.82       9451

Genshen               200.22       97.11        103.11       4578

# Display historical traffic statistics for users.

<Sysname> display ip traffic-statistics history user time 7/28/2022 14:19:03 7/28/2022 14:23:03 app QQ

UserIP                Total(MB)    Uplink(MB)   Downlink(MB) Packet count

172.16.0.1            256.37       64.31        192.06       5821

172.16.0.2            128.96       63.45        65.51        2821

172.16.0.3            78.47        34.32        44.16        1651

Table 2 Command output

Field

Description

AppName

Application name.

UserIP

IPv4 or IPv6 address of the user.

Total

Total size of the uplink traffic and downlink traffic during the specified time period, up to two decimal places and in MB. If you do not specify a time period, this field displays the size of all historical uplink traffic and downlink traffic.

Uplink

Total size of the uplink traffic during the specified time period, up to two decimal places and in MB. If you do not specify a time period, this field displays the size of all historical uplink traffic.

Downlink

Total size of the downlink traffic during the specified time period, up to two decimal places and in MB. If you do not specify a time period, this field displays the size of all historical downlink traffic.

Packet count

Total number of packets for historical uplink traffic and downlink traffic.

 

Related commands

ip traffic-statistics history enable

ip traffic-statistics config remove-all

Use ip traffic-statistics config remove-all to end the IP traffic statistics collection process and delete all data in the IP traffic statistics collection module.

Syntax

ip traffic-statistics config remove-all

Views

System view

Predefined user roles

network-admin

Usage guidelines

Application scenarios

The IP traffic statistics collection module is memory intensive and affect device performance.

Operating mechanism

This command deletes all configuration data and running data in the IP traffic statistics collection module and ends the IP traffic statistics collection process.

Examples

# End the IP traffic statistics collection process and delete all data in the IP traffic statistics collection module.

<Sysname> system-view

[Sysname] ip traffic-statistics config remove-all

The command will delete all IP traffic statistics settings. Continue? [Y/N]:y

[Sysname]

ip traffic-statistics live application enable

Use ip traffic-statistics live application enable to enable real-time traffic statistics collection for applications.

Use undo ip traffic-statistics live application enable to disable real-time traffic statistics collection for applications.

Syntax

ip traffic-statistics live application enable

undo ip traffic-statistics live application enable

Default

Real-time traffic statistics collection is disabled for applications.

Views

System view

Predefined user roles

network-admin

Usage guidelines

Application scenarios

Use this command on a gateway device to monitor the traffic rates of applications.

Operating mechanism

This command enables IP the traffic statistics collection module to collect traffic rate statistics during a statistics collection interval. To set the statistics collection interval, use the ip traffic-statistics interval command.

To display real-time traffic statistics for applications, use the display ip traffic-statistics live application.

Restrictions and guidelines

This feature is memory intensive and degrades device performance. As a best practice, use this feature only when necessary and disable this feature when you do not use it.

Examples

# Enable real-time traffic statistics collection for applications.

<Sysname> system-view

[Sysname] ip traffic-statistics live application enable

Related commands

display ip traffic-statistics live application

ip traffic-statistics interval

Use ip traffic-statistics interval to set the interval for collecting real-time traffic rate statistics.

Use undo ip traffic-statistics interval to restore the default.

Syntax

ip traffic-statistics interval interval

undo ip traffic-statistics interval

Default

The interval for collecting real-time traffic rate statistics is 10 seconds.

Views

System view

Predefined user roles

network-admin

Parameters

interval: Specifies a statistics collection interval in the range 1 to 60 seconds.

Usage guidelines

Application scenarios

The ip traffic-statistics live application enable command enables the device to collect real-time traffic rate statistics for applications during the specified statistics collection interval. You can use the ip traffic-statistics interval command to set a statistics collection interval.

Operating mechanism

This command enables the device to collect traffic rate statistics in real time during a statistics collection interval.

Recommended configuration

If the traffic rates change significantly, set a shorter statistics collection interval as a best practice. Otherwise, set a longer statistics collection interval.

Examples

# Set the interval for collecting real-time traffic rate statistics to 20 seconds.

<Sysname> system-view

[Sysname] ip traffic-statistics interval 20

Related commands

ip traffic-statistics live application enable

ip traffic-statistics history enable

Use ip traffic-statistics history enable to enable historical traffic statistics collection.

Use undo ip traffic-statistics history enable to disable historical traffic statistics collection.

Syntax

ip traffic-statistics history enable

undo ip traffic-statistics history enable

Default

Historical traffic statistics collection is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

Application scenarios

Use this command on a gateway device to monitor the traffic sizes of users and applications.

Operating mechanism

This command enables the IP traffic statistics collection module to save the collected historical traffic statistics locally. To view historical traffic statistics, use the display ip traffic-statistics history command.

Restrictions and guidelines

This feature is memory intensive and affects device performance. As a best practice, disable this feature when you do not use it.

Examples

# Enable historical traffic statistics collection.

<Sysname> system-view

[Sysname] ip traffic-statistics history enable

Related commands

display ip traffic-statistics history

reset ip traffic-statistics history

Use reset ip traffic-statistics history to clear historical traffic statistics.

Syntax

reset ip traffic-statistics history

Views

User view

Predefined user roles

network-admin

Usage guidelines

The ip traffic-statistics history enable enables the IP traffic statistics collection module to save the collected traffic statistics locally, which occupies a large amount of memory. You can use the reset ip traffic-statistics history command to release the occupied memory.

Examples

# Clear historical traffic statistics.

<Sysname> reset ip traffic-statistics history

Related commands

display ip traffic-statistics history

ip traffic-statistics history enable

reset ip traffic-statistics statistics

Use reset ip traffic-statistics statistics to clear key operation counters of the IP traffic statistics collection module.

Syntax

reset ip traffic-statistics statistics

Views

User view

Predefined user roles

network-admin

Usage guidelines

The IP traffic statistics collection feature is memory intensive. You can use this command to release memory.

Examples

# Clear key operation counters of the IP traffic statistics collection module.

<Sysname> reset ip traffic-statistics

Related commands

display ip traffic-statistics live application

ip traffic-statistics live application enable

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网