Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Update for PDF export

...

  1. Setup your CHARON virtual machine as a service. To do so, refer to the corresponding documentation or install and use the Charon Linux Toolkit.
    .
  2. Edit the service configuration file and add the following parameters:

    ParameterTypeDescription
    RestarttextConfigures whether the service shall be restarted when the service process exits, is killed, or a timeout is reached
    RestartSecnumericConfigures the time to sleep before restarting a service (as configured with Restart=). Takes a unit-less value in seconds, or a time span value such as "5min 20s". Defaults to 100ms.
    StartLimitIntervalnumericConfigure service start rate limiting. By default, services which are started more than 5 times within 10 seconds are not permitted to start any more times until the 10 second interval ends. With these two options, this rate limiting may be modified. Use StartLimitInterval= to configure the checking interval (defaults to DefaultStartLimitInterval= in manager configuration file, set to 0 to disable any kind of rate limiting). Use StartLimitBurst= to configure how many starts per interval are allowed (defaults to DefaultStartLimitBurst= in manager configuration file).
    StartLimitBurstnumeric

    (lightbulb) More parameters can be defined for auto-restart. Please refer to your Linux distribution documentation (see 137077595 further)

    Div
    classpagebreak


    .
    Example: The following service will restart in case of failure (Restart=on-failure) after 30 seconds (RestartSec=30) with a limit of 2 (StartLimitBurst=2) within 10 minutes (StartLimitInterval=600)

    # vim /usr/lib/systemd/system/as4100.service

    [Unit]
    Description=DEMO as4100
    After=atd.service postfix.service ncu.service aksusbd.service
    Wants=aksusbd.service

     

    [Service]
    Type=forking
    WorkingDirectory=/charon/log
    ExecStart=/opt/charon/bin/as4100 -d /my_services/as4100-service.cfg
    ExecStop=/charon/scripts/mystopscript /my_services/as4100-service.cfg
    Restart=on-failure
    RestartSec=30
    StartLimitInterval=600
    StartLimitBurst=2

     

    [Install]
    WantedBy=multi-user.target

    Div
    classcommandline


    .

  3. Reload systemd manager configuration:

    # systemctl daemon-reload


...

P00>>> set bootdef_dev dka0
P00>>> set auto_action restart

...