java - how do i find where JAVA_OPTS data is stored? -
a centos 7 server has java 7 , tomcat 8 installed. need set permgen space, typing printenv
on command line not include java_opts
in list of environmental variables. typed ps
list of running processes, , typed jmap -heap <pid>
pid running java process, listed values maxpermsize
, permsize
among other values.
how set new values these properties in way persist when system rebooted, etc.? hesitate create java_opts
variable if server in question has place stores these persistent values.
edit:
as per @chrisrobak's suggestion, went searching tomcat conf files. there no /etc/tomcat
directory, /etc
has directories called /etc/java
, /etc/.java
, /etc/jvm
, , /etc/jvm-common
. also, tomcat conf follows:
[root@myserver tomcat]# cd /opt/tomcat/conf [root@myserver conf]# ls -al total 280 drwxrwx---. 3 root root 4096 oct 30 20:02 . drwxr-xr-x. 14 root root 4096 oct 30 20:58 .. drwxrwx---. 7 root root 4096 oct 30 21:00 catalina -rwxrwx---. 1 root root 12624 nov 2 2014 catalina.policy -rwxrwx---. 1 root root 6560 nov 2 2014 catalina.properties -rwxrwx---. 1 root root 1852 jan 2 2015 context.xml -rwxrwx---. 1 root root 3451 nov 2 2014 logging.properties -rwxr-x--- 1 root root 5018 oct 30 21:52 server.xml -rwxrwx---. 1 root root 1783 nov 2 2014 tomcat-users.xml -rwxrwx---. 1 root root 1888 nov 2 2014 tomcat-users.xsd -rwxrwx---. 1 root root 168082 nov 2 2014 web.xml [root@myserver conf]#
which file should in?
alternatively, there command line way of setting java options not persistent, not cause side effects due conflicts config files? i create java_opts
variable if thought rest of server go java_opts
default.
answer?
when none of config files , scripts seemed have java_opts set, decided type following in centos 7 terminal:
export java_opts="-xms256m -xmx1024m -xx:permsize=256m -xx:maxpermsize=512m"
the result maxpermsize has been reset. if else has specific answer centos 7 better this, please alert me.
i think can persist in
/etc/tomcat8/tomcat8.conf
or similar variant, server had access /etc/tomcat5/tomcat5.conf
don't know version in particular
Comments
Post a Comment