DB2 commands

Shared parsers for parsing output of the commands of IBM DB2

Db2ls - command db2ls -a -c

class insights.parsers.db2.Db2ls(context, extra_bad_lines=None)[source]

Bases: CommandParser, list

Parse the output of db2ls -a -c into a list of dictionaries.

Typical output of this command:

#PATH:VRMF:FIXPACK:SPECIAL:INSTALLTIME:INSTALLERUID
/opt/ibm/db2/V11.5:11.5.6.0:0 ::Fri Jan 14 20:20:07 2022 CST :0
/opt/ibm/db2/V11.5_01:11.5.7.0:0 ::Fri Feb 11 10:34:51 2022 CST :0

Examples

>>> type(db2ls)
<class 'insights.parsers.db2.Db2ls'>
>>> len(db2ls)
2
>>> db2ls[0]['PATH']
'/opt/ibm/db2/V11.5'
>>> db2ls[1]['PATH']
'/opt/ibm/db2/V11.5_01'
>>> db2ls[1]['VRMF']
'11.5.7.0'
>>> db2ls[1]['INSTALLERUID']
'0'
parse_content(content)[source]

This method must be implemented by classes based on this class.