Versions Compared

Key

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

Anchor
TOC
TOC
Include Page
KBCOMMON:KB-CSSstyle
KBCOMMON:KB-CSSstyle

...

Info
titleShutdown timeout

If your application and server need time to shutdown, it could be necessary to give more time in the service definition to prevent from the service stop procedure to fail due to timeout.

To do so, open the "Manage 'systemd' services" option and edit the service configuration file. You can then add the TimeoutStopSec= parameter in the Service section. The default value is 20 minutes and can be changed in the preferences menu options.

Example:

[Service]
...
TimeoutStopSec=3min

(info) More information can be found using the "# man systemd.service" command on your Linux server

Options

...

  • Options 1 to 5 3 are explanations on how to setup and prepare the virtual machine and the Charon Linux server (if necessary) to use the three available methods. 
  • Option 6 4 edits the script. This script is in a form of "case in <configuration filename> do ..."
  • Option 7 5 is used to test the script. Use with caution on production machines.

...

Info

You'll find in options 1 to 5 3 all the details to setup the remote connection: packages to install, proxy settings for rsh, key pair definition for ssh (password and passphrase free), the necessary firewall settings if needed, etc...

...

When the script is initialized using option 6 or when a new virtual machine is added, the following lines are added:

...

# Parameter $1: contains full path to cfg file
# Parameter $2: contains full path to emulator exe file
#
# Important notes:
# - comments & commands must be on separate lines
# - respect the structure of the file with case/in/esac
# - only place your commands between the selection and the ';;' line
#
. /opt/charon/utils/charon_common
#
case "$1"
in
  <configuration file>)
    #-- Uncomment and complete one of the following lines:
    #${CHARONDIR}/utils/charon_gstop_expect \$1 \$2 root <password> "<prompt>"
<TRU64<HPUX/VMS>MPEIX>
    #${CHARONDIR}/utils/charon_gstop_rsh \$1 \$2 <hostname>
<TRU64<HPUX/VMS>MPEIX>
    #${CHARONDIR}/utils/charon_gstop_ssh \$1 \$2 <hostname>
<TRU64<HPUX/VMS>MPEIX>
    #/<path>/<myscript>
    ;;

...

esac

One of the blue colored lines above has to be uncommented depending on the method chosen. Other lines can remain in the script or can be deleted.

...

  • The values between the < and > signs have to be filled manually.
  • The operating system must be set to either TRU64 HPUX or VMS MPEIX (case insensitive).
  • If the "rsh" or "ssh" method is used, the <hostname>, corresponding to the virtual machine hostname, must be known by the Charon Linux server.
  • if MPEIX is defined, only the "expect" method can be used. Username, password and prompt can be set to "X" as they are not needed. Example: ${CHARONDIR}/utils/charon_gstop_expect \$1 \$2 X X X MPEIX

Stop script content example:

Status
colourRed
titleTODO

(info) The editor defined in the Preferences is used to edit the script.

...

Div
classpagebreak


Example:

#!/bin/sh
#
case "$1"
in
  /charon/pluto.cfg)
    ssh -o ConnectTimeout=2 pluto5 "uptime|cut -f1 -d','" 2>/dev/null
    RETVAL=$?
    ;;
  *)
    echo "Invalid parameter '$1'"
    RETVAL=1
    ;;
esac
echo "==RETVAL=${RETVAL}=="
exit ${RETVAL}

...