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.
On the network shown in Figure 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 0/1/1.
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.
To complete the configuration, you need the following data:
Basic performance statistics function parameters:
PM server parameters:
<HUAWEI> system-view [~HUAWEI] sysname Device A [*HUAWEI] commit [~Device A] pm [~Device A-pm] statistics enable [*Device A-pm] commit
[~Device A-pm] statistics-task huawei [*Device A-pm-statistics-huawei] statistics-cycle 5 [*Device A-pm-statistics-huawei] binding instance-type interface instance gigabitethernet0/1/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
[~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
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
# 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 GigabitEthernet0/1/1 measure disable instance-type interface measure in-all-pkts # return