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] [switches]
  command:
    start           [options]
    start-container [options]
    stop            [options]
    restart         [options]
    status          [options]
    cancel          [options]
    switch-over     [options]
    cert            [cert-options]         | see https://kb.sos-berlin.com/x/jLbAAw
  options:
    --http-port=<[interface:]port>         | http network interface and port, default: 4445
    --https-port=<[interface:]port>        | https network interface and port, default:
    --data-directory=<directory>           | default: /var/sos-berlin.com/js7/agent/var_4445
    --config-directory=<directory>         | default: /var/sos-berlin.com/js7/agent/var_4445/config
    --sigkill-delay=<seconds>              | send SIGTERM and delayed SIGKILL signal, default: 3
    --timeout=<seconds>                    | timeout for terminating jobs on Agent stop
    --java-options=<java options>          | default: -Xmx100m -Dfile.encoding=UTF-8; see https://kb.sos-berlin.com/x/uYo7B
  switches:
     -f | --fail-over                      | fail-over active role on stop and restart
      -c | --curl                            | use curl instead of Java http client
    --watchdog-log-stdout                  | use stdout channel instead of watchdog.log file

see https://kb.sos-berlin.com/x/ZqrAAw for more information.

...

Code Block
languagetext
titleUsage for Windows
Usage: agent.cmd command [options] [switches] 
  command:
    start           [options]
    stop            [options]
    restart         [options]
    status          [options]
    cancel          [options]
    switch-over     [options]
    start-service   [options]
    install-service [options]
    remove-service  [options]
    cert            [cert-options]         | see https://kb.sos-berlin.com/x/jLbAAw
  options:
    --http-port=<[interface:]port>         | http network interface and port, default: 4445
    --https-port=<[interface:]port>        | https network interface and port, default:
    --data-directory=<directory>           | default: /var/sos-berlin.com/js7/agent/var_4445
    --config-directory=<directory>         | default: /var/sos-berlin.com/js7/agent/var_4445/config
    --timeout=<seconds>                    | timeout for terminating jobs on Agent stop
    --java-options=<java options>          | default: -Xms100m -Dfile.encoding=UTF-8; see https://kb.sos-berlin.com/x/uYo7B
  switches:
    -cf | --curlfail-over                       | fail-over active role on |stop useand curlrestart
 instead of Java http -c | --curl                            | use curl instead of Java http client
    --watchdog-log-stdout                  | use stdout channel instead of watchdog.log file

see https://kb.sos-berlin.com/x/ZqrAAw for more information.

...

  • -c ,  --curl
    • Specifies that the curl utility should be used instead of the built-in HTTP client when sending commands to the Agent.
  • --sigkill
    • Starting from release 2.7.2 the switch is ignored.
    f, --watchdogfail-log-stdoutover
    • With the stop and restart commands this option will fail-over the active role to the Standby Director Agent instance in an Agent Cluster.

    • The switch is available starting from release 2.7.3. Prior to release 2.7.2 fail-over is automatically applied, starting from release fail-over requires the switch.
  • --sigkill
    • Starting from release 2.7.2 the switch is ignored.
  • --watchdog-log-stdout
    • Specifies that log output to stdout and stderr
    • Specifies that log output to stdout and stderr channels will not be redirected to a file. By default log output to stdout and stderr channels is redirected to the watchdog.log file.
    • The switch is available starting from release 2.7.2.

...

Code Block
languagebash
# terminate jobs and stop Agent
agent_4445.sh|.cmd stop [options]

# terminate jobs on Unix by sending SIGKILL with a delay of 10s and stop Agent
agent_4445.sh stop --sigkill-delay=10

# wait for jobs to terminate within 60s and stop Agent
agent_4445.sh|.cmd stop --timeout=60

# wait for jobs to terminate and stop Agent
agent_4445.sh|.cmd stop --timeout=never=never

# stop active Director Agent instance and fail-over active role
agent_4445.sh|.cmd stop --fail-over

This command will terminate the Agent.

  • Unix
    • Job processes and child processes will be terminated and the Agent will terminate with exit code 0.
      • collect PIDs of job processes,
      • send SIGTERM signal to remaining job processes and child processes for which PIDs have been collected,
      • wait for the grace timeout specified with the job or for stdout/stderr to be released by processes whichever is earlier,
      • send SIGKILL signal to job processes and child processes,
      • terminate the Agent with exit code 0.
  • Windows
    • Job processes and child processes will be forcibly terminated and the Agent will terminate with exit code 0.
  • Using the --timeout option will wait for the indicated timeout that the Agent terminates. If the timeout is exceeded and if the Agent is still running, then Agent and jobs will be focibly terminated. The option accepts a number of seconds or the never value that indicates that the Agent will wait endlessly until job processes and child processes will terminate.
    • Agent
      • collect PIDs of job processes,
      • terminate the Agent with exit code 143 for Unix and 99 for Windows.
    • Watchdog
      • Unix
        • if the --sigkill-delay option is used
          • send SIGTERM signal to remaining job processes and child processes for which PIDs have been collected,
          • wait for the indicated delay or for stdout/stderr to be released by processes whichever is earlier,
        • send SIGKILL signal to remaining job processes and child processes.
        Windowsforcibly terminate job processes and child processes
          • by processes whichever is earlier,
        • send SIGKILL signal to remaining job processes and child processes.
      • Windows
        • forcibly terminate job processes and child processes.
  • The --fail-over option can be used when stopping a Director Agent that holds the active role. The switch will force fail-over to the standby Director Agent. Without using this switch no fail-over will occur and the Agent Cluster will not be functional after the active Director Agent is stopped. The switch is introduced with release 2.7.3.


Code Block
languagebash
agent_4445.sh|.cmd abort [options]

...

Code Block
languagebash
# terminate jobs and restart Agent
agent_4445.sh|.cmd restart [options]

# terminate jobs on Unix by sending SIGKILL with a delay of 10s and restart Agent
agent_4445.sh restart --sigkill-delay=10

# wait for jobs to terminate and restart Agent
agent_4445.sh|.cmd restart --timeout=never

# restart active Director Agent instance and fail-over active role
agent_4445.sh|.cmd restart --fail-over

The command will restart the Agent.

...