rgerhards wrote:Thanks for the great post, for now just one answerdlang wrote:it seems as if you need the timestamp at the time that you recieve the message, but can't you just store that time in the Msg structure and everything after that uses the one of the two timestamps in the message (either the time provided by the sending system or the time that rsyslog recieved the message), I'm missing why you would need any other timestamps
In regard to the message, this is done. But there is more than the message. The output, for example, needs to know when it has last *processed* a message, so that it can apply the various "last processed" time related comparisons. Note that due to the queue, the time a message is processed may greatly differ from the time the message was received. This drives logic like "process only when there are n messages within m seconds" and things like this.
rgerhards wrote:If you can, it would be good if you pulled data from my git repository at git.adiscon.com/git/rsyslog.git. devel is the master branch. I have done some more enhancements, but nothing of the same magnitude yet. But I expect more patches
dlang wrote:what I'm missing is why anyone would care when the message was stored. I can see all sorts of reasons to do logic based on time+quantity for messages using the time that the messages were generated (or recieved if you don't trust the clocks on the sending servers), but I can't think of what logic someone would want to apply based on when the messages were processed/stored.
the only thing that I can think of that would have even a scrap of validity would be to try and surpress alerts if the message was too old, but even that is very questionable.
dlang wrote:rgerhards wrote:If you can, it would be good if you pulled data from my git repository at git.adiscon.com/git/rsyslog.git. devel is the master branch. I have done some more enhancements, but nothing of the same magnitude yet. But I expect more patches
unfortunantly I can't use git from behind my company firewall, I'll have to stage this through my home system, but I was glad to see that you are using git, it will make it easier to work with (once I get over the initial setup hassles)
rgerhards wrote:If you can, it would be good if you pulled data from my git repository at git.adiscon.com/git/rsyslog.git. devel is the master branch. I have done some more enhancements, but nothing of the same magnitude yet. But I expect more patches
dlang wrote:grabbing the snapshot of bcb97650683bbcb1ecdacd0c2a6052ef836d3eda doesn't work as it doesn't include the configure program. I'll unpack it on top of my 3.21.4 image to get it working
hmm, I always interpreted this to in such a way that I could do it on time_recieved (including from a local source) rather then time_output. I guess you can argue it either way.rgerhards wrote:dlang wrote:what I'm missing is why anyone would care when the message was stored. I can see all sorts of reasons to do logic based on time+quantity for messages using the time that the messages were generated (or recieved if you don't trust the clocks on the sending servers), but I can't think of what logic someone would want to apply based on when the messages were processed/stored.
the only thing that I can think of that would have even a scrap of validity would be to try and surpress alerts if the message was too old, but even that is very questionable.
You think too much in terms of storing something on diskThis is not needed for the user, the property is not even exposed. We need it e.g. for mark message processing. Mark messages must only be written if no other message has recently been written to the output. So we need to know when the last message was written.
$ActionExecOnlyOnceEveryInterval is another sample case where we need the time of dequeue. There are others, but as with them, time() is called only when these features are enabled.
rgerhards wrote:mmhhh... I have thought a bit more about it. In the later case, I now tend to follow one can argue either way. But with the mark messages? I am not sure... To be honest, I'd like to be able to see it in the way you do, because that would remove the one instance that blocks me from removing the time call...
Any more arguments?
dlang wrote:a quick test of the new code is recieving ~88,000 messages/sec the reader thread is at 100% of the cpu and the writer thread is at 99% of the cpu
a quick strace of the threads (non-debug version) is showing that the futex calls are gone from the reader thread, but there are a couple of them in the writer thread.
more detail to follow when I have time to test the debug version.
rgerhards wrote:dlang wrote:grabbing the snapshot of bcb97650683bbcb1ecdacd0c2a6052ef836d3eda doesn't work as it doesn't include the configure program. I'll unpack it on top of my 3.21.4 image to get it working
You don't need configure.
autoreconf -fvi
builds it for you.
Users browsing this forum: No registered users and 0 guests