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 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.