此内容没有您所选择的语言版本。

Chapter 6. Metrics Data Retention


The storage capacity required by PCP data logging is determined by the following factors:

  • the metrics being logged,
  • the logging interval,
  • and the retention policy.

The default logging (sampling) interval is 60 seconds.

The default retention policy is to keep archives for the last 14 days, compressing archives older than one day. PCP archive logs are stored in the /var/log/pcp/pmlogger/hostname directory.

6.1. Changing Default Logging Interval

This procedure describes how to change the default logging interval.

Procedure

  1. Edit the /etc/pcp/pmlogger/control.d/local configuration file.
  2. Edit the LOCALHOSTNAME line and append -t XXs, where XX is the desired time interval, measured in seconds.
  3. Restart the pmlogger service.

6.2. Changing Data Retention Policy

This procedure describes how to change the data retention policy.

Procedure

  1. Edit the /etc/cron.d/pcp-pmlogger file.
  2. Find the line containing pmlogger_daily.
  3. Change the value for parameter -x to the desired number of days after which data is archived.
  4. Add parameter -k, and add a value for the number of days after which data is deleted.

    For example, the parameters -x 4 -k 7 specify that data will be compressed after 4 days, and deleted after 7 days.

6.3. Confirming Data Storage Usage

To confirm data storage usage, enter the following command:

# less /var/log/pcp/pmlogger/$(hostname)/pmlogger.log
Copy to Clipboard Toggle word wrap

This lists all available metrics, grouped by the frequency at which they are logged. For each group it also lists the storage required to store the listed metrics, per day.

Example storage statistics

logged every 60 sec: 61752 bytes or 84.80 Mbytes/day
Copy to Clipboard Toggle word wrap

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat