• 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

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. udisksctl Command Examples in Linux
  2. mkinitrd: command not found
  3. links Command Examples in Linux
  4. powertop: command not found
  5. autorandr: command not found
  6. isosize Command Examples in Linux
  7. as: command not found
  8. snapper Command Examples in Linux
  9. arch-chroot Command Examples in Linux
  10. file: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • cf: Command-line tool to manage apps and services on Cloud Foundry
  • certutil: Manage keys and certificates in both NSS databases and other NSS tokens
  • cdk: A CLI for AWS Cloud Development Kit (CDK)
  • cd: Change the current working directory

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright