Performance Management Configuration
This chapter describes performance management (PM) principles and provides the configuration procedure and a configuration example.
Overview of Performance Management
PM collects the statistics about the following performance counters of devices or services:
Number of sent and received packets and packet loss rate on the physical interfaces of the router
CPU usage and memory usage of the router
Running parameters of network services
Configuring Performance Management Functions
This section describes how to configure performance management (PM) functions. The PM functions enable the system to collect performance statistics and generate performance statistics files. These statistics can then be queried by local and network management system (NMS) users.
Usage Scenario
PM collects and monitors performance statistics about the following objects:
Interface traffic, such as statistics about sent packets on an Ethernet interface
Protocol packets, such as statistics about Y.1731 packets
Device operating parameters, such as the CPU usage
To collect service performance statistics, configure PM functions.
Configuring a Performance Statistics Task
This section describes how to configure a performance statistics task. After the performance statistics collection interval is set and an instance is bound to a performance statistics task, the system starts collecting the performance statistics.
Context
A performance statistics task enables the system to periodically collect performance statistics for a service. In a performance statistics task, basic performance statistics functions are implemented, and performance statistics files can be generated.
Perform the following steps on the device:
Procedure
- Run system-view
The system view is displayed.
- Run pm
The performance management (PM) view is displayed.
- Run statistics enable
The performance statistics function is enabled.
- Run statistics-task task-name
A performance statistics task is created, and the performance statistics task view is displayed.
- Run task-type { pm-sdh | mon-history | mon-statistics }
The type of the performance statistics task is configured.
If a historical performance statistics task is configured by specifying the mon-history parameter, you can run the start elaborate-sample second command to enable the refined sampling function for the task.
- Run statistics-cycle cycle
The performance statistics collection interval is set.
- Run binding instance-type instance-type { all | instance { instance-name } & <1-8> }
An instance is bound to the performance statistics task.
After an instance is bound to a performance statistics task, the system collects the performance statistics about the instance and generates a statistics file.
- (Optional) Run measure disable instance-type instance-type measure measure-name
Measurement is disabled for a statistics counter of the instance bound to the performance statistics task.
To view statistics counters of the instance bound to a performance statistics task, run the display pm measure-info instance-type instance-type-name command. To deactivate a specific statistics counter of the instance bound to a performance statistics task, run the measure disable instance-type instance-typemeasure measure-name command to disable the measurement for the statistics counter.
- Run either of the following commands:
Run the record-file disable command to disable the generation of a performance statistics file.
Run this command when you do not want the system memory to be occupied by many performance statistics files.
If the performance statistics file generation function is left enabled, you can run the record-interval interval command to set the number of intervals at which performance statistics are collected.
After the command is run, the system generates performance statistics files every cycle x interval minutes and automatically saves the performance statistics in the files.
Run the file-format { text | xml } command to set the format for performance statistics files.
- Run commit
The configuration is committed.
(Optional) Uploading Performance Statistics Files
The system generates performance statistics files based on the collected performance statistics at a specified interval. To view the performance statistics on a performance management (PM) server, upload performance statistics files to the PM server.
Context
Before uploading performance statistics files to a PM server, configure the File Transfer Protocol (FTP) or Secure File Transfer Protocol (SFTP) server functionality on the PM server, and ensure that the device on which the performance statistics are collected has been connected to the PM server.
Perform the following steps on the device:
Procedure
- Run system-view
The system view is displayed.
- Run pm
The PM view is displayed.
- Run pm-server server-name
A process serving the PM server is created, and the PM server view is displayed.
- Run the following commands to configure parameters of the PM server to which a performance statistics file will be uploaded.
To configure the protocol and IP address to upload a performance statistics file to the PM server, run the protocol { ftp | sftp } ip-address ip-address [ port port-number | { net-manager-vpn | vpn-instance vpn-instance-name } ] * command.
Using FTP to upload performance statistics files is not secure. Therefore, using SFTP is recommended.
If the IP address of the PM server is a private address, use net-manager-vpn to specify a network management VPN for performance statistics file uploading or use vpn-instance vpn-instance-name to specify a VPN instance for performance statistics file uploading.
- To configure a user name and password for logging in to the PM server, run the username user-name password password command.
- To configure the destination path where a performance statistics file is saved on the PM server, run the path destination-path command.
To configure the number of retransmissions for a performance statistics file, run the retry retry-times command.
- Run quit
Return to the PM view.
- Run upload-config request-name server server-name
A request for uploading performance statistics files to a specified PM server is created.
- (Optional) Run statistics-task task-name
The performance statistics task view is displayed.
- (Optional) Run upload auto request-name
The device is enabled to automatically upload performance statistics files to the PM server.
To enable the device to automatically upload performance statistics files to the PM server at performance statistics file generation intervals, perform this configuration.
- Run commit
The configuration is committed.
Verifying the Performance Management Configuration
After configuring performance management (PM) functions, verify the configuration.
Procedure
- Run the display pm brief command to check brief PM information.
- Run the display pm statistics-task [ task-name ] command to check information about a specific performance statistics task.
- Run the display pm measure-info [ instance-type instance-type ] command to check information about the statistics counters of a specific type of instances.
- Run the display pm statistics task-name data-index index [ instance-type instance-type-name [ measure measure-name | instance { instance-name } & <1-8> ] * ] command to check the performance statistics.
- Run the display pm statistics-file [ task-name ] command to check the list of performance statistics files.
Configuration Examples for Performance Management
This section provides a PM configuration example.
Example for Configuring Performance Management Functions
This section provides an example for configuring PM functions to record and monitor system performance statistics. The PM functions include creating a performance statistics task, binding an instance to the performance statistics task, and configuring PM servers.
Networking Requirements
On the network shown in Figure 22-1, to monitor the operating status of interfaces and collect performance statistics, configure the PM function. This configuration enables a device to periodically collect performance statistics, save the performance statistics to files, and send the files to a PM server.
Interface 1 in this example represents GE 1/0/1.
Configuration Roadmap
The configuration roadmap is as follows:
Enable the performance statistics function.
Configure a performance statistics task.
Configure the PM server to obtain performance statistics files.
Data Preparation
To complete the configuration, you need the following data:
Basic performance statistics function parameters:
- Performance statistics task name
- Performance statistics collection interval
- Performance statistics instance type
- Performance statistics instance name
- Performance statistics counter name
- Number of performance statistics intervals
PM server parameters:
- Name of the process serving the PM server
- PM server IP address
- Number of the PM server listening port
- User name and password for logging in to the PM server
- Destination path where performance statistics files are saved on the PM server
- Number of performance statistics file retransmissions
- Name of the request for uploading performance statistics files to the PM server
Procedure
- Enable the performance statistics function.
<HUAWEI> system-view
[~HUAWEI] sysname Device A
[*HUAWEI] commit
[~Device A] pm
[~Device A-pm] statistics enable
[*Device A-pm] commit
- Configure basic performance statistics functions.
[~Device A-pm] statistics-task huawei
[*Device A-pm-statistics-huawei] statistics-cycle 5
[*Device A-pm-statistics-huawei] binding instance-type interface instance gigabitethernet1/0/1
[*Device A-pm-statistics-huawei] measure disable instance-type interface measure in-all-pkts
[*Device A-pm-statistics-huawei] record-interval 3
[*Device A-pm-statistics-huawei] commit
- Configure the PM server to obtain performance statistics files.
[~Device A-pm] pm-server abc
[*Device A-pm-server-abc] protocol sftp ip-address 192.168.2.1 port 22
[*Device A-pm-server-abc] username a password a
[*Device A-pm-server-abc] path /pmserver
[*Device A-pm-server-abc] retry 2
[*Device A-pm-server-abc] quit
[*Device A-pm] upload-config req1 server abc
[*Device A-pm] commit
[~Device A-pm] upload req1 file a120130525150004.txt
[*Device A-pm] commit
- Verify the configuration.
After configuring PM functions, run the display pm statistics-task [ task-name ] command to check the PM configurations. The following example uses the command output for a performance statistics task named huawei. The command output shows the performance statistics task name, performance statistics collection interval, and performance statistics instance type. In addition, the performance statistics file a120130525150004.txt has been uploaded to the /pmserver path of the PM server.
<Device A> display pm statistics-task huawei
Task Name : huawei Task State : running Record-file Status : enable Task Cycle : 5 minutes Sample Interval : 1 minutes Instance Type : interface Record Interval(cycle) : 3 File Format : text File Name Prefix : huawei File Transfer Mode : passive Current File Name : a120130525150004.txt
Configuration Files
# sysname Device A # pm statistics enable pm-server abc protocol sftp ip-address 192.168.2.1 username a password %#%#H2uA')+.Y#eq-BZ~MEKG7r1_@L:n0*]&i@Z\/z7#%#%# retry 2 path /pmserver upload-config req1 server abc statistics-task huawei statistics-cycle 5 record-interval 3 binding instance-type interface instance GigabitEthernet1/0/1 measure disable instance-type interface measure in-all-pkts # return