WildFly CLI - Manipulating System Properties: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(9 intermediate revisions by the same user not shown)
Line 2: Line 2:


* [[WildFly CLI Operations#Subjects|WildFly CLI Operations]]
* [[WildFly CLI Operations#Subjects|WildFly CLI Operations]]
* [[WildFly System Properties#System_Property_Management_with_CLI|WildFly System Properties]]


=Standalone Mode=
=Read all System Properties=


==Add a System Property in Standalone Mode==
These commands list all application server and OS system properties, including the properties specified on command line using -D, -P or --properties arguments.
 
==Standalone==
 
<pre>
/core-service=platform-mbean/type=runtime:read-attribute(name=system-properties)
</pre>
 
==Domain==
 
===Per-Host===
 
<pre>
/host=master/core-service=platform-mbean/type=runtime:read-attribute(name=system-properties)
</pre>
 
===Per Server===
 
<pre>
/host=master/server=server-one/core-service=platform-mbean/type=runtime:read-attribute(name=system-properties)
</pre>
 
=Add/Remove a System Property=
 
==Standalone Mode==


<pre>
<pre>
Line 11: Line 36:
/system-property=foo:read-resource
/system-property=foo:read-resource
</pre>
</pre>
==Remove a System Property in Standalone Mode==


<pre>
<pre>
Line 18: Line 41:
</pre>
</pre>


=Domain Mode=
==Domain Mode==


For domain mode, properties can be added globally, per host and per server instance.
For domain mode, properties can be added globally, per host and per server instance.


==Global System Property==
===Add/Remove a Global System Property===
 
===Adding a System Property Globally===


<pre>
<pre>
Line 31: Line 52:
</pre>
</pre>


===Removing a System Property Globally===
<pre>
/system-property=foo:remove
</pre>
 
The system property such added goes to <font color=red>top of the <tt>domain.xml</tt> file.</font>
 
===Add/Remove a per-Server-Group System Property===


<pre>
<pre>
/system-property=foo:remove
/server-group=web/system-property=foo:add(value=bar)
/server-group=web/system-property=foo:read-resource
</pre>
</pre>


==Per-Host System Property==
<pre>
/server-group=web/system-property=foo:remove
</pre>


===Adding a per-Host Property===
===Add/Remove a per-Host System Property===


<pre>
<pre>
Line 45: Line 75:
/host=master/system-property=foo:read-resource
/host=master/system-property=foo:read-resource
</pre>
</pre>
===Removing a per-Host Property===


<pre>  
<pre>  
Line 52: Line 80:
</pre>
</pre>


===Add/Remove a per-Server System Property===


<pre>
/host=master/server-config=server-one/system-property=foo:add(value=bar)
/host=master/server-config=server-one/system-property=foo:read-resource
</pre>


Just one server instance
<pre>
 
/host=master/server-config=server-one/system-property=foo:remove
[domain@IP_ADDRESS:9999 /] /host=master/server-config=server-one/system-property=foo:add(value=bar)
</pre>
[domain@IP_ADDRESS:9999 /] /host=master/server-config=server-one/system-property=foo:read-resource
[domain@IP_ADDRESS:9999 /] /host=master/server-config=server-one/system-property=foo:remove
Overview of all system properties
Overview of all system properties in WildFly 8 including OS system properties and properties specified on command line using -D, -P or --properties arguments.
 
Standalone
 
[standalone@IP_ADDRESS:9999 /] /core-service=platform-mbean/type=runtime:read-attribute(name=system-properties)
Domain
 
[domain@IP_ADDRESS:9999 /] /host=master/core-service=platform-mbean/type=runtime:read-attribute(name=system-properties)
[domain@IP_ADDRESS:9999 /] /host=master/server=server-one/core-service=platform-mbean/type=runtime:read-attribute(name=system-properties)

Latest revision as of 17:35, 28 February 2016

Internal

Read all System Properties

These commands list all application server and OS system properties, including the properties specified on command line using -D, -P or --properties arguments.

Standalone

/core-service=platform-mbean/type=runtime:read-attribute(name=system-properties)

Domain

Per-Host

/host=master/core-service=platform-mbean/type=runtime:read-attribute(name=system-properties)

Per Server

/host=master/server=server-one/core-service=platform-mbean/type=runtime:read-attribute(name=system-properties)

Add/Remove a System Property

Standalone Mode

/system-property=foo:add(value=bar)
/system-property=foo:read-resource
/system-property=foo:remove

Domain Mode

For domain mode, properties can be added globally, per host and per server instance.

Add/Remove a Global System Property

/system-property=foo:add(value=bar)
/system-property=foo:read-resource
/system-property=foo:remove

The system property such added goes to top of the domain.xml file.

Add/Remove a per-Server-Group System Property

/server-group=web/system-property=foo:add(value=bar)
/server-group=web/system-property=foo:read-resource
/server-group=web/system-property=foo:remove

Add/Remove a per-Host System Property

/host=master/system-property=foo:add(value=bar)
/host=master/system-property=foo:read-resource
 
/host=master/system-property=foo:remove

Add/Remove a per-Server System Property

/host=master/server-config=server-one/system-property=foo:add(value=bar)
/host=master/server-config=server-one/system-property=foo:read-resource
/host=master/server-config=server-one/system-property=foo:remove