diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2016-04-28 08:41:53 +0800 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-04-28 14:08:03 +1000 |
commit | 7eeb1cc1f4d9b4a183ef8a16ad20930ed9dba6d6 (patch) | |
tree | 73b6f751e30736eb0304be2826296941346ba627 /core | |
parent | 895d8238eb54a2d09388efb7ed9e29094dddd9b0 (diff) | |
download | skiboot-7eeb1cc1f4d9b4a183ef8a16ad20930ed9dba6d6.zip skiboot-7eeb1cc1f4d9b4a183ef8a16ad20930ed9dba6d6.tar.gz skiboot-7eeb1cc1f4d9b4a183ef8a16ad20930ed9dba6d6.tar.bz2 |
external/fwts: Add parser to extract olog pattern definitions
The fwts project has a facility to scan system logs for interesting
error messages, by matching on patterns in a JSON file. Recently, Deb
has added support for the OPAL msglog to fwts, called 'olog':
http://kernel.ubuntu.com/git/hwe/fwts.git/commit/?id=652b79b
However, we don't yet have any patterns for OPAL.
Rather than generate a separate set of patterns that may go stale, Anton
suggested that we may want to pull these directly from the OPAL source.
This change implements a parser to generate olog pattern definitions
from annotations in OPAL itself. For example, a check in the flash code
might look like:
if (!ffs) {
/**
* @fwts-label SystemFlashNoPartitionTable
* @fwts-advice OPAL Could not read a partition table on
* system flash. Since we've still booted the machine (which
* requires flash), check that we're registering the proper
* system flash device.
*/
prlog(PR_WARNING, "FLASH: attempted to register system flash "
"%s, wwhich has no partition info\n", name);
return;
}
By running generate-fwts-olog on the codebase, we get:
{
"olog_error_warning_patterns": [
{
"advice": "OPAL Could not read a partition table on system flash. Since we've still booted the machine (which requires flash), check that we're registering the proper system flash device.",
"compare_mode": "regex",
"label": "SystemFlashNoPartitionTable",
"level": "LOG_LEVEL_HIGH",
"pattern": "FLASH: attempted to register system flash .*, wwhich has no partition info"
}
]
}
- which is suitable for input to the fwts pattern definitions.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
[stewart@linux.vnet.ibm.com: squash trailing whitespace]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core')
0 files changed, 0 insertions, 0 deletions