评分并提供意见反馈 :
华为采用机器翻译与人工审校相结合的方式将此文档翻译成不同语言,希望能帮助您更容易理解此文档的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 华为对于翻译的准确性不承担任何责任,并建议您参考英文文档(已提供链接)。
配置性能管理示例
在本示例中,通过创建统计任务、绑定数据统计实例以及配置性能管理服务器获取统计文件,可以对系统的性能数据进行统计记录和监控。
应用场景
当用户希望对接口上的运行状态进行采集和统计时,可以配置性能管理功能进行数据统计,定时收集性能数据的统计信息、保存性能数据的统计信息至文件和将文件上传到性能管理服务器。
图22-1 配置性能管理组网图
![]()
本例中interface1代表GE0/1/1。
数据准备
为完成此配置例,需准备如下的数据:
数据统计基本功能的参数:
统计任务名称、统计周期、统计实例类型、统计实例名、指标名称、统计周期的个数。
性能管理服务器的参数:
性能管理服务器进程名称、性能管理服务器IP地址、性能管理服务器侦听端口号、连接到性能管理服务器的用户名和认证密码、统计文件上传至性能管理服务器的目标路径、统计文件传输失败时的重传次数、统计文件上传请求名。
操作步骤
- 使能数据统计功能
<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
- 验证配置结果
配置完成之后,执行如下命令,查看性能管理配置信息,包括统计任务名称、统计周期、实例类型信息和监控规则等信息。而且在性能管理服务器的/pmserver路径下,可以看到统计文件a120130525150004.txt上传成功。
<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