Thanks, this is useful and helps understanding what is going on. I think
what you see is an artifact of the two time() calls I mentioned. To
verify, I'd appreciate if you could try out the latest from the perf
branch, which can be found here:

http://git.adiscon.com/?p=rsyslog.git;a=snapshot;h=1531c541b294b6c029e5de9a01d4d8499f7e4718;sf=tgz

Note that you need to setup the build environment (quite easy, but you
need to know). Details at:

http://www.rsyslog.com/doc-build_from_repo.html

These two timestamps, for internally generated sources, should be the
same in that version.

Note, however, that, for externally generated messages, timereceived is
whatever is recorded inside the message. There are various reasons for
this not being correct, clock skew being a highly probably cause (which
is also often found).

HTH
Rainer

On Wed, 2008-10-01 at 12:37 +0200, Luigi Perroti wrote:
> Here it is:
> 
> $ModLoad imfile
> $ModLoad imuxsock
> $ModLoad imklog
> $ModLoad ommysql
> $ActionOmmysqlServerPort 1234
> 
> $MaxMessageSize 8k
> 
> $EscapeControlCharactersOnReceive off
> 
> $FileOwner root
> $FileGroup root
> $FileCreateMode 0600
> 
> $InputFileName /path/to/log/php-fpm.log
> $InputFileTag php-fpm
> $InputFileStateFile php-fpm.state
> $InputFileSeverity notice
> $InputFileFacility local5
> $InputRunFileMonitor
> 
> $MainMsgQueueType LinkedList
> $MainMsgQueueSize 20000
> $MainMsgQueueFileName main-spool
> $MainMsgQueueMaxDiskSpace 200M
> $MainMsgQueueWorkerThreadMinimumMessages 2500
> $MainMsgQueueWorkerThreads 1
> $MainMsgQueueWorkerTimeoutThreadShutdown 10000
> $MainMsgQueueSaveOnShutdown on
> 
> $template my-rsyslog-schema,"insert into messages(hostname, sent,
> sent_subseconds, received_by_rsyslog, received_subseconds, process,
> facility, severity, message) values ('%hostname%',
> '%timereported:::date-mysql%', %timereported:::date-subseconds%,
> '%timegenerated:::date-mysql%', %timegenerated:::date-subseconds%,
> '%programname%', '%syslogfacility-text%', '%syslogseverity-text%',
> '%msg%')",sql
> 
> *.* :ommysql:127.0.0.1,rsyslog,rsyslog_user,password;my-rsyslog-schema
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com

_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com

Reply via email to