Deleting shared memory segments after a server failure

You must close shared memory segments after a database server failure.

About this task

Important: This procedure must be performed by a DBA with experience using HCL OneDB™. Consult technical support for assistance. This procedure is for UNIX™ systems only.
In the event of a failure of a database server instance, follow this procedure to delete shared memory segments:

Procedure

  1. Log on as user informix.
  2. Use the onmode -k command to take the database server to offline mode and remove shared memory.
  3. If the onmode -k command fails and the server is not offline, either run the onclean -k command, or perform the following steps:
    1. Use the onstat -g glo command to display multithreading information.
    2. In the output from the previous command, find the process ID (pid) associated with the first instance of cpu in the class column.
      For example, in the following output from the onstat -g glo command, there are four occurrences of cpu in the class column, having pids of 2599, 2603, 2604, and 2605:
      MT global info:
      sessions threads  vps      lngspins
      0        49       14       1       
                sched calls     thread switches yield 0   yield n   yield forever
      total:    900100          898846          1238      27763     423778   
      per sec:  327             325             2         12        151      
      Virtual processor summary:
       class       vps       usercpu   syscpu    total   
       cpu         4         0.92      0.10      1.02    
       aio         4         0.02      0.02      0.04    
       lio         1         0.00      0.00      0.00    
       pio         1         0.00      0.00      0.00    
       adm         1         0.00      0.01      0.01    
       msc         1         0.00      0.00      0.00    
       fifo        2         0.00      0.00      0.00    
       total       14        0.94      0.13      1.07    
      Individual virtual processors:
       vp    pid       class       usercpu   syscpu    total   
       1     2599      cpu         0.25      0.06      0.31    
       2     2602      adm         0.00      0.01      0.01    
       3     2603      cpu         0.23      0.00      0.23    
       4     2604      cpu         0.21      0.03      0.24    
       5     2605      cpu         0.23      0.01      0.24    
       6     2606      lio         0.00      0.00      0.00    
       7     2607      pio         0.00      0.00      0.00    
       8     2608      aio         0.02      0.02      0.04    
       9     2609      msc         0.00      0.00      0.00    
       10    2610      fifo        0.00      0.00      0.00    
       11    2611      fifo        0.00      0.00      0.00    
       12    2612      aio         0.00      0.00      0.00    
       13    2613      aio         0.00      0.00      0.00    
       14    2614      aio         0.00      0.00      0.00    
                       tot         0.94      0.13      1.07
    3. Use the kill command to terminate (in order) process IDs 2599, 2603, 2604, and 2605.
  4. If the shared segments have not been removed then follow these steps:
    1. Determine the server number.
      The server number can be found by examining the onconfig file of the HCL OneDB instance
    2. Add the server number to 21078.
      For example, if the server number is 1, then add 1 to 21078, giving 21079.
    3. Convert the sum from the previous step to hexadecimal.
      In the previous example, 21079 is 5257 hexadecimal.
    4. Concatenate 48 to the hex value from the previous step.
      For example, 525748.
    5. Run the ipcs utility as root to display the shared memory segments, if any, left open by the server. Search the key column for the number from 4.d.
    6. Remove each shared memory ID associated with the number from 4.d.

What to do next

For more information about the onclean utility, see the HCL OneDB Administrator's Reference.

Consult your operating system documentation for the correct ipcm syntax for your system.