Process Startup Configuration File
The following uses an application process as an example to describe the detailed process startup configuration. For details about the parameters, see Table 1.
test_app:
bin_path: "/home/test_app"
depends: []
uid: 1000
gid: 1000
arguments: ["1", "0", "topic_name", "3", "0", "0", "0", "1", "0","__name:=listener"]
env:
env1: "xxx1"
env2: "xxx2"
restart: "on-failure"
term_time_out: 10000
is_force_term: false
core_affinity: [1,2]
res_group_name: "OTHER"
nice: -10
sharepool_groups:
GroupName_A: alloc # Allocate the alloc write read free permission.
GroupName_B: rw # Allocate the write read free permission.
GroupName_C: ro # Allocate the read free permission.
cpuset: "AICPU/DEV1"
# Fields customized by each owner. The following are extended fields of DataMaster.
is_ros_node: true
is_auto_boot: false
is_reporting: true
Parameter Type |
Description |
|---|---|
test_app |
Application name, which must be globally unique and can be customized.
|
bin_path |
(Mandatory) Binary path. The value is a character string and must be an absolute path. |
depends |
Dependency items when the application is started. The value is a list of character strings. By default, this parameter is left blank. For example, depends: ["TestApp1", "TestApp2"]. The list items are the names of other applications, indicating that the startup depends on these applications. |
uid |
(Mandatory) Application UID. The value is an integer. The valid value is an unsigned integer (an integer greater than or equal to 0). The value 0 indicates the root user. |
gid |
(Mandatory) Application GID. The value is an integer. The valid value is an unsigned integer (an integer greater than or equal to 0). The value 0 indicates the root user. |
arguments |
Parameter used when the application is started. The value is a list of character strings. By default, this parameter is left blank. Example: arguments: ["1", "test"]. |
env |
Environment variable. By default, this parameter is left blank. |
restart |
Indicates whether to restart an application when the application exits. The value is a character string. The options are no, on-failure, on-forever, and on-until-succeed. The default value is no.
|
term_time_out |
Timeout interval when an application is terminated. The value is an integer, in milliseconds. The default value is 60000.
|
is_force_term |
Indicates whether the ProcMgr needs to forcibly exit the application when the application fails to end. The value is of bool type, and the default value is false.
|
core_affinity |
Application affinity attribute setting. The value is a list of numbers representing core IDs. By default, this parameter is left blank. For example, core_affinity: [1, 2] indicates that the application process is bound to cores 1 and 2.
NOTE:
If a non-Ctrl CPU configuration is configured, the process fails to be started. |
res_group_name |
Name of the resource group to which the application belongs. The value is a character string. The valid value is one of the values configured in the env.cfg file. By default, this parameter is left blank. |
nice |
Priority of the APP process. The value ranges from –20 to 19. The default value is 0. |
sharepool_groups |
Permission configuration of the process group of the shared memory.
NOTE:
|
cpuset |
CPU set to which an application belongs. The value is a character string. The valid value is the cpuset created by the system in advance. By default, this parameter is left blank. |
is_ros_node |
Indicates whether an application is a ros node. The value is of bool type and the default value is false. If the node is a ros node, the application reports the running status to the DataMaster through the Hiva Open framework by default. In this case, the setting of is_reporting does not take effect. |
is_reporting |
Indicates whether an application reports the running status (running) to the DataMaster. The value is of bool type and the default value is false. This parameter is valid only when is_ros_node is set to false.
|
is_auto_boot |
Indicates whether to automatically start an application when the system starts. |