Question & Answer
Question
This document describes how to use onmode -I to collect additional information about an error.
Answer
onmode error trapping tells Informix to take a snapshot of the database server when the specified error or errors occur. The snapshot is placed in an af.* file with the specific name and location listed in the online.log when the problem occurs. When the af file is created the server can hang momentarily. The hang duration depends on the speed of the computer and the size of the shared memory Informix is using. It is generally not even noticed by users and could easily look like a slight network hiccup from the user viewpoint.
STEPS
- onmode -I error_number
- Example:
The example below enables the trap for error -271 should it occur in any session.
- $ onmode -I 271
Example:
10:52:45 TrapError set, errno = 271, session_id = -1
2. Take the required action or actions to reproduce the error you are trapping. The database server will generate an assertion failure file when the error occurs. Check the message log file for the complete path to the file.
Example:
16:41:22 TrapError set, errno = 271, session_id = -1
16:41:59 Assert Failed: found errno 131 in session 23
16:41:59 Informix Dynamic Server Version 11.70.FC2
16:41:59 Who: Session(23, informix@test, 15625, 169244012)
Thread(41, sqlexec, a142adc, 1)
File: rsdebug.c Line: 3614
16:41:59 Action: Use onmode -i to allow Dynamic Server to continue
16:43:17 See Also: /tmp/af.4113c17, shmem.4113c17.0
16:44:50 TrapError cleared
Additionally, a session id can be provided to limit the error trapping to a specific user session. Use the following syntax to trap for a given session id.
onmode -I error_number,session_id
Example:
The example below enables the trap for error -271 for session 23 only.
$ onmode -I 271,23
The message log for this example will will indicate the trap was enabled for session 23 only.
Example:
10:52:45 TrapError set, errno = 271, session_id = 23
For more information regarding onmode -I follow this link:
onmode -I: Control diagnostics collection
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21155532