How to Remote Manage » History » Version 2
Henning Blohm, 16.02.2020 22:17
| 1 | 1 | Henning Blohm | h1. How to Remote Manage |
|---|---|---|---|
| 2 | 2 | Henning Blohm | |
| 3 | A significant amount of internal state and operations of a z2 system can be accessed via JMX using tools such as jconsole. In order to access z2 via JMX some JMX related configuration should be applied. |
||
| 4 | |||
| 5 | h2. Configuring JMX access |
||
| 6 | |||
| 7 | h2. Remote Synchronization and Log Streaming |
||
| 8 | |||
| 9 | Starting with version 2.8, Z2 offers a built-in command line utility to synchronize (with log output) and provide streaming access to the z2 home log. When in Z2_HOME/bin run: |
||
| 10 | |||
| 11 | <pre><code class="bash"> |
||
| 12 | java -cp z.jar com.zfabrik.launch.Manage -? |
||
| 13 | </code></pre> |
||
| 14 | |||
| 15 | for the usage: |
||
| 16 | |||
| 17 | <pre><code class="bash"> |
||
| 18 | SYNOPSIS |
||
| 19 | |||
| 20 | java -cp z.jar Manage <command> <options> |
||
| 21 | |||
| 22 | COMMANDS |
||
| 23 | |||
| 24 | sync The sync performs a synchronization of a running (remote) z2 Home. |
||
| 25 | |||
| 26 | showlog Continuously stream the z2 Home log of a running z2 Home to the current stderr. |
||
| 27 | |||
| 28 | OPTIONS |
||
| 29 | |||
| 30 | -url <url> |
||
| 31 | JMX URL identifying the target z2 Home. Defaults to service:jmx:rmi:///jndi/rmi://localhost:7777/jmxrmi |
||
| 32 | The URL may be shortened to <host>:<port> (e.g. localhost:7777) |
||
| 33 | |||
| 34 | |||
| 35 | -user <username> |
||
| 36 | |||
| 37 | Username used for JMX authentication. Optional. |
||
| 38 | |||
| 39 | -pass <password> |
||
| 40 | |||
| 41 | Password used for JMX authentication. Optional. Mandatory when a username has been set |
||
| 42 | |||
| 43 | -b <n> |
||
| 44 | |||
| 45 | Number of lines to read before current (if available) when running showlog. |
||
| 46 | |||
| 47 | EXAMPLE |
||
| 48 | |||
| 49 | java -cp z.jar com.zfabrik.launch.Manage showlog -url host:7777 -user admin -pass admin |
||
| 50 | </code></pre> |
