How can I change the default logging interval used by Performance Co-Pilot (PCP)?

Updated

  • the default logging interval used by the pmlogger service as of PCP 5.2.5 (deployed on RHEL8.4) is 10 seconds. The interval of 10 seconds is deemed reasonable as servers need quite detailed logging, especially servers experiencing intermittent storage performance issues.
  • The interval logging is a balance between logging volume and the level of detail suited to long term monitoring on a system.
  • The pmlogger service is used to manage pmlogger.
  • The product documentation and the relevant manual pages have details for pmlogger.

Configuring logging with pmlogger

  • Metrics specified in /var/lib/pcp/config/pmlogger/config.default that are using a 'default' logging interval (so do not have an own interval specified like for example 'on 30 seconds') will be written to disk every 10 seconds.
  • this can be changed by editing /etc/sysconfig/pmlogger, the default should look like this:
PMLOGGER_INTERVAL=10
  • this could be done programatically with the sed stream editor:
sed -iold 's/^PMLOGGER_INTERVAL.*/PMLOGGER_INTERVAL=60/' /etc/sysconfig/pmlogger
  • the above example changes the default logging interval to 60 seconds for the 'primary' logger (this is the pmlogger instance for the local host).
  • after making the changes, restart the pmlogger service as follows :
# systemctl restart pmlogger   (for RHEL7 and later and systems using systemd)
# service pmlogger restart  (for RHEL6 and earlier)
  • see the pmlogger(1) man page for pmlogger logging options that can be changed, e.g. the -c option can be changed to specify a different configuration file.

see also

Category
Components
Article Type