PLMS binary (plms)

QNX SDP8.0PLMS User's GuideAPIConfigurationDeveloper

Describes the plms command line arguments and their usage.

Synopsis

plms [Options] config_file

Options

Note:
Negative numbers aren't supported for any of the options listed below.

You can specify the following options for the plms executable:

-C cluster
Only valid on SDP 8.x.
Sets the cluster to use for each configured parallel worker thread based on a comma-separated list of cluster names. For example:
-C cluster-1[,cluster-2,...]
Must be used with the -w option.
-d
Performs a dry run to verify the config file can be parsed correctly, then exits plms. The dry run doesn't process any config files loaded via load_config keywords.
-D settings
-D <sub-option>[,<sub-option> ...]
Sets the default POSIX spawn attributes as a comma-separated list. The available <sub-options> are:
<sub-option> Default value Description
max_tries=number 3 Sets a maximum number of recovery attempts if a component fails. The valid range is from 0 to INT_MAX.
repair=NONE|STOP|RESTART|DSS|FAULT STOP Sets the recovery mode of components monitored by PLMS.
restart_wait_time=number 100 Sets the time to wait (in milliseconds) before starting the failed component again.
term_timeout=number 100 Sets the timeout (in milliseconds) to wait after sending the stop-task signal before forcibly terminating the component with SIGKILL. If the component is still running when the timeout expires, it is terminated using SIGKILL. The valid range is from 0 to INT_MAX.
path=colon_separated_path Environment PATH Sets the search path to a colon-separated string of paths. Double quotes around colon_separated_path are suggested but not required.
-h interval_ms

Specifies the interval (in milliseconds) for PLMS to update its heartbeat value. The default is 1000ms. The valid range is from 500 to INT_MAX (2147483647).

-i name

Specifies the instance name of PLMS, which is processed as a mount under /dev. PLMS aborts its startup if the given instance name is already being used by another instance of PLMS. The default is /dev/plms.

-k

The -k option is only valid with -s option. Therefore, -ks starts PLMS and exits once the component specified in -s has started. In this mode, the control interface, notification functionalities, abnormal termination, and watchdog aren't available. If a component fails, then PLMS cancels further execution and exits. PLMS doesn't execute any recovery action when started with the -k option. Components started by PLMS before a failure continue to run. If multiple components are started in parallel and one fails, PLMS immediately aborts further execution, and components that are still starting may be left in an unknown state.

-m interval_ms

Sets the monitoring interval, in milliseconds, for the watchdog monitoring thread that monitors the components started by PLMS. It's recommended to keep the number of components monitored to a minimum to reduce the resources spent on tracking those components. This options defaults to 100ms. The valid range is between 10ms and 3600000ms.

-n number_of_notification_slots

Sets the maximum number of notification slots. It's recommended to keep the number of notifications to a minimum to reduce the resources spent on sending notifications during system startup. Refer to the fsp_plms_UnregisterNotificationEvent() API for more details. The default number of notification slots is 4. The valid range is 0 to 32.

-p priorityPolicy
Sets the priority and scheduling policy for plms threads.
For example: -p 10f
The available scheduling policies are r (round-robin) and f (FIFO scheduling).
The default value is 30r (i.e., the priority is set to 30 with round-robin scheduling).
The valid range for priority is:
  • 1-255 for QOS 2.2.x
  • 1-253 for SDP 8.x
-s component_name

Name of a component or module to launch when plms starts. For convenience, you can use the built-in pseudo-modules (all) to start all components. plms doesn't start any components by default. Use this option to specify the start component, or use fsp_plms_Action() to start the component.

-t secpol_type

Sets the initial security policy type for PLMS.  PLMS uses this type on initial setup. Once the initial setup is done, PLMS transitions to a derived run type.

The run type is used when processing the config file and starting or monitoring processes. It's recommended to use secpolgenerate with the intended config file(s) to make sure all abilities needed for that config file are assigned to the plms-derived run type.

If a security policy is not in force, the -t option does nothing.

The security policy (-t) command-line argument is required when -U is used to run as a non-root user.

-T settings
-T <sub-option>[,<sub-option> ...]
Sets performance tuning parameters for plms as a comma-separated list. The available <sub-options> are:
<sub-options> are: Default value Description
max_nodes=number 1024

Sets a maximum number of nodes (components, modules) expected. 

The max_nodes keyword also defines the number of actions that can be in the queue for plms to process. The maximum number of actions is three times the max_nodes.

The valid range is from 1 to INT_MAX (2147483647).
-U uid[:gid[,sup_gid]*]
-U username[,sup_gid]* (Only valid on SDP 8.x)

plms changes its user and group identity to the specified UID and GIDs. The valid range is from 0 to INT_MAX (2147483647).

On SDP 8.x, a username (which is defined in /etc/passwd) can be used instead of uid:gid. The GID for the username is looked up in /etc/passwd.

The security policy (-t) command-line argument is required when -U is used to run as a non-root user.

-v
Sets the verbosity level for plms. The -v option is cumulative; each additional v increases the amount of log output, up to seven levels. By default, plms logs only warning and higher-severity messages. Each added verbosity level enables messages of lower severity. The first additional level enables SLOG2_NOTICE messages.
Note:
If slogger2 is not available, plms will continue execution without logging functionality.
-w number_of_threads
Sets the number of worker threads to manage the components in parallel. The default number of threads is 4. The valid range is 1-32.
-W runmasks
Only valid on QOS 2.2.x. Sets runmasks for each configured parallel worker thread. For example:
-W 0x2,0x3,0x1,0xFF,0xFF,0xF0

plms aborts with an error message if the specified CPU mask includes a non-existent CPU. Each worker thread is assigned to a CPU from the mask. If the number of worker threads (specified with -w) exceeds the number of CPUs in the mask, plms aborts with an error. The -W option must be used with the -w option.

-x

Same as the -k option, except that instead of exiting, -x will invoke DSS (sysmgr_reboot()) on a component failure. The -x option is only valid with the -s option.

Description

The plms command starts the PLMS service. You must specify a configuration file (config_file) as the last argument. If you don't specify a configuration file, it's inaccessible, or the plms configuration handler finds an error in it, plms aborts with an error.

If you intend to get the slog logs of plms, you must ensure that slogger2 is running when you start plms. All parameters other than config_file are optional. If you want to start a component or module when plms starts, specify the component or module name with the -s option.

Client applications can control plms using the plmsctrl debug utility (not allowed in production) or by directly using the libplms API interface.

Page updated: