RE: High CPU usage impact to log4j
Yup...but...you know, I cannot do the trouble shooting on the Customer Field...that's not permitted. That's why I always want to understand in which case the log4j and "kill -3" will not work correctly. I doubt that maybe I need to involve SUN support to see why the JVM will not handle the "kill -3" signal. Perhaps, they have the same root cause. Thanks for your advice. Matt Brown-20 wrote: > > I believe with JDK5 you can use jconsole, which is very similar to > VisualVM and has most of the same sort of features. Perhaps that will help > in the future. > > > From: Arica [xun...@263.net] > Sent: Wednesday, June 24, 2009 10:39 PM > To: log4j-user@logging.apache.org > Subject: Re: High CPU usage impact to log4j > > Hi, Andersen > > Thanks for your suggestions. > > The Visual VM is quite powerful tool, but introduced from JDK6. My issue > was > happened at JDK5:( > Besides, before add some algorithm to dump the JVM snapshot, I need to > understand what's the root cause to result in the abnormal behavior of > log4j. The most frustrating thing is that I cannot reproduce the issue > with > 100% (log4j and kill -3 signal cannot be handled by JVM) :( > > Anyway, thank you again. > > > > Thorbjørn Ravn Andersen wrote: >> >> Arica skrev den 24-06-2009 08:22: >>> 90% CPU usage. I really want to know that my JVM is doing...I know I can >>> do >>> hanks. >>> >> Attach to the JVM with jvisualvm (available in the Java 6 JDK) >> >> -- >> Thorbjørn Ravn Andersen "...plus... Tubular Bells!" >> >> >> - >> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org >> For additional commands, e-mail: log4j-user-h...@logging.apache.org >> >> >> > > -- > View this message in context: > http://www.nabble.com/High-CPU-usage-impact-to-log4j-tp24179322p24196085.html > Sent from the Log4j - Users mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-user-h...@logging.apache.org > - > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-user-h...@logging.apache.org > > > -- View this message in context: http://www.nabble.com/High-CPU-usage-impact-to-log4j-tp24179322p24196800.html Sent from the Log4j - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
Re: AW: - Log4j File appenders-generate files specified by appenders only in first usage
Yea. Thanks for replying. Bender Heri wrote: > > You cannot do this by configuration. > What is the problem of having empty log files? > Heri > > -Ursprüngliche Nachricht- > Von: inosh [mailto:inosh...@gmail.com] > Gesendet: Mittwoch, 24. Juni 2009 10:59 > An: log4j-user@logging.apache.org > Betreff: [SPAM (Keyword Checking)] - Log4j File appenders-generate files > specified by appenders only in first usage - Found word(s) list error in > the Text body > > > Hi All, > > I'm little bit new to log4j. I have used log4j xml to configure file > appenders and loggers. But i want to take some control over those appender > file creation. All the files specified in fileAppenders are generating > when loading log4j.xml. What i want is to generate those files only when > the first usage of the loggers which have these files get append. For > example if error.txt file is specied in some FileAppender, the file is > creating when log4j.xml is loaded. But what want is to create those files > only when the first usage of the logger which as this file as an Appender. > This can be done by creating appenders in manually in code. But I was > highly required to use log4j.xml. Please help me with this. > > Thanks. > -- > View this message in context: > http://www.nabble.com/Log4j-File-appenders-generate-files-specified-by-appenders-only-in-first-usage-tp24181035p24181035.html > Sent from the Log4j - Users mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-user-h...@logging.apache.org > > > > - > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-user-h...@logging.apache.org > > > -- View this message in context: http://www.nabble.com/AW%3A---Log4j-File-appenders-generate-files-specified-by-appenders-only-in-first-usage-tp24183202p24196496.html Sent from the Log4j - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
RE: High CPU usage impact to log4j
I believe with JDK5 you can use jconsole, which is very similar to VisualVM and has most of the same sort of features. Perhaps that will help in the future. From: Arica [xun...@263.net] Sent: Wednesday, June 24, 2009 10:39 PM To: log4j-user@logging.apache.org Subject: Re: High CPU usage impact to log4j Hi, Andersen Thanks for your suggestions. The Visual VM is quite powerful tool, but introduced from JDK6. My issue was happened at JDK5:( Besides, before add some algorithm to dump the JVM snapshot, I need to understand what's the root cause to result in the abnormal behavior of log4j. The most frustrating thing is that I cannot reproduce the issue with 100% (log4j and kill -3 signal cannot be handled by JVM) :( Anyway, thank you again. Thorbjørn Ravn Andersen wrote: > > Arica skrev den 24-06-2009 08:22: >> 90% CPU usage. I really want to know that my JVM is doing...I know I can >> do >> hanks. >> > Attach to the JVM with jvisualvm (available in the Java 6 JDK) > > -- > Thorbjørn Ravn Andersen "...plus... Tubular Bells!" > > > - > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-user-h...@logging.apache.org > > > -- View this message in context: http://www.nabble.com/High-CPU-usage-impact-to-log4j-tp24179322p24196085.html Sent from the Log4j - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
Re: High CPU usage impact to log4j
Hi, Andersen Thanks for your suggestions. The Visual VM is quite powerful tool, but introduced from JDK6. My issue was happened at JDK5:( Besides, before add some algorithm to dump the JVM snapshot, I need to understand what's the root cause to result in the abnormal behavior of log4j. The most frustrating thing is that I cannot reproduce the issue with 100% (log4j and kill -3 signal cannot be handled by JVM) :( Anyway, thank you again. Thorbjørn Ravn Andersen wrote: > > Arica skrev den 24-06-2009 08:22: >> 90% CPU usage. I really want to know that my JVM is doing...I know I can >> do >> hanks. >> > Attach to the JVM with jvisualvm (available in the Java 6 JDK) > > -- > Thorbjørn Ravn Andersen "...plus... Tubular Bells!" > > > - > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-user-h...@logging.apache.org > > > -- View this message in context: http://www.nabble.com/High-CPU-usage-impact-to-log4j-tp24179322p24196085.html Sent from the Log4j - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
AW: - Log4j File appenders-generate files specified by appenders only in first usage
You cannot do this by configuration. What is the problem of having empty log files? Heri -Ursprüngliche Nachricht- Von: inosh [mailto:inosh...@gmail.com] Gesendet: Mittwoch, 24. Juni 2009 10:59 An: log4j-user@logging.apache.org Betreff: [SPAM (Keyword Checking)] - Log4j File appenders-generate files specified by appenders only in first usage - Found word(s) list error in the Text body Hi All, I'm little bit new to log4j. I have used log4j xml to configure file appenders and loggers. But i want to take some control over those appender file creation. All the files specified in fileAppenders are generating when loading log4j.xml. What i want is to generate those files only when the first usage of the loggers which have these files get append. For example if error.txt file is specied in some FileAppender, the file is creating when log4j.xml is loaded. But what want is to create those files only when the first usage of the logger which as this file as an Appender. This can be done by creating appenders in manually in code. But I was highly required to use log4j.xml. Please help me with this. Thanks. -- View this message in context: http://www.nabble.com/Log4j-File-appenders-generate-files-specified-by-appenders-only-in-first-usage-tp24181035p24181035.html Sent from the Log4j - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
Re: High CPU usage impact to log4j
Arica skrev den 24-06-2009 08:22: 90% CPU usage. I really want to know that my JVM is doing...I know I can do hanks. Attach to the JVM with jvisualvm (available in the Java 6 JDK) -- Thorbjørn Ravn Andersen "...plus... Tubular Bells!" - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
Log4j File appenders-generate files specified by appenders only in first usage
Hi All, I'm little bit new to log4j. I have used log4j xml to configure file appenders and loggers. But i want to take some control over those appender file creation. All the files specified in fileAppenders are generating when loading log4j.xml. What i want is to generate those files only when the first usage of the loggers which have these files get append. For example if error.txt file is specied in some FileAppender, the file is creating when log4j.xml is loaded. But what want is to create those files only when the first usage of the logger which as this file as an Appender. This can be done by creating appenders in manually in code. But I was highly required to use log4j.xml. Please help me with this. Thanks. -- View this message in context: http://www.nabble.com/Log4j-File-appenders-generate-files-specified-by-appenders-only-in-first-usage-tp24181035p24181035.html Sent from the Log4j - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
Re: High CPU usage impact to log4j
Hi, all Please just ignore what I have said. I've retested the case again, the log4j did output logs even the resided JVM took more than 95% CPU. (I use infinite loop to make the JVM to takes most CPU of the OS) In fact, our application deploys total 7 JVMs. When the issue reported by our customer, I found that one of 7 JVMs took more than 90% CPU. After checking all debug logs, only the JVM with more than 90% CPU usage did not have any logs output...the other 6 worked well...the overal OS CPU idle is 0...that's why I suspected at the very begining that the high CPU usage is the root cause to make log4j not work. Rignt now, I'm wondering...that why my own simulation cannot reproduce the issue? It seems that the high CPU usage of JVM is not the real root cause of the problem...so...do you have any hints about the "not log output" issue of log4j? I'm quite frustrated... Any suggestions or tips would be appreciated. Arica wrote: > > Hi, buddies > > I deployed the log4j as the logging tool of my JVM. Recently, I found that > the log4j does not work, I could not find any log output when the JVM > encountered the high CPU usage issue. In the case, the JVM took more than > 90% CPU usage. I really want to know that my JVM is doing...I know I can > do it through JVM thread dump. But the question is why log4j does not > output any logs? I cannot find any warning from the guild to state that > log4j will lose logs during the CPU penic. > > Do you have any idea about that? Or does log4j define any threshold of CPU > usage? > > Thanks. > -- View this message in context: http://www.nabble.com/High-CPU-usage-impact-to-log4j-tp24179322p24180625.html Sent from the Log4j - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
Re: High CPU usage impact to log4j
Did you try running log4j with debug and see it reveals anything? use -Dlog4j.debug=true On Wed, Jun 24, 2009 at 10:30 AM, Arica wrote: > > Hi, Allen > > I added some threads to do the infinite loop in my source codes for > testing, > the CPU went to very high because of the inifinite loop. I tried "kill -3 " > to dump the JVM thread, but no response. I checked the log file, still no > any out put. That's why I doubt that maybe the priority of log4j is quite > low and the JVM won't assign any resource to log4j. > > Anyway, do you have any other suggestions or tips on this? Or what's the > real root cause from your point of view? > > > > Allen-54 wrote: > > > > I am doubting if you are on the right path tracking the real problem. > > > > > > > > On Wed, Jun 24, 2009 at 4:22 PM, Arica wrote: > > > >> > >> Hi, buddies > >> > >> I deployed the log4j as the logging tool of my JVM. Recently, I found > >> that > >> the log4j does not work, I could not find any log output when the JVM > >> encountered the high CPU usage issue. In the case, the JVM took more > than > >> 90% CPU usage. I really want to know that my JVM is doing...I know I can > >> do > >> it through JVM thread dump. But the question is why log4j does not > output > >> any logs? I cannot find any warning from the guild to state that log4j > >> will > >> lose logs during the CPU penic. > >> > >> Do you have any idea about that? Or does log4j define any threshold of > >> CPU > >> usage? > >> > >> Thanks. > >> -- > >> View this message in context: > >> > http://www.nabble.com/High-CPU-usage-impact-to-log4j-tp24179322p24179322.html > >> Sent from the Log4j - Users mailing list archive at Nabble.com. > >> > >> > >> - > >> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > >> For additional commands, e-mail: log4j-user-h...@logging.apache.org > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/High-CPU-usage-impact-to-log4j-tp24179322p24179997.html > Sent from the Log4j - Users mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-user-h...@logging.apache.org > >
Re: High CPU usage impact to log4j
Hi, Allen I added some threads to do the infinite loop in my source codes for testing, the CPU went to very high because of the inifinite loop. I tried "kill -3 " to dump the JVM thread, but no response. I checked the log file, still no any out put. That's why I doubt that maybe the priority of log4j is quite low and the JVM won't assign any resource to log4j. Anyway, do you have any other suggestions or tips on this? Or what's the real root cause from your point of view? Allen-54 wrote: > > I am doubting if you are on the right path tracking the real problem. > > > > On Wed, Jun 24, 2009 at 4:22 PM, Arica wrote: > >> >> Hi, buddies >> >> I deployed the log4j as the logging tool of my JVM. Recently, I found >> that >> the log4j does not work, I could not find any log output when the JVM >> encountered the high CPU usage issue. In the case, the JVM took more than >> 90% CPU usage. I really want to know that my JVM is doing...I know I can >> do >> it through JVM thread dump. But the question is why log4j does not output >> any logs? I cannot find any warning from the guild to state that log4j >> will >> lose logs during the CPU penic. >> >> Do you have any idea about that? Or does log4j define any threshold of >> CPU >> usage? >> >> Thanks. >> -- >> View this message in context: >> http://www.nabble.com/High-CPU-usage-impact-to-log4j-tp24179322p24179322.html >> Sent from the Log4j - Users mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org >> For additional commands, e-mail: log4j-user-h...@logging.apache.org >> >> > > -- View this message in context: http://www.nabble.com/High-CPU-usage-impact-to-log4j-tp24179322p24179997.html Sent from the Log4j - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
Re: High CPU usage impact to log4j
I am doubting if you are on the right path tracking the real problem. On Wed, Jun 24, 2009 at 4:22 PM, Arica wrote: > > Hi, buddies > > I deployed the log4j as the logging tool of my JVM. Recently, I found that > the log4j does not work, I could not find any log output when the JVM > encountered the high CPU usage issue. In the case, the JVM took more than > 90% CPU usage. I really want to know that my JVM is doing...I know I can do > it through JVM thread dump. But the question is why log4j does not output > any logs? I cannot find any warning from the guild to state that log4j will > lose logs during the CPU penic. > > Do you have any idea about that? Or does log4j define any threshold of CPU > usage? > > Thanks. > -- > View this message in context: > http://www.nabble.com/High-CPU-usage-impact-to-log4j-tp24179322p24179322.html > Sent from the Log4j - Users mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-user-h...@logging.apache.org > >