Xentara v1.0
User Manual
|
Xentara has a number of different operational stages that it traverses during its run time. Xentara has the following stages:
In this stage, Xentara perfroms one-time initialization when it is started.
In this stage, Xentara prepares all systems before entering the operational stage.
In this stage, Xentara perfroms its normal operational tasks. This is the stage that Xentara is in during normal operation.
In this stage, Xentara cleans up all systems after leaving the operational stage.
Normal operation of xentara can be suspended without stopping Xentara completely. If xentara is suspended, an additional stage is entered:
When Xentara is started, the Startup stage is executed, followed by the pre-operational stage. After the pre-operational stage has completed, Xentara will go into the operational stage. The operational stage is then executed until Xentara is stopped. Once Xentara is stopped, the post-operational stage is executed, followed by the shutdown stage. After the shutdown stage has completed, the Xentara application will exit.
Here is the sequence of stages when Xentara is started and stopped:
Xentara can be suspended during operation without completely shutting it down. When Xentara receives a suspend request, the post-operational stage is executed, after which Xentara goes into the suspended stage. Xentara remains in the suspended stage until a resume command is received. When a resume command is received, the pre-operational stage is executed. After the pre-operational stage has completed, Xentara will go back into the operational stage.
Here is the sequence of stages when Xentara is suspended and resumed:
The exact actions perfromed during each stage are determined by the individual I/O drivers and service providers. This chapter only describes the general type of action perfromed in the different stages.
In the startup stage, I/O drivers and service providers perform one-time intialization that doesn't need to be redone after a suspend and resume. This is usually limited to initializing local hardware, like network interfaces or serial ports.
In the pre-operational stage, I/O drivers and service providers perform initialization that is necessary for proper operation of xentara. Specifically, I/O drivers will open connections to remote devices and read the values of all the inputs.
After the pre-operational stage has finished, all I/O points will contain valid values, as long as the I/O component they belong to is functioning correctly. Only I/O points whose I/O components are offline or otherwise cannot provide data, will contain errors.
In the operational stage, I/O drivers and service providers perform their main function. Specifically, I/O component are serviced normally, and microservices perform their operate normally. The operational stage is maintained until Xentara is shut down or operation is suspended.
In the pre-operational stage, I/O drivers and service providers perform cleanup for the actions taken in the operational stage. Specifically, I/O drivers will close all connections to remote devices and invalidate the values of the inputs.
In the shutdown stage, I/O drivers and service providers perform perform cleanup for the actions taken in the startup stage.
In the suspended stage, I/O drivers and service providers only perfrom minimal maintenance tasks. Timers and events are no longer processed, and no data is generally available.
Under Linux, Xentara can be suspended by sending it the signal USR1. To resume Xentara when it is suspended, send USR2.
If Xentara is running as a systemd service as described in systemd Service, you can use systemctl to send signals to Xentara. To suspend a Xentara service running under the user name username, use the following command:
To resume the same Xentara instance, use the following command:
If you have started xentara manually, or if you used a different mechanism than systemd to start Xentara. You must use a different method of sending the USR1 and USR2 signals. If you know the PID of the xentara instance you want to suspend or resume, you can use the kill command to send the signals. To suspend the Xentara instance with PID 2488, use the following command:
To resume the Xentara instance with PID 2488, use the following command:
If you do not know the PID of the xentara instance you whicsh to suspend or resume, you can use the pkill command to send the signal to all all running xentara instances:
To resume all running xentara instances, use the following command:
There is currently no way to suspend and resume Xentara under Windows.