‘Shared Memory Dump’ from the Informix DB Server is too larg

[] [] [] [] []

Symptom
A ‘Share Memory Dump’ from the database server is not written completely and uses a lot of space in the file system.
Other terms
Informix, IDS, shared memory, crash, evidence.sh, SYSALARMPROGRAM, ONCONFIG, DUMPDIR,
Reason and Prerequisites
If a serious error occurs in the Informix database server during operation, a script determined by the ONCONFIG parameter SYSALARMPROGRAM is called from the server. This is usually the $INFORMIXDIR/etc/evidence.sh file.
This file controls a number of ‘onstat’ commands whose output is written into an af.xxxxx file where ‘xxxxx’ is a sequence of five or six letters and numbers.
In addition, an ’shmem.xxxxx’ file is generated by the evidence.sh script. This file is written to the directory that is specified in the ONCONFIG parameter DUMPDIR (default setting is ‘/tmp’). This file contains a ’shared memory’ dump of the database server and is accordingly as large as the memory at the time of the crash. This memory may be particularly large (>2GB) for 64-bit systems.It often happens that the ’shmem.xxxxxx’ file cannot be written completely and fully occupies the file system space.In most cases, the ’shmem.xxxxx’ file can be deleted again.However, if the cause of the crash is unknown, Informix Support may require this file for further analysis of the problem.If the shared memory dump is not available in this type of case, it is not possible to process the problem any further.
The DUMPSHM and AFCRASH parameters in file $ONCONFIG determine how the dump is written. If DUMPSHM is set to 1, the IDS server itself writes the file ’shmem.xxxxxx’. The IDS server does not use compression. If AFCRASH is set to 0×489, the ’shmem.xxxxxx’ file is generated by the evidence.sh script.
In the default setting, the evidence.sh script should copy the ’shmem.xxxxx’ file to the UNIX command ‘compress’ and thus create a compressed dump. However, the ‘compress’ UNIX command is quite ineffective compared to ‘gzip’. If ‘gzip’ is available, you must enter this command in the ‘evidence.sh’ file.
Solution
For a shared memory dump to be completely written and if necessary, made available, proceed as follows:
Set the DUMPDIR parameter to a directory that contains sufficient space.
Set the DUMPSHM parameter to 0.
This prevents the database server from writing an umcompressed dump.
Set the ONCONFIG parameter AFCRASH to 0×489.
When you do this, the evidence.sh script generates the ’shmem.xxxxx’ file.
Where necessary, change the evidence.sh script as follows:
Lines:
103 COMPRESS=”compress” # This command must be quoted if it
104 # Set to “None” for no compression
105 # COMPRESS_SUFFIX
106 # When producing a compressed shared memory dump it’s
107 # file an appropriate suffix. Since COMPRESS is set
108 # command by default, the default suffix is “Z”. Note
109 # automatically separate the suffix from the rest of
110
111 COMPRESS_SUFFIX=”Z”
Change to:
103 COMPRESS=<complete path to your favorite compress tool>
# This command must be quoted if it involves arguments.
# Set to the full path to your favorite compression tool
104 # Set to “None” for no compression
105 # COMPRESS_SUFFIX
106 # When producing a compressed shared memory dump it’s
107 # file an appropriate suffix. Since COMPRESS is set
108 # command by default, the default suffix is “Z”. Not
109 # automatically separate the suffix from the rest of
110
111 COMPRESS_SUFFIX=”<sffx>”
# Adjust to the standard suffix for your compression tool
We have had many good experiences with the GNU tool, ‘gzip’, which has since become available for most platforms.Make sure that the tool that you are using is able to read from a ‘pipe’.
You can test the function of the edited ‘evidence.sh’ using the following UNIX commands:
$> cd $INFORMIXDIR/etc
$>./evidence.sh 3 XX af.xxxxx 0 x 0 x 489
In this case, make sure that you are logged on as an ‘informix’ user and that your Informix environment is set correctly.This generates an af.xxxxx file in the $INFORMIXDIR/etc directory and an shmem.af.xxxxx.0.<sffx> file in the DUMPDIR directory.
In addition, the ’shmem.xxxxx.0.<sffx>’ file must be decompressed again with the compression tool that was used.It must then be exactly the same size as the occupied shared memory. $> onstat -g seg
You can determine this using the following command:

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Leave a Comment