Some useful AIX scripts
"errpt -a" to json converter:
Script is using "pyparsing" module brought by Paul McGuire (https://pyparsing-docs.readthedocs.io/en/latest/).
It converts "errpt -a" output to json, which may easily be used for storing, searching etc.
Usage:
- Piping standard input
errpt -a | python errpt-a_to_json.py - Via a source file or directory
python errpt-a_to_json.py -s ".raw"
python errpt-a_to_json.py -s "/tmp/2023[0-9]" - Via a destination file or directory
python errpt-a_to_json.py -s ".raw" -d "./test/"
python errpt-a_to_json.py -s "/tmp/2023[0-9]" -d "./errpt.json" - Parsed raw files can be removed by "-r" option.
python errpt-a_to_json.py -s . -r
python errpt-a_to_json.py -s /tmp -r