Startup and Shutdown of QM |
![]() ![]() ![]() |
QM maintains some persistent data in shared memory that is accessed by all QM users. This includes the locking tables, user tables, configuration data and other information that must be visible to all QM user processes.
This section does not apply to the PDA version of QM.
Windows Systems
On a Windows system, the shared memory is created when the first user enters QM and is discarded when the last QM user logs out. It will be reloaded automatically when the next user enters QM.
The QMSvc OPTIONS configuration parameter can be used to specify that the shared memory is to be loaded when QMSvc starts and is to remain in place until it shuts down. Use of this mode will result in a small performance improvement on entry to QM. Also, user numbers will not reset when the last user logs out. The STARTUP configuration parameter described below is only available on Windows platforms when persistent memory mode is selected.
QMSvc can be started and stopped from the QM Network Control program group item or by use of qmsvc -start and qmsvc -stop (assuming that the bin subdirectory of the QMSYS account is in the program search path). Shutting down the QMSvc service will automatically logout all QM users that have come in via a network connection.
Other Platforms
On other platforms, the QM shared memory must be explicitly loaded before users can enter QM. It may be manually discarded if required.
The installation process will add system startup and shutdown scripts to start QM when the system is booted and to take it down gracefully when the system is shutdown. QM may be started, stopped or restarted at any time by typing: qm -start qm -stop qm -restart
Executing a Coldstart Script
Sometimes it is useful to execute a paragraph or other command script when QM starts. This can be achieved using the STARTUP configuration parameter to specify the command to be executed. This command will be run in the QMSYS account and would typically be the name of a VOC paragraph. The command is limited to 80 characters and may not include double quotes.
On Windows, the command is run when QMSvc starts and is only available if QMSvc is running with the persistent memory option selected. The command runs as the SYSTEM user.
On other platforms, the command is run when the qm -start command is used. The command runs as the user starting QM, normally root. |