Bug 23476 - ucd-snmp does not log to syslog
Summary: ucd-snmp does not log to syslog
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: ucd-snmp
Version: 7.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Crutcher Dunnavant
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-01-06 09:22 UTC by Joerg Dorchain
Modified: 2007-04-18 16:30 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-01-06 09:28:55 UTC
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.