You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Yogesh Patel <yo...@highq.com> on 2015/12/11 11:17:02 UTC

Tomcat available memory

In Tomcat's JVM settings following parameters are configured :

-verbose:gc -XX:+PrintGCDateStamps -XX:+PrintGC -Xloggc:logs/gc.log

which prints log in file like below:

2015-12-11T15:42:06.779+0530: 5.662: [GC [PSYoungGen:
115711K->26741K(218624K)] 159969K->71550K(283136K), 0.0305672 secs] [Times:
user=0.02 sys=0.02, real=0.03 secs]


I want to print like below in log file:

Free memory: 244.47 MB Total memory: 512.00 MB Max memory: 910.50 MB

What parameters need to set in JVM option of Tomcat to achieve this?


-- 
*Thanks & Regards,*

* Yogesh Patel*

Re: Tomcat available memory

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Yogesh,

On 12/11/15 5:17 AM, Yogesh Patel wrote:
> In Tomcat's JVM settings following parameters are configured :
> 
> -verbose:gc -XX:+PrintGCDateStamps -XX:+PrintGC -Xloggc:logs/gc.log
> 
> which prints log in file like below:
> 
> 2015-12-11T15:42:06.779+0530: 5.662: [GC [PSYoungGen:
> 115711K->26741K(218624K)] 159969K->71550K(283136K), 0.0305672 secs] [Times:
> user=0.02 sys=0.02, real=0.03 secs]
> 
> 
> I want to print like below in log file:
> 
> Free memory: 244.47 MB Total memory: 512.00 MB Max memory: 910.50 MB
> 
> What parameters need to set in JVM option of Tomcat to achieve this?

Verbose GC isn't going to show you that, you'll have to take other steps.

You can get the information you are looking for via JMX any time you'd
like, though:
http://wiki.apache.org/tomcat/FAQ/Monitoring

-chris

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


Re: Tomcat available memory

Posted by "André Warnier (tomcat)" <aw...@ice-sa.com>.
On 11.12.2015 11:17, Yogesh Patel wrote:
> In Tomcat's JVM settings following parameters are configured :
>
> -verbose:gc -XX:+PrintGCDateStamps -XX:+PrintGC -Xloggc:logs/gc.log
>
> which prints log in file like below:
>
> 2015-12-11T15:42:06.779+0530: 5.662: [GC [PSYoungGen:
> 115711K->26741K(218624K)] 159969K->71550K(283136K), 0.0305672 secs] [Times:
> user=0.02 sys=0.02, real=0.03 secs]
>
>
> I want to print like below in log file:
>
> Free memory: 244.47 MB Total memory: 512.00 MB Max memory: 910.50 MB
>
> What parameters need to set in JVM option of Tomcat to achieve this?
>

You need to look at the options for the JVM that you are using.
That is not within the scope of Tomcat.
It is not Tomcat writing this, it is the JVM. And it is not "Tomcat's JVM", it is the "JVM 
vendor's JVM" (Oracle, IBM or whatever).





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