Command line option

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
m (Command Line Options moved to Command line option)
 
(4 intermediate revisions by one user not shown)
Line 1: Line 1:
[[Category:Configuration]]
+
{{Cleanup}} [[Category:Configuration]]
 
+
= Java command line options =
+
  
 
{|
 
{|
!option||description
+
!Option||Description
 
|-
 
|-
||-Jxxx||passes xxx to the JVM
+
 
 +
||-classpath ''xxx''
 +
||Adds to the system classpath, default is determined from environment variable CLASSPATH
 
|-
 
|-
||-Xxxx||passes the -Xxxx configuration to the JVM
+
 
 +
||[[-conf]] ''conf/resin.conf''
 +
||specifies the [[resin.conf]] file
 
|-
 
|-
||-Dfoo=bar||sets the JVM [[system property]] `foo' to the value `bar'
+
 
 +
||[[-D]]''foo''=''bar''
 +
||sets the JVM [[system property]] `foo' to the value `bar'
 
|-
 
|-
||-J-verbosegc||turns on JVM garbage collection information (recommended)
+
 
 +
||[[-install]]
 +
||(windows) install Resin as a [[service]]  with a default name (but doesn't automatically start)
 
|-
 
|-
||-Xdebug||enable [[HotSwap]] class reloading (recommended)  
+
 
 +
||[[-install-as]] ''name''
 +
||(windows) install Resin as a named [[service]] (but doesn't automatically start)
 
|-
 
|-
||-Xrunjdwp:transport=dt_socket,address=9080,server=y,suspend=n||allow remote debugger to attach to port 9080, useful for [[IDE]] integration
 
|}
 
  
== Memory Settings ==
+
||[[-J]]''xxx''
 +
||passes xxx to the [[JVM]]
 +
|-
  
{|
+
||[[-J]]-verbosegc
!option||description
+
||turns on [[JVM]] [[garbage collection]] information (recommended)
 
|-
 
|-
||-J-verbosegc||turns on JVM garbage collection information (recommended)
+
 
 +
||[[-java_home]] ''xxx''
 +
||sets the [[JDK]], default is determined from environment variable JAVA_HOME or a heuristic search.
 
|-
 
|-
||-Xmx256m||set the maximum [[heap size]] (recommended)
+
 
 +
||[[-jvm-log]] ''file''
 +
||(unix) sets the file to put output that cannot be captured by [[stdout-log]] and [[stderr-log]], relative to [[-server-root]], default is <tt>log/[[jvm.log]]</tt>
 
|-
 
|-
||-XX:MaxPermSize=256m||the maximum size of the [[permanent space]] (recommended)
 
|}
 
  
The default values for -Xmx and -XX:MaxPermSize are generally too low for a normal deployment.
+
||[[-no-auto-restart]]
 +
||disables the automatic restart of the JVM if it exits abnormally
 +
|-
  
== Resin command line options ==
+
||[[-nojit]]
 +
||disables the Just-In-Time compiler, useful for debugging with some JDK's
 +
|-
  
{|
+
||[[-pid]] ''file''
!option||description
+
||(unix) sets the pid file, default is based on the [[-server-id]]
 
|-
 
|-
||-conf conf/resin.conf||specifies the [[resin.conf]] file
+
 
 +
||[[-pid-dir]] ''dir''
 +
||(unix) sets the directory to store pid files in
 
|-
 
|-
||-server id||sets the resin.server_id value
+
 
 +
||[[-remove]]
 +
||(windows) remove Resin as a [[service]] with a default name
 
|-
 
|-
||-resin-home dir||sets the [[resin.home]] value
+
 
 +
||[[-remove-as]]
 +
||(windows) remove Resin as a named [[service]]  
 
|-
 
|-
||[[-server-root]] dir||establishes the root directory for server files and documents, sets the resin.root value
+
 
 +
||[[-resin-home]] ''dir''
 +
||sets the [[resin.home]] value, default is determined from RESIN_HOME environment variable or a heuristic search.
 
|-
 
|-
||-pid file||sets the [[pid file]]||httpd.pid
+
 
 +
||[[restart]]
 +
||(unix) restarts Resin as a daemon using the pid in the file specfied with [[-pid]]
 +
|-
 +
 
 +
||[[-server]] id
 +
||sets the [[resin.server_id]] value and limits [[http]] and [[srun]] activation to those with a matching [[server-id]]
 +
|-
 +
 
 +
||[[-server-root]] ''dir''
 +
||establishes the root directory for server files and sets the [[resin.root]] value
 +
|-
 +
 
 +
||[[start]]
 +
||(unix) starts Resin as a daemon saving the pid in the file specfied with [[-pid]]
 +
|-
 +
 
 +
||[[stop]]
 +
||(unix) stops Resin as a daemon using the pid in the file specfied with [[-pid]]
 +
|-
 +
 
 +
||[[-verbose]]
 +
||show the Java environment before starting Resin
 +
|-
 +
 
 +
||[[-X]]''xxx''
 +
||passes the -X''xxx'' configuration to the [[JVM]]
 +
|-
 +
 
 +
||[[-X]]debug
 +
||enable [[HotSwap]] class reloading (recommended)
 +
|-
 +
 
 
|}
 
|}
  
= See Also =
+
== Memory Options ==
 +
 
 +
{|
 +
!Option||Description
 +
|-
 +
 
 +
||-J-verbosegc
 +
||turns on [[JVM]] garbage collection information (recommended)
 +
|-
 +
 
 +
||-Xmx256m
 +
||set the maximum [[heap size]] (recommended)
 +
|-
 +
 
 +
||-XX:MaxPermSize=256m
 +
||the maximum size of the [[permanent space]] (recommended)
 +
|-
 +
 
 +
||-Xss
 +
||the stack size, default is 1m
 +
 
 +
|}
 +
 
 +
The default values for -Xmx and -XX:MaxPermSize are generally too low for a
 +
normal deployment.
 +
 
 +
== See Also ==
  
[[Garbage Collection]]
+
; [[Garbage collection]]
 +
; [[httpd]] : the command to start Resin
 +
; [[Daemon]] : running Resin as a background process in Unix
 +
; [[Windows service]] : running Resin as a background process in Windows

Latest revision as of 21:14, 1 December 2011

40px-Edit-clear.png This article requires cleanup and may refer to a legacy version of Resin.

Please visit http://www.caucho.com/documentation/ for the most up-to-date documentation.

Option Description
-classpath xxx Adds to the system classpath, default is determined from environment variable CLASSPATH
-conf conf/resin.conf specifies the resin.conf file
-Dfoo=bar sets the JVM system property `foo' to the value `bar'
-install (windows) install Resin as a service with a default name (but doesn't automatically start)
-install-as name (windows) install Resin as a named service (but doesn't automatically start)
-Jxxx passes xxx to the JVM
-J-verbosegc turns on JVM garbage collection information (recommended)
-java_home xxx sets the JDK, default is determined from environment variable JAVA_HOME or a heuristic search.
-jvm-log file (unix) sets the file to put output that cannot be captured by stdout-log and stderr-log, relative to -server-root, default is log/jvm.log
-no-auto-restart disables the automatic restart of the JVM if it exits abnormally
-nojit disables the Just-In-Time compiler, useful for debugging with some JDK's
-pid file (unix) sets the pid file, default is based on the -server-id
-pid-dir dir (unix) sets the directory to store pid files in
-remove (windows) remove Resin as a service with a default name
-remove-as (windows) remove Resin as a named service
-resin-home dir sets the resin.home value, default is determined from RESIN_HOME environment variable or a heuristic search.
restart (unix) restarts Resin as a daemon using the pid in the file specfied with -pid
-server id sets the resin.server_id value and limits http and srun activation to those with a matching server-id
-server-root dir establishes the root directory for server files and sets the resin.root value
start (unix) starts Resin as a daemon saving the pid in the file specfied with -pid
stop (unix) stops Resin as a daemon using the pid in the file specfied with -pid
-verbose show the Java environment before starting Resin
-Xxxx passes the -Xxxx configuration to the JVM
-Xdebug enable HotSwap class reloading (recommended)

[edit] Memory Options

Option Description
-J-verbosegc turns on JVM garbage collection information (recommended)
-Xmx256m set the maximum heap size (recommended)
-XX:MaxPermSize=256m the maximum size of the permanent space (recommended)
-Xss the stack size, default is 1m

The default values for -Xmx and -XX:MaxPermSize are generally too low for a normal deployment.

[edit] See Also

Garbage collection
httpd 
the command to start Resin
Daemon 
running Resin as a background process in Unix
Windows service 
running Resin as a background process in Windows
Personal tools