SUMMARY: Sol2.4 syslogd & wildcard lovel matching (syslogd replacements)

From: Oli Thor Atlason (olit@centrum.is)
Date: Fri Oct 11 1996 - 12:05:42 CDT


Original question:
> I'm looking to replace my syslogd because mine doesn't understand a wildcard
> as the priority level like this:
> mail.* /var/log/mail
>
> After a lot of searching I found a sendmail replacement in the fwtk
> package
> and managed to get it to compile. It didn't seem to work with Solaris
> though,
> so I dropped it.
>
> Does someone know about a good sendmail replacement that can take a
> wildcard
> for priority and maybe even supports regexps, and works on Sol (2.4) ?

As Christopher Barnard pointed out this isn't a sendmail issue. This was an
error in my original letter, of course I meant to say "syslogd replacement"
but that's what you get when you don't proofread :-/

Solution:

You do not need wildcards as priority, if you specify the lowest logging
level (debug), syslogd will log that level along with all higher levels.
Thus, the line:
*.debug /var/adm/hugelog
will log *everything*.

Note, though, that the syslogd that comes with Solaris does *not* support
regexps. There is a syslogd that supports regular expressions. To get it,
you have to get tis's fwtk package (www.tis.com), and a syslogd replacement
will be i think in the tools/server/syslog dir of the tar file.
This syslogd is based on BSD code, but even I could get it to compile on
Solaris. (The easy way is to use -lucb, the harder way to:

1) #include <sys/fcntl.h> in syslogd.conf
2) use the bcopy, bzero and setlinebuf macros found in the Sol_2_Porting
FAQ:
#define bcopy(src,dest,len) (memmove((dest), (src), (len)))
#define bzero(dest,len) (memset((dest), (char)0, (len)))
#define setlinebuf(fp) setvbuf(fp, NULL, _IOLBF, 0);
3) get around the way SIGnals are used, see the Sol_2_Porting FAQ for hints
on this.

Even having done this, although syslogd compiled fine I couldn't get it to
work for me (note that I don't have any C experience). If you do, kindly
contact me and let me know :-)

Thanks to the following people who told me about how the Solaris syslogd
works:

Viet Q Hoang, <vhoang@lucent.com>
Christopher L. Barnard, <cbarnard@cs.uchicago.edu>

Cheers,

+-------------------------------------------------------+
| Oli Thor Atlason | +354-567-6866 @ home|
| olit@centrum.is | +354-567-6890 * fax |
| http://www.centrum.is/stm/olit/ | +345-562-4111 @ work|
| System Administrator @ Centrum Communications Inc. |
+-------------------------------------------------------+
| Democracy is a device that insures we shall be |
| governed no better than we deserve. |
| -- George Bernard Shaw |
+-------------------------------------------------------+



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:13 CDT