Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagetext
titleUsage for Unix
Usage: agent.sh command [options]
  command:
    start         [options]
    start_docker  [options]
    stop          [options]
    abort         [options]
    restart       [options]
    status        [options]
    kill          [options]
    cert          [cert-options]                      | see https://kb.sos-berlin.com/x/jLbAAw
  options:
    --http-port=<[hostname or ip address:]number>     | default: 4445
    --https-port=<[hostname or ip address:]number>    | default:
    --data-directory=<location of data directory>     | default: /var/sos-berlin.com/js7/agent/var_4445
    --config-directory=<location of config directory> | default: /var/sos-berlin.com/js7/agent/var_4445/config
    --sigkill                                         | only for stop and restart; running tasks will be killed
    --timeout=<timeout > 0, in seconds>               | only for stop; if timeout is reached then SIGKILL is sent
    --kill-script=<location of kill script>           | only for start
    --java-options=<java options>                     | default:  -Xms100m -Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Dlog4j2.asyncLoggerWaitStrategy=Block; see https://kb.sos-berlin.com/x/aIC9
see https://kb.sos-berlin.com/x/fAmGAw for more information.

...

Code Block
languagetext
titleUsage for Windows
Usage: agent.cmd command [options]
  command:
    start         [options]
    start_docker  [options]
    stop          [options]
    abort         [options]
    restart       [options]
    status        [options]
    kill          [options]
    cert          [cert-options]                      | see https://kb.sos-berlin.com/x/jLbAAw
  options:
    --http-port=<[hostname or ip address:]number>     | default: 4445
    --https-port=<[hostname or ip address:]number>    | default:
    --data-directory=<location of data directory>     | default: /var/sos-berlin.com/js7/agent/var_4445
    --config-directory=<location of config directory> | default: /var/sos-berlin.com/js7/agent/var_4445/config
    --sigkill                                         | only for stop and restart; running tasks will be killed
    --timeout=<timeout > 0, in seconds>               | only for stop; and restart; running tasks will be killedif timeout is reached then KILL is sent
    --kill-script=<location of kill script>           | only for start
    --java-options=<java options>                     | default:  -Xms100m -Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Dlog4j2.asyncLoggerWaitStrategy=Block; see https://kb.sos-berlin.com/x/aIC9
see https://kb.sos-berlin.com/x/fAmGAw for more information.

...

  • --http-port=<[hostname or ip address:]number>
    • Specifies the HTTP port that the Agent is listening to in order to receive requests from a JS7 Controller:
      • agent.sh|.cmd --http-port=####

      • where #### is the port number.
      • This option can be used to indicate which network interface the JS7 Agent should listen to if a hostname or IP address is specified, for example with --http-port=myhost:4445.
    • Without this option being used the port defaults to 4445 and the Agent listens to all available network interfaces.
    • If a port is specified then the following order of precedence applies:
      • First precedence: command line option
      • Second precedence: environment variable JS7_AGENT_HTTP_PORT (see below)
      • Third precedence: use of default value
  • --https-port=<[hostname or ip address:]number>
    • Specifies the HTTPS port that the Agent is listening to in order to receive requests from a Controller:
      • agent.sh|.cmd command --https-port=####

      • where #### is the port number.
      • This option can be used to indicate which network interfaces the Agent should listen to if a hostname or IP address is specified, for example, with --https-port=myhost:4445.
    • When using the HTTPS protocol for connections from a Controller instance consider additionally allowing the HTTP protocol for local connections as with --http-port=localhost:4445. As the Agent Start Script makes use of an HTTP connection this protocol has to be in place to allow the Agent to be started, stopped, etc. by its Start Script.
    • Without this option being used the port defaults to 4445 and the Agent listens to all available network interfaces.
    • If a port is specified then the following order of precedence applies:
      • First precedence: command line option
      • Second precedence: environment variable SJS7_AGENT_HTTPS_PORT (see below)
      • Third precedence: use of default value
  • --data-directory=<location of data directory>
    • Specifies the location of the data directory that usually includes the config, logs, tmp and state directories.
    • This location has to be unique for any Agent instance.
    • If a data directory is specified then the following order of precedence applies:
      • First precedence: command line option
      • Second precedence: environment variable JS7_AGENT_DATA (see below)
      • Third precedence: use of default value JS7_AGENT_HOME/var_<JS7_AGENT_PORT>
  • --config-directory=<location of config directory>
    • Specifies the location of the config directory for configuration data.
    • This location has to be unique for any Agent instance.
    • Should a configuration directory be specified then the following order of precedence applies:
      • First precedence: command line option
      • Second precedence: environment variable JS7_AGENT_CONFIG_DIR (see below)
      • Third precedence: use of default value JS7_AGENT_HOME/var_<JS7_AGENT_PORT>
  • --sigkill
    • With the stop and restart commands this option kills any running processes of jobs by use of a SIGKILL signal.

  • --timeout
    • With the stop command this option waits for the indicated number of seconds and kills the Agent including any running processes of jobs if the timeout is exceeded.

  • --kill-script=<location of kill script>
    • The kill script provides the functionality to kill tasks and any child processes of jobs.

    • Kill scripts are by default provided from the following locations:
      • JS7_AGENT_DATA/work/kill_task.sh for Unix.

      • JS7_AGENT_DATA\work\kill_task.cmd for Windows.

    • This option can be used to specify the location of an individual kill script if required.

    • Should an individual kill script be specified then the following order of precedence applies:

      • First precedence: command line option
      • Second precedence: environment variable JS7_AGENT_KILL_SCRIPT (see below)
      • Third precedence: use of default value
  • --java-options=<java options>
    • This option can be used to apply Java options for the Agent, e.g. for memory settings.

    • Without this option being used the Java options default to -Xms100m.

    • In order to specify a number of Java options quotes have to be used like this:
      • --java-options="-Xms100m -Xmx1g"
    • When specifying Java options then the following order of precedence applies:

      • First precedence: command line option
      • Second precedence: environment variable JAVA_OPTIONS (see below)
      • Third precedence: use of default value
  • --job-java-options=<java options>
    • This option can be used to specify Java options for Shell jobs that load a JVM. This option does not apply to jobs derived from JS7 - Job Templates that are executed in the Agent's JVM.
    • In order to specify a number of Java options quotes have to be used like this:
      • --job-java-options="-Xms100m -Xmx1g"
    • When specifying Java options for execution with Shell jobs then the following order of precedence applies:

      • First precedence: command line option
      • Second precedence: environment variable JS7_AGENT_JOB_JAVA_OPTIONS (see below)

...