Mailing List Archive

CRLF logging
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hello,

when testing conserver I found that the logfiles contain CRLF, LF and CR
line terminators.
Most lines are ended with CRLF (but I also saw lines with only LF).
Also, there is often a CR right after the timestamp.
See the example below (note the "^M"s).

My configuration is rather simple, it is very similar to average.cf
(except for setting timestamp to "1lab").

Both the conserver and the host of the serial console are running
Red Hat Enterprise Linux 3.0.

Who is to blame, conserver or the Linux server system?
I remember seeing something like this in Cyclades TS logs, so I suppose
it is not very unusual.
Is there any way to prevent this?

Thanks,
Michael


[Fri Mar 26 11:56:19 2004]^M aic7890/91: Ultra2 Wide Channel A, SCSI Id=7, 32/253 SCBs
[Fri Mar 26 11:56:19 2004]^M
[Fri Mar 26 11:56:19 2004]^Mscsi1 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36
[Fri Mar 26 11:56:19 2004]^M <Adaptec aic7880 Ultra SCSI adapter>


[Fri Mar 26 11:57:10 2004]Starting Red Hat Network Daemon: [ OK ]^M^M
[Fri Mar 26 11:57:11 2004]Starting mdmpd: [ OK ]^M^M
[Fri Mar 26 11:57:12 2004]^M
[Fri Mar 26 11:57:12 2004]Red Hat Enterprise Linux AS release 3 (Taroon Update 1)^M
[Fri Mar 26 11:57:12 2004]Kernel 2.4.21-9.0.1.ELsmp on an i686^M
[Fri Mar 26 11:57:12 2004]^M
[Fri Mar 26 11:57:12 2004]XXX.uibk.ac.at login: ^M
[Fri Mar 26 12:00:05 2004]Red Hat Enterprise Linux AS release 3 (Taroon Update 1)^M
[Fri Mar 26 12:00:05 2004]Kernel 2.4.21-9.0.1.ELsmp on an i686^M
[Fri Mar 26 12:00:05 2004]^M
[Fri Mar 26 12:00:05 2004]XXX.uibk.ac.at login: ^M


- --
Michael Redinger
Zentraler Informatikdienst (Computer Centre)
Universitaet Innsbruck
Technikerstrasse 13 Tel.: ++43 512 507 2335
6020 Innsbruck Fax.: ++43 512 507 2944
Austria Mail: Michael.Redinger@uibk.ac.at
BB98 D2FE 0F2C 2658 3780 3CB1 0FD7 A9D9 65C2 C11D
http://www.uibk.ac.at/~c102mr/mred-pubkey.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAZDTzD9ep2WXCwR0RAumcAJ9T9a0lg6QwS5rZpAVPXozWWZfVsACdEEmW
E6kVlFkDbL8kYzuTSTSSPo4=
=3PQS
-----END PGP SIGNATURE-----
Re: CRLF logging [ In reply to ]
On Fri, Mar 26, 2004 at 02:49:34PM +0100, Michael Redinger wrote:
> when testing conserver I found that the logfiles contain CRLF, LF and CR
> line terminators.
> Most lines are ended with CRLF (but I also saw lines with only LF).
> Also, there is often a CR right after the timestamp.
> See the example below (note the "^M"s).

that's pretty wild. not surprising, really, but interesting. the
characters spit out by various pcs when booting is fun to see.

> Who is to blame, conserver or the Linux server system?

the server. unless there's a bug, conserver "blindly" takes all the
data it gets from the console and writes it to the log file. if it
weren't for the timestamping, it would be a byte-for-byte replica of
everything it receives. since you have timestamping, the extra info is
also written. the only interpretation conserver is doing in your case
is looking for a LF, so it can insert the timestamp. but, again, any
binary data, CR, etc is coming from the console.

> I remember seeing something like this in Cyclades TS logs, so I suppose
> it is not very unusual.

extactly.

> Is there any way to prevent this?

not from withing conserver. if conserver were to just strip all CR
characters, it might drop things that are actually important. if it
weren't for the 7-bit mode (-7 option), i'd say that all the data is
always left exactly as it was recieved (with the exception of inserts
like timestamp). the 7-bit mode is probably useless these days (and if
you're seeing bad high-bit data, you've probably got a low-level serial
configuration issue) and i'd like to get rid of it so i can say that
conserver always logs exactly what it sees coming from the console 100%
of the time. that's a basic philosophy i'd like to maintain (hence my
desire to drop the -7 stuff).

does any of that help?

Bryan