Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
syslog(3) single line length limit
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Lew Pitcher  
View profile  
 More options Jul 15 2012, 9:38 pm
Newsgroups: comp.os.linux.development.apps
From: Lew Pitcher <lpitc...@teksavvy.com>
Date: Sun, 15 Jul 2012 21:38:41 -0400
Local: Sun, Jul 15 2012 9:38 pm
Subject: syslog(3) single line length limit
Current environment:
  Slackware Linux 32bit 13.0
  sysklogd v1.4.1
  glibc v2.9b

I've encountered some odd artifacts in the contents of my syslog. I have a
custom program that writes to syslog data generated by a script's stdout.

The custom program demarshalls stream data from a pipe into lines, and
writes each line (from start of buffer to first newline) in a syslog(3)
call. On occasion, I see certain lines split across syslog line boundaries,
and/or spurious blank lines. Like...

 id1: PREP: usb_backup: clean, 9222/39075840 files, 28161313/78142160 blocks
 id1: PREP:  (check in 4 mounts)
and
 id2: POST: usb_backup: clean, 9222/39075840 files, 28158224/78142160 blocks
 id2: POST:  (check in 3 mounts)
 id2: POST:

(NB: I've (obviously) shortened the lines for inclusion here, by dropping
the date/time stamp, the systemname, and the program id. I note that, with
a longer ID, the lines /seem/ to break at a different place than the ones
with a shorter ID. This may be a /clue/.)

I've both walked through the demarshalling/logging logic, /and/ examined the
other line output written to syslog through syslog(3), and can't find any
error with the code. I'll continue to examine this avenue, and may post an
example of the code later.

However, it occurs to me that syslog(3) (and the underlying syslogd(8)
logging daemon) may have built-in line-length limits that cause /syslogd/
to fold the data written in single syslog(3) calls into multiple lines in
the syslog target file (in this case /var/log/messages).

The problem is that neither the syslog(3) manpage nor the syslogd(8) manpage
mention such a line-folding behaviour, and do not note any syslog(3)
line-length limits.

So, is anyone out there familiar with Linux syslog enough to tell me if and
what the line length limit is?

Thanks in advance
--
Lew Pitcher
"In Skills, We Trust"


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rainer Weikusat  
View profile  
 More options Jul 15 2012, 10:38 pm
Newsgroups: comp.os.linux.development.apps
From: Rainer Weikusat <rweiku...@mssgmbh.com>
Date: Mon, 16 Jul 2012 03:38:55 +0100
Local: Sun, Jul 15 2012 10:38 pm
Subject: Re: syslog(3) single line length limit

Lew Pitcher <lpitc...@teksavvy.com> writes:

[...]

IIRC (I would need to check this with the 'BSD syslog RFC' which I
can't easily do at the moment), the limit for the syslog network
protocol is 1024 bytes. But it should be fairly easy to debug this,
ie, by additionally writing all data sent to the logger to a file. If
the output in the file is correct, either the syslog C library
routine(s) or the syslog daemon is munging your data. Otherwise, it is
obviously an error in the code generating the input.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »