215 Commits

Author SHA1 Message Date
Rainer Gerhards
5af5b1e428 improvements/fixes in queue termination timeout handling
- bugfix: subtle (and usually irrelevant) issue in timout processing
  timeout could be one second too early if nanoseconds wrapped
- set a more sensible timeout for shutdow, now 1.5 seconds to complete
  processing (this also removes those cases where the shutdown message
  was not written because the termination happened before it)
2009-06-25 12:59:13 +02:00
Rainer Gerhards
8eb10a7105 Merge branch 'omfile'
Conflicts:
	ChangeLog
2009-06-24 10:52:06 +02:00
Rainer Gerhards
2533c07a70 Merge branch 'v4-stable' into beta 2009-06-24 10:15:07 +02:00
Rainer Gerhards
11cda87ede Merge branch 'v3-stable' into v4-stable 2009-06-24 10:14:56 +02:00
Michael Biebl
71c57cfa12 minor doc bugfix: name of rsyslogd.pid corrected (was syslogd.pid)
Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2009-06-24 10:14:23 +02:00
Rainer Gerhards
b2fa740b9a optimized TAG handling 2009-06-23 17:14:42 +02:00
Rainer Gerhards
662ad3e4bf optimized hostname processing 2009-06-23 16:32:29 +02:00
Rainer Gerhards
86e37f70fe more strict parsing of the hostname in rfc3164 mode
... hopefully removes false positives (but may cause some trouble
with hostname parsing). For details, see this bug tracker:

  http://bugzilla.adiscon.com/show_bug.cgi?id=126

This patch is not optimal for v4 - another one will follow. The spirit
of this commit is to enable easier backporting if someone is interested
in doing so.
2009-06-23 16:14:19 +02:00
Rainer Gerhards
b1f2e53921 prevented unneccessary apc calls 2009-06-23 15:17:55 +02:00
Rainer Gerhards
b50d13a6a9 restored repeated message reduction processing 2009-06-23 14:50:03 +02:00
Rainer Gerhards
ce5869f7c4 optimized processing of TAG message field 2009-06-22 18:52:30 +02:00
Rainer Gerhards
953d015f44 switched default to keep in line with traditional syslogd behaviour 2009-06-19 14:25:27 +02:00
Rainer Gerhards
7a695d1714 removed uniprocessor optimization
... as it was not even optimal on uniprocessors any longer ;) I keep
the config directive in, maybe we can utilize it again at some later
point in time (questionable).
2009-06-19 12:03:56 +02:00
Rainer Gerhards
2de4964aff optimized handling of MSG part in msg object
WARNING: currently, message repeation processing is disabled, must
be reenabled (but prefer to do some other tests first)
2009-06-18 16:51:40 +02:00
Rainer Gerhards
2f86678c57 optimized TAG handling in msg object 2009-06-18 14:30:21 +02:00
Rainer Gerhards
8628312396 cleaned up/optimized raw message handling in msg object 2009-06-18 13:22:21 +02:00
Rainer Gerhards
f529e8b2c3 Merge branch 'master' into newmsg
Conflicts:
	tools/omfile.c
2009-06-18 11:14:14 +02:00
Rainer Gerhards
a6ed4b59cc Merge branch 'beta' 2009-06-18 11:11:59 +02:00
Rainer Gerhards
17133f2cd1 Merge branch 'v3-stable' into beta 2009-06-18 11:11:07 +02:00
Rainer Gerhards
bca66bc139 some minor bugfixes
- bugfix: invalid error message issued if $inlcudeConfig was on an empty
  set of files (e.g. *.conf, where none such files existed)
  thanks to Michael Biebl for reporting this bug
- bugfix: when run in foreground (but not in debug mode), a
  debug message ("DoDie called") was emitted at shutdown. Removed.
  thanks to Michael Biebl for reporting this bug
- bugfix: some garbagge was emitted to stderr on shutdown. This
  garbage consisted of file names, which were written during
  startup (key point: not a pointer error)
  thanks to Michael Biebl for reporting this bug
- bugfix: startup and shutdown message were emitted to stdout
  thanks to Michael Biebl for reporting this bug
2009-06-18 11:10:28 +02:00
Rainer Gerhards
d2d54013ae going forward in moving string-handling functions to new interface... 2009-06-17 15:22:13 +02:00
Rainer Gerhards
56e462610d further optimized message object
pri, facility and severity string generation simplified
2009-06-17 12:56:58 +02:00
Rainer Gerhards
c4e18c5bab implemented first version of multi-enqueue support, queue side 2009-06-16 15:43:22 +02:00
Rainer Gerhards
6f0db63e9b milestone: input-side multiSubmit capability
... commit before I try to touch the queue side ;)
2009-06-16 15:13:47 +02:00
Rainer Gerhards
aef1a38fe8 fixing problems that occurred during the last merge 2009-06-16 13:28:18 +02:00
Rainer Gerhards
98348ae03d Merge branch 'master' into omfile
Conflicts:
	ChangeLog
	runtime/msg.h
	tcps_sess.c
	tcpsrv.c
	tools/syslogd.c
2009-06-16 12:59:55 +02:00
Rainer Gerhards
74b2b24f50 removed long-obsoleted property UxTradMsg
... as well as some cleanup (some commented-out code is left to
support UxTradMsg again is someone really complains ;)).
2009-06-16 12:31:27 +02:00
Rainer Gerhards
f7579e68a6 done various optimizations to the stringbuf and its users 2009-06-16 11:36:05 +02:00
Rainer Gerhards
015d17ca70 some performance optimizations
- saved gettimeofday() calls in imtcp (and increased reception buffer)
- somewhat optimized stringbuf.c
- some other optimizations
2009-06-16 08:46:45 +02:00
Rainer Gerhards
16ecb90c3a omfile buffers are now synchronized after inactivity
This is the first shot at this functionality. Currently, we run off a fixed
counter in the rsyslogd mainloop, which needs to be restructured. But this
code works, so it is a good time for a commit.
2009-06-15 13:44:51 +02:00
Rainer Gerhards
7f78b2ef65 removed forgotten debug message 2009-06-15 08:13:41 +02:00
Rainer Gerhards
ff6232d2be bugfix: error messages were not emitted to stderr in forked mode
stderr and stdo are now kept open across fork()
2009-06-15 08:12:14 +02:00
Rainer Gerhards
ca0ddc30a3 completed multi-ruleset core support
... as well as added multi-ruleset support for imtcp
2009-06-12 15:31:08 +02:00
Rainer Gerhards
21dafea3ee implemented $OMFileFlushOnTXEnd directive
plus some cleanup...
2009-06-12 12:18:17 +02:00
Rainer Gerhards
e3d9843c85 re-enabled pipe, tty and console in omfile
... by moving code to stream.c. Thanks to the new design, new cases are
not really needed, resulting in cleaner code.

I also did a cleanup of header file usage as a side-activity.
2009-06-12 11:47:00 +02:00
Rainer Gerhards
1af948107e fixed abort when emergency configuration was activated
this regression was introduced last friday, so this is *NOT* present
in any released version.
2009-06-12 10:14:45 +02:00
Rainer Gerhards
0917edf26d re-enabled outchannel functionality 2009-06-12 09:47:44 +02:00
Rainer Gerhards
1c8fe77b78 added $Ruleset config command
so we now can define multiple rule sets, we just can not use them ;)
That means we have the foundation to bind listeners to different
rule sets.
2009-06-10 19:03:38 +02:00
Rainer Gerhards
6f4e3c4e4c restructered code in perparation for multiple rule set support
... this was long overdue, and I finlly tackeld it. It turned out to
be more complex than I initially thought. The next step now probably is
to actually implement multiple rule sets and the beauty that comes
with them.
2009-06-10 16:49:14 +02:00
Rainer Gerhards
9704f129f7 added capability to fsync() queue disk files for enhanced reliability
also adds speed, because you do no longer need to run the whole file
system in sync mode. New testbench and new config directives:
- $MainMsgQueueSyncQueueFiles
- $ActionQueueSyncQueueFiles
2009-06-09 19:00:18 +02:00
Rainer Gerhards
8d1e2e496c improved error handling and added fsync() support
... restoring missing functionality after the restructuring of imfile. As
a side-effect, this also lays the foundation for even more reliable queue
engine operations (but this is not yet done).
2009-06-08 18:39:06 +02:00
Rainer Gerhards
84b7867537 cleanup in preparation of next steps
now cleand up omfile and straighted out some things. The only commented-out
code left is code that must be moved/merged to the stream class, my next target.
2009-06-05 18:41:28 +02:00
Rainer Gerhards
68f0ffb29a made dynafiles working again
now only stream class is utilized. ttys, pipes and outchannel functionality
is currently disabled. But the testbench worked again. Cleanup needed, will
do this with next commit (it may break things and I like to have this
milestone here).
2009-06-05 15:41:05 +02:00
Rainer Gerhards
76da7f9f4e added $OMFileIOBufferSize config directive and plumbing 2009-06-04 15:59:37 +02:00
Rainer Gerhards
f2800ba261 modified stream class and omfile to work with it
now some basic operations are carried out via the stream class.
2009-06-04 15:10:24 +02:00
Rainer Gerhards
9e434f19a9 cleaned up stream class ...
... and also made it callable via an rsyslog interface rather then
relying on the OS loader (important if we go for using it inside
loadbale modules, which we soon possible will)
2009-06-04 12:15:59 +02:00
Rainer Gerhards
768836ab79 reduced max value for $DynaFileCacheSize to 1,000
The former maximum of 10,000 really made no sense, even 1,000 is very high,
but we like to keep the user in control ;)).

Also, some general cleanup was done.
2009-06-04 11:05:41 +02:00
Rainer Gerhards
69eac5341d added gzip header to output files
so they can now be processed with the "regular" gzip tools
2009-06-03 15:32:39 +02:00
Rainer Gerhards
f54e72cec0 first proof of concept on zipped file writer
This DOES NOT work sufficiently well, I just wanted to verify that
zip writing is possible and files are readable. Will be refined
soon.
2009-06-03 14:45:09 +02:00
Rainer Gerhards
02d8dc27f9 Merge branch 'udpdrop'
Conflicts:
	runtime/conf.c
2009-05-29 17:42:36 +02:00