Question & Answer
Question
The csserror.log file contains entries that do not describe a DB2® CommonStore error but other events, such as failed access to non-existing documents, requests that were canceled by users, and so on. You want to remove these entries to be able to monitor the csserror.log automatically.
Answer
To get rid of the unwanted error entries, you can use the UNIX® command grep. This command is available for Windows®, too.
To do this, create a file that contains all patterns to be removed from the csserror.log. In the following example, this file is called patterns.txt. A sample file is attached to this technote.
The following command removes every line that is listed in the file "patterns.txt" from the csserror.log:
grep -v -f patterns.txt csserror.log > csserror_file.log
The attached patterns.txt file shows a number of sample patterns that you can use. The patterns do not need to match exactly.
Here is a short explanation of the attached patterns.txt file:
\[2004/
Removes the date string of each error.log file entry.
There is no process to read data written to a pipe.
Removes the error message: "Could not process job because: There is no process to read data written to a pipe. "
(This error message occurs when a user has canceled a request.)
failed in execution. Code: 404
Removes all error messages that fail because a document cannot be found (error 404).
Additional temporary worker
Removes all error messages that indicate that an additional temporary worker has been started.
(This is not an actual error message but a warning message that can be ignored in most cases.)
^$
Removes all empty lines.
The attached sample input and output files show you how the command works and the attached patterns.txt file contains the described sample patterns.
Was this topic helpful?
Document Information
More support for:
CommonStore for SAP
Software version:
8.3
Operating system(s):
AIX, HP-UX, Solaris, Windows, Linux
Document number:
78681
Modified date:
17 June 2018
UID
swg21179444