Managing the operating mode of informix-online dynamic servers
1. Online mode of operation
Off-line (offline mode)
quiescent (static mode)
On_line (Online mode)
Shutdown (off mode)
Recovery (Recovery mode)
Online system has the following types of work mode
Offline Mode:
Online is not running and shared memory is not allocated
Initialization mode:
A transition mode that occurs during online initialization, offline mode to static mode conversion.
Static mode:
The OnInit process is running and the shared memory resource has been allocated, but the system does not allow database users to access the database, only administrators (users logged in by Informix) can access the online system.
Online mode:
The system starts and runs, the database user can use the system normally
Shutdown mode:
The system is started and running, and the current user can continue to use the system, but the new user does not allow the system to be used.
Recovery mode:
The system is recovering quickly or is being recovered by the system archive data. Rapid recovery occurs during the process of offline mode conversion to static mode. This recovery process takes some time, and this time is related to the amount of data to be recovered.
2. Ordinary online process
The Informix-online dynamic server uses several processes called OnInit to perform its own operation. There are usually several oninit processes in the system, and each process is called a virtual processor on the online system.
The OnInit process is run as root. This is the user right that the virtual processor initialization task must use, and because the OnInit process is run as root, it is advantageous for the protection process because ordinary users cannot kill the root user's process.
The Onstat tool can read and report the shared memory structure of the online system, and the-G Glo option displays information about the individual oninit processes, including the ID of the process, the class of the virtual processor, the user CPU, and the system CPU.
$ onstat-g Glo
3.UNIX-Level shared memory
Unix command IPCS can be used to check the operating system level of shared memory segments and semaphore allocations. There may not be such a command on some platforms.
The IPCS command prints information about the current shared memory that is active in your system. For each resource, this command will display:
Type includes information queues (q), Shared memory segment (m), or semaphore (s).
Id a unique representation number for a resource entry
The Key application accesses the parameters used by the resource.
Tags for mode access mode and license permissions
OWNER and GROUP
The login name and the user owner's group number, and the owner of all shared memory resources used on online is the root and Informix groups.
The basic key value used for online shared memory is 0x52564801. The value of the servernum is multiplied by the 0x10000 and the value is added to the key value of the shared memory. That is, if your Servernum value is 2, the key value of your shared memory segment is 0x52564801+ (2*0x10000) =0x52584801. If the value of Servernum is 6, the resulting key value is 0x525c4801.