You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tony Anecito <ad...@yahoo.com> on 2009/10/10 21:51:21 UTC

Logging startup parms for Tomcat...

Hi All,

I need to see the jvm startup params (memory settings, ect) for Tomcat. How do I enable that to showup in the logs?

Thanks,
-Tony


      

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Logging startup parms for Tomcat...

Posted by Martin Gainty <mg...@hotmail.com>.
did you take a look at NotificationListener for JMX Events...
if you can map the uri (and/or request) stick with filter such as NotificationFilter
http://www.informit.com/articles/article.aspx?p=27842&seqNum=5

hth
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> From: Chuck.Caldarale@unisys.com
> To: users@tomcat.apache.org
> Date: Sat, 10 Oct 2009 18:53:52 -0500
> Subject: RE: Logging startup parms for Tomcat...
> 
> > From: Tony Anecito [mailto:adanecito@yahoo.com]
> > Subject: Logging startup parms for Tomcat...
> > 
> > I need to see the jvm startup params (memory settings, ect) for Tomcat.
> > How do I enable that to showup in the logs?
> 
> Good question, and I don't have a complete answer.
> 
> You can set -XX:+PrintCommandLineFlags, which will show most of the parameters plus some derived ones - but on stdout, not to a specific log file.
> 
> If you're starting Tomcat using the standard launcher, you can set the environment variable _JAVA_LAUNCHER_DEBUG (the value doesn't matter), and the launcher will display various things on stdout, including all of the command-line parameters.  You can also use JConsole to show the options used on any running Java program, regardless of how the program is launched.  LambdaProbe, on one of its pages, shows all the system properties, which will get much of what you want.  You could do something similar in a startup listener.
> 
> Don't know of any way to get them into the log directly without writing some code, but perhaps someone else does.
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
 		 	   		  
_________________________________________________________________
Hotmail: Free, trusted and rich email service.
http://clk.atdmt.com/GBL/go/171222984/direct/01/

Re: Logging startup parms for Tomcat...

Posted by André Warnier <aw...@ice-sa.com>.
Caldarale, Charles R wrote:
>> From: Tony Anecito [mailto:adanecito@yahoo.com]
>> Subject: Logging startup parms for Tomcat...
>>
>> I need to see the jvm startup params (memory settings, ect) for Tomcat.
>> How do I enable that to showup in the logs?
> 
Without getting into over-engineering, how about adding something like
echo "$JAVA_OPTS" "$CATALINA_OPTS" >> logfile
into the catalina.sh script ?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Logging startup parms for Tomcat...

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Tony Anecito [mailto:adanecito@yahoo.com]
> Subject: Logging startup parms for Tomcat...
> 
> I need to see the jvm startup params (memory settings, ect) for Tomcat.
> How do I enable that to showup in the logs?

Good question, and I don't have a complete answer.

You can set -XX:+PrintCommandLineFlags, which will show most of the parameters plus some derived ones - but on stdout, not to a specific log file.

If you're starting Tomcat using the standard launcher, you can set the environment variable _JAVA_LAUNCHER_DEBUG (the value doesn't matter), and the launcher will display various things on stdout, including all of the command-line parameters.  You can also use JConsole to show the options used on any running Java program, regardless of how the program is launched.  LambdaProbe, on one of its pages, shows all the system properties, which will get much of what you want.  You could do something similar in a startup listener.

Don't know of any way to get them into the log directly without writing some code, but perhaps someone else does.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Logging startup parms for Tomcat...

Posted by Markus Schönhaber <to...@list-post.mks-mail.de>.
Tony Anecito:

> I need to see the jvm startup params (memory settings, ect) for Tomcat. How do I enable that to showup in the logs?

If you simply want to see the JVM startup params (i. e. logging them
would be just one one way to achieve that, but not the only one
acceptable to you), you could use jconsole (provided you're using a
sufficiently recent  JVM from Sun). The "VM Summary" tab shows quite
detailed info about the VM and it's parameters.

Regards
  mks


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org