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-container [options]
    stop            [options]
    restart         [options]
    status          [options]
    cancel |      kill   [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: -Xms100m -Dfile.encoding=UTF-8; see https://kb.sos-berlin.com/x/uYo7B
  switches: 
    -c | --curl                            | use curl instead of Java http client

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

...

Code Block
languagetext
titleUsage for Windows
Usage: agent.cmd command [options]
  command:
    start           [options]
    start-container [options]
    stop            [options]
    restart         [options]
    status          [options]
    cancel    |   kill   [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:
    -c | --curl                            | use curl instead of Java http client 

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

...

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

This command will safely terminate the Agent (recommended).

  • Unix
    • Running job processes and child processes will be terminated and the Agent will terminate normally.
      • collect PIDs of job processes,
      • 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 shorter,
      • send SIGKILL signal to job processes and child processes,
      • terminate the Agent with exit code 0.
  • Windows
    • Running job processes and child processes will be terminated forcibly and the Agent will terminate with exit code 0.
  • Using the --timeout command line option will wait for the indicated timeout that the Agent terminates. If the timeout is exceeded and if the Agent is still running then then Agent and runing 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.
    • 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 shorter,
        • send SIGKILL signal to remaining job processes and child processes.
      • Windows
        • forcibly terminates job processes and child processes.

...