[syslog-ng] Redirect syslog-ng to ttyS0
Balazs Scheidler
bazsi at balabit.hu
Thu Nov 29 11:14:12 CET 2007
On Wed, 2007-11-28 at 14:46 +0100, Vidar Tyldum Hansen wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Jumping in on this thread!
>
> > On Sun, 2007-11-18 at 19:39 +0100, Kjell Danielsen wrote:
> >> Here is a new trace. I start the trace before I logged in on ttyS0.
> >> After I logged in the syslog output to ttyS0 stops, and I have to
> >> restart the server to get the syslog output on ttyS0.
> >>
> >> Kjell
> >
> > the reason syslog-ng stops, because it receives a POLLERR/POLLHUP event
> > in this case:
> >
> > poll([{fd=13, events=0, revents=POLLERR|POLLHUP
> >
> > Hm... did syslog-ng report any kind of error in this case? I'm expecting
> > an
> >
> >
> > msg_error("EOF occurred while idle",
> > evt_tag_int("fd", self->fd->fd),
> > NULL);
> >
> > or, a
> >
> > msg_error("I/O error occurred while writing",
> > evt_tag_int("fd", fd->fd),
> > evt_tag_errno(EVT_TAG_OSERROR, errno),
> > NULL);
> >
> > message. I can't see anything like this in the stace file, but maybe you
> > are not reading the internal() log source?
>
> I am a distant colleague of Kjell and put together a labtest for this
> case. I can confirm the behaviour and the strace ending with
> POLLERR/POLLHUP, and no errors given from syslog-ng.
>
> I see that syslog-ng changes permissions on /dev/ttyS= and when you log
> in on the console port 'login' or 'agetty' changes the permissions again
> causing syslog-ng to stop.
I think this is not a permission problem. syslog-ng opens the device
once, and then it is kept opened. Permissions checking is usually
applied at open time and not any later.
--
Bazsi
More information about the syslog-ng
mailing list