Hi David,
        I tried as your recommendation.Seems there's no odd message when
writing to file using the Oracle template.
        I also tried that only write some part of the message(SIP
message,using 'contains' in rsyslog.conf) to Oracle and all others
message(iptables,etc.) were writing to files.The CPU is working at normal
usage.But once I put all the messages into both Oracle and files,the CPU
usage will be keeping at 99-100%. The concurrent messages per second is
about 4 or 5.
        What's wrong?
        Thanks very much.

Best,
Henry

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of [email protected]
Sent: Monday, May 09, 2011 12:57 PM
To: rsyslog-users
Subject: Re: [rsyslog] help : CPU high load of rsyslog writing to Oracle

given that it only happens after a few messages, I would suspect that there
is something odd with the messages.

could you try writing the messages to a file using the Oracle template and
then look and see if there is anything odd about the messages when it goes
nuts?

the other option is to get a debug dump, but unless it happens right away,
that is likely to be a large dump.

David Lang

  On Mon, 9 May 2011, bxu wrote:

> Date: Mon, 9 May 2011 10:48:50 -0500
> From: bxu <[email protected]>
> Reply-To: rsyslog-users <[email protected]>
> To: [email protected]
> Subject: [rsyslog] help : CPU high load of rsyslog writing to Oracle
> 
> Hi All,
>
>
> I have configured rsyslog writing to Oracle.The writing was 
> successful.But after several messages have been made into Oracle,the 
> CPU use percentage of rsyslogd goes up to 99%-100%.It is abnormally too
much high.
> There's no problem with the cpu usage when writing to files.
>
> Here is my rsyslogd.conf:
> #====================================================
> #*.* >192.168.45.213,rsyslog
>
> # Use traditional timestamp format
> $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
>
> # Provides kernel logging support (previously done by rklogd) $ModLoad 
> imklog # Provides support for local system logging (e.g. via logger 
> command) $ModLoad imuxsock
>
> # Log all kernel messages to the console.
> # Logging much else clutters up the screen.
> #kern.* /dev/console
>
> # Log anything (except mail) of level info or higher.
> # Don't log private authentication messages!
> *.info;mail.none;authpriv.none;cron.none /var/log/messages
>
> # The authpriv file has restricted access.
> authpriv.* /var/log/secure
>
> # Log all the mail messages in one place.
> mail.* -/var/log/maillog
>
> # Log cron stuff
> cron.* /var/log/cron
>
> # Everybody gets emergency messages
> *.emerg *
>
> # Save news errors of level crit and higher in a special file.
> uucp,news.crit /var/log/spooler
>
> # Save boot messages also to boot.log
> local7.* /var/log/boot.log
>
> #Load External Listender
> $modload imudp
>
>
> $UDPServerRun 514
> #SPA Messages
> #*.* /var/log/linksys.log
> $template DynaFile,"/var/log/system-%HOSTNAME%.log"
> *.* -?DynaFile
>
>
> ################
> #### ORACLE ####
> ################
>
> $ModLoad omoracle
> $OmoracleDBUser syslog
> $OmoracleDBPassword syslog
> $OmoracleDB syslog
> $OmoracleBatchSize 1
> $OmoracleBatchItemSize 4096
> $OmoracleStatementTemplate OmoracleStatement
>
> $template OmoracleStatement,"INSERT INTO TEST(hostname,message) 
> VALUES(:hostname,:msg)"
> $template TestStmt,"%hostname%%msg%"
>
> *.*      :omoracle:;TestStmt
> #====================================================
>
> Really appreciate anyone's help!
>
> Best
>
> _______________________________________________
> 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

--
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.

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

Reply via email to