• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How To Disable Or Extend System Logging Rate-limit on CentOS/RHEL 7

by admin

CentOS/RHEL usually uses rsyslogd rate-limit mechanism. However, CentOS/RHEL 7.x comes with systemd journal integrated to provide the ability to import structured log messages from systemd journal to syslog.

The journal messages on the system’s /var/log/messages file looks like in the following example:

Jul 30 03:29:45 hostname rsyslogd: imjournal: 102776 messages lost due to rate-limiting

How can we disable or extend this logging rate limitation feature on CentOS/RHEL 7.x?

Disable or Extend System Logging Rate-limit

To disable the rsyslogd logging rate-limit on CentOS/RHEL 7 perform the following steps:

1. Edit the file “/etc/rsyslog.conf” and modify the following parameters.

$SystemLogRateLimitInterval 5
$SystemLogRateLimitBurst    30000

Change these to:

$SystemLogRateLimitInterval 0
$SystemLogRateLimitBurst    0

2. Add the following parameter after “$ModLoad imjournal” under section “#### MODULES ####”

$ImjournalRateLimitInterval 0

or

module(load="imjournal" ratelimit.interval="0")

Either parameter works the same, the difference is that the first line is an old syntax and the second is the new syntax, which is preferred.

3. Edit the file “/etc/systemd/journald.conf” and comment the following parameters:

RateLimitInterval=5s
RateLimitBurst=30000

Change these to (add symbol # in the beginning):

#RateLimitInterval=5s
#RateLimitBurst=30000

4. Restart rsyslog and journal service:

# systemctl restart systemd-journald
# systemctl restart rsyslog

Conclusion

The rate limitation prevents logging from using excessive levels of system resources and to flood the /var/log/message with unnecessary messages. To log an event, it needs to be written to disk which uses system resources. If there are too many repetitive events coming in recorded to disk in a specific period of time, they can overwhelm a system and cause more important services to respond slowly or even an unexpected failure. Therefore, disabling rate-limiting it is generally not recommended, but some times it would be required for diagnostic purposes.

How To Disable Or Extend System Logging Rate-limit on CentOS/RHEL 6

Filed Under: CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. a2enconf Command Examples in Linux
  2. How to create snapshot of LVM thin volumes using snapper command
  3. head Command Examples in Linux
  4. CentOS / RHEL 7 : How to Change Timezone
  5. How to Use the ssh-keygen Command to configure passwordless ssh
  6. How to merge 2 volume groups (VGs) into one using vgmerge in LVM
  7. systemctl Command Examples in Linux
  8. Getting info with the vsish command (esxi only)
  9. datamash Command Examples in Linux
  10. gs: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • qm Command Examples in Linux
  • qm wait Command Examples in Linux
  • qm start Command Examples in Linux
  • qm snapshot Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright