Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated systemd service example to remove obsolete parameter and add the par console redirection

...

Charon-PAR can be started as a service manually and automatically then the Charon host system boots. The service can be stopped manually or automatically when the host system shuts down.

Please note: each instance of Charon-PAR must be started in a separate directory because certain files (SSTORAGE.DAT, NVOLATILE.DAT, UA_SSTORAGE.DAT, and console.dat) will always be created in the current working directory of the emulator instance. Starting multiple emulator instances in the same directory will lead to errors due to file locking problems.

Important points to note when when starting and stopping a Charon-PAR service:

...

The following example shows the content of a service file, starting  the service, and checking the status. The par64> console is reachable on port 5555:

Sample service file

$ cat myguest.service

[Unit]
Description="Charon emulator service"
After=syslog.target network.service aksusbd.service
Wants=aksusbd.service

[Service]
Type=forking
ControlGroup=cpu:/
WorkingDirectory=/opt/charon/log
PIDFile=/var/run/myguest.pid
ExecStart=/opt/charon/bin/charon-par -f /Stromasys/Charon-PAR/myguest/myguest.cfg --daemon --pidfile /var/run/myguest.pid -c 5555

[Install]
WantedBy=multi-user.target

Starting the service

# systemctl start myguest


Service status

$ systemctl status myguest

● myguest.service - "Charon emulator service"
Loaded: loaded (/etc/systemd/system/myguest.service; disabled; vendor preset: d>
Active: active (running) since Fri 2020-03-20 12:03:09 CET; 17s ago
Process: 514524 ExecStart=/opt/charon/bin/charon-par -f /Stromasys/Charon-PAR/myguest/>
Main PID: 514528 (charon-par)
Tasks: 78 (limit: 76997)
Memory: 4.2G
CPU: 1.612s
CGroup: /system.slice/myguest.service
└─514528 /opt/charon/bin/charon-par -f /Stromasys/Charon-PAR/myguest/myguest.cfg

<lines removed>

...

  • Shut down the guest operating system if running.
  • Stop the service:
    # systemctl stop <guest-name>
  • Disable the service:
    # systemctl disable <guest-name>

...


Include Page
KBCOMMON:DOC-GoToToc
KBCOMMON:DOC-GoToToc