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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

CentOS / RHEL 6 : How to change SNMP log level

by admin

The default options for snmpd daemon reside in /etc/sysconfig/snmpd file for RHEL 6. You can see the default options by running following command:

# grep OPTIONS /etc/init.d/snmpd

Modifying log levels for SNMP

1. In RHEL6, default configuration in /etc/sysconfig/snmpd for logging level of SNMP is:

# snmpd command line options
# OPTIONS="-LS0-6d -Lf /dev/null -p /var/run/snmpd.pid"

2. The mechanism and destination to use for logging of warning and error messages can be controlled by passing various parameters to the -L flag.

The various log levels available are :

0 or ! for LOG_EMERG
1 or a for LOG_ALERT
2 or c for LOG_CRIT
3 or e for LOG_ERR
4 or w for LOG_WARNING
5 or n for LOG_NOTICE
6 or i for LOG_INFO
7 or d for LOG_DEBUG

3. To reduce log level, “-LS0-6d” can be changed to “-LS0-5d” as shown below.

# snmpd command line options
# OPTIONS="-LS0-5d -Lf /dev/null -p /var/run/snmpd.pid"

4. To take effect, remove “#” and restart snmpd service.

# service snmpd restart

Filed Under: Linux

Some more articles you might also be interested in …

  1. amixer Command Examples in Linux
  2. cpuid Command Examples in Linux
  3. btrfs balance Command Examples in Linux
  4. “az redis” Command Examples
  5. atool Command Examples in Linux
  6. setsid Command Examples in Linux
  7. nmcli device Command Examples in Linux
  8. fail2ban-client: command not found
  9. pdftoppm Command Examples in Linux
  10. latte-dock Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright