Bug 23476

Summary: ucd-snmp does not log to syslog
Product: [Retired] Red Hat Linux Reporter: Joerg Dorchain <joerg>
Component: ucd-snmpAssignee: Crutcher Dunnavant <crutcher>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-01-06 09:28:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joerg Dorchain 2001-01-06 09:22:13 UTC
snmpd does not use the syslog, but instead uses a log file of its own,
/var/log/syslog.
Whilst the endles growing of this file was dealt with int bug #21399, my
original interest of bug #23403 was to have it log via syslog (which give
far more flexibility, e.g. remote logging)
Therefor I attach again a patch for the starting snmpd with some options,
this time with an explanation of every single option used.

-s means log to syslog (desried effect)
-l /dev/null is here to make snmpd stop using a file which grows without
end. (it would be          better to add an option not to use file logging
at all, but I didn#t want to play with the source    ;-)
-P /var/run/snmpd makes snmpd created a pid file. This assists the
/etc/init.d functions in          killing the right process and is IMHO the
correct behaviour for a daemon.
-a makes snmpd log addresses, too.

Sorry to bug you again, but I felt misunderstood the first time.

Comment 1 Joerg Dorchain 2001-01-06 09:28:52 UTC
--- snmpd.redhat        Fri Jan  5 12:16:36 2001
+++ snmpd       Fri Jan  5 12:17:06 2001
@@ -14,12 +14,14 @@
 # source function library
 . /etc/rc.d/init.d/functions
 
+OPTIONS="-s -l /dev/null -P /var/run/snmpd -a"
+
 RETVAL=0
 
 case "$1" in
   start)
        echo -n "Starting snmpd: "
-        daemon /usr/sbin/snmpd
+        daemon /usr/sbin/snmpd $OPTIONS
        RETVAL=$?
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/snmpd
        echo



Comment 2 Jeff Johnson 2001-01-06 09:37:01 UTC
Thanks for the clarification. Added in ucd-snmp-4.2-3.