Performance Co-Pilot
说明
Performance Co-Pilot (PCP) is a framework and services to support system-level performance monitoring and performance management. The architecture and services are most attractive for those seeking centralized monitoring of distributed processing (e.g. in a cluster or webserver farm environment), or on large systems with lots of moving parts. However some of the features of PCP are also useful for hard performance problems on smaller system configurations.
Performance Metrics Domain Agent (PMDA)
Performance Metrics Collector Daemon (PMCD)
安装、启动
yum install pcp pcp-gui -y
systemctl enable --now pmcd安装附加的pcp监控工具(pcp的扩展工具集和子命令)
yum install pcp-system-tools# pcp-system-tools 常用命令示例
pcp free
pcp dstat
pcp dstat --time --cpu --proc 2 8
pmstat -s 3 -t 2
pmcollectl -c 5




查看监控项
查看所有监控项
查看指定监控项的描述
使用监控项
统计指定监控项
统计 5 次
统计5次,以15s为间隔
绘制图表
pmchart
从日志中重放数据
Performance Co-Pilot also has the ability to store data in a log using the pmlogger command. By default, the pmlogger command stores logged data in the /var/log/pcp/ pmlogger/HOSTNAME directory.
After the data has been collected in a pmlogger archive, tools, such as pmval or pmchart, are used to query and process data based on a select performance metric.
The pmlogger command may be started as a daemon by the pcp init script. It may also be started manually. By default, pmlogger collects data every second.
pmlogger(存储日志)
pmdumplog(查看日志,以指定时区查看,此处以“东5区”做演示)
Once the log has been created, command line pcp tools use the -a option to indicate that they should be run against a data archive instead of live data. The pmval and pmchart commands have additional options used to specify the start and end times, which should be used to narrow the data to a specitic time span.
Last updated