schoch@trident.arc.nasa.gov (Steve Schoch) (08/13/90)
In the default syslog.conf file, there are several m4 ifdef statements that say "ifdef(`LOGHOST', file, @loghost)". Apparently, `LOGHOST' is an m4 variable that is supposed to get defined if syslogd is running on the loghost (server) and not defined if syslogd is running on a client. Looking through /usr/etc/syslogd with strings(1), I find the following string: "define(LOGHOST, 1)". I assume syslogd will pass this string along with syslog.conf to m4 if the current host is the file server. My question is: "How does syslogd find out whether the current host is the loghost or not?" It doesn't seem to work on our system. Does it use gethostbyname()? I have modified libc.so to use the nameserver instead of the host table. Steve
glenn@csri.toronto.edu (Glenn Mackintosh) (09/02/90)
schoch@trident.arc.nasa.gov (Steve Schoch) writes: >My question is: "How does syslogd find out whether the current host is >the loghost or not?" It doesn't seem to work on our system. Does it use >gethostbyname()? I have modified libc.so to use the nameserver instead of >the host table. Since you are using the nameserver you are going to need an A record for "loghost" in the nameserver data. I.e. something of the form: loghost IN A ???.???.???.??? Glenn Mackintosh Univ. of Toronto CSNET/ARPA: glenn@utcs.{toronto.edu,utoronto.ca} CDNNET: glenn@utcs.toronto.cdn BITNET: glenn@utcs.utoronto.bitnet (may not work from all sites) UUCP: uunet!utcs!glenn
mrapple@quack.sac.ca.us (Nick Sayer) (10/08/90)
glenn@csri.toronto.edu (Glenn Mackintosh) writes: >schoch@trident.arc.nasa.gov (Steve Schoch) writes: >>My question is: "How does syslogd find out whether the current host is >>the loghost or not?" It doesn't seem to work on our system. Does it use >>gethostbyname()? I have modified libc.so to use the nameserver instead of >>the host table. >Since you are using the nameserver you are going to need an A record for >"loghost" in the nameserver data. I.e. something of the form: >loghost IN A ???.???.???.??? Perhaps a better idea would be to add loghost as an alternate name to your host name in /etc/hosts -- and therefore in the yellow pages. Having it in the name server means everyone knows about it, and they don't need to. You should also probably have a mailhost entry, depending on your setup. Our /etc/hosts: localhost 127.0.0.1 uop 138.9.200.1 loghost mailhost zeus 138.9.200.2 So the yellow pages can tell you who is the mailhost and loghost, but nobody else really needs to know. Also, there is a bug in older syslogs that keep them from working in this regard. The fix is to simply define LOGHOST near the begining of the file on your loghost machine. Kinda defeats the purpose. SunOS 4.1 does not have this bug. SunOS 4.0 does. I don't know where in between it got fixed. Nick Sayer | Disclaimer: N6QQQ [44.2.1.17 soon] | "Just because you're reading my post doesn't mrapple@quack.sac.ca.us | mean we're gonna take long showers together." 209-952-5347 (Telebit) | -- Gunnery Sgt. Thomas Highway