• 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 6

by admin

CentOS/RHEL usually uses rsyslogd rate-limit mechanism. Below is an example of message logged in /var/log/messages due to rsyslog rate-limiting.

Feb  9 10:22:32 localhost rsyslogd: imuxsock lost 432 messages from pid 9832 due to rate-limiting
Feb  9 10:22:45 localhost rsyslogd: imuxsock begins to drop messages from pid 9832 due to rate-limiting

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.

Follow the steps given below to disable or extend the rsyslogd rate-limiting in CentOS/RHEL 6.

1. Edit the rsyslogd configuration file /etc/rsyslog.conf:

# vi /etc/rsyslog.conf

2. Add the following parameters under “$ModLoad imuxsock” section.

$SystemLogRateLimitInterval 0
$SystemLogRateLimitBurst 0
$IMUxSockRateLimitBurst 0
$IMUXSockRateLimitInterval 0
$IMUxSockRateLimitSeverity 7 

3. Restart rsyslog for the changes to take effect:

# service rsyslog restart

Conclusion

imuxsock is the name of the module that handles Unix Socket. This module manages the delivery of syslog calls from a logging process to rsyslog. The module listens to the log sockets of a Unix system and gives rsyslog the log messages when they occur.

SystemLogRateLimitInterval is the amount of time that is being measured for rate limiting. The default value of this parameter is set to 5 seconds.

The SystemLogRateLimitBurst defines the amount of messages, that have to occur in the time limit of SystemLogRateLimitInterval, to trigger rate limiting. The default parameter value is 200 messages.

$IMUXSockRateLimitBurst [number] – equivalent to: RateLimit.Burst, specifies the rate-limiting burst in number of messages.

$IMUXSockRateLimitSeverity [numerical severity] – equivalent to: RateLimit.Severity, specifies the severity of messages.

“IMUxSockRate*“is necessary when imuxsock is independent from syssock, like with SysSock.Use = “off”.

“$IMUxSockRateLimitSeverity” is not necessary for disabling ratelimitting, but better only if ratelimit messages are accidentally logged.

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

Filed Under: CentOS/RHEL 6, Linux

Some more articles you might also be interested in …

  1. CentOS / RHEL 4 : How to configure interface bonding (NIC teaming)
  2. How to configure Linux Resource Groups (cgroups) for MySQL
  3. CentOS/RHEL – How to Remove stale ISCSI Target Node Information from ISCSI Initiator Server
  4. How to Run SCP Without Password Prompt Interruption in Linux
  5. Audit rules for monitoring Copy, move, delete and kill Commands In Linux
  6. DNF Update Fails With Error “GPG check FAILED” – CentOS/RHEL 8
  7. Understanding DM-multipath deamon (multipathd)
  8. How to configure AD group in sudoers file to provide sudo access to users on Linux system
  9. How to Configure Interface bonding (NIC Teaming) on Oracle Linux 6
  10. Understanding mpathconf Utility to configure DM-Multipath

You May Also Like

Primary Sidebar

Recent Posts

  • qemu-system-x86_64: command not found
  • timedatectl: command not found
  • mpirun.openmpi: command not found
  • startkde: command not found

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright