IBM Support

Retrieving a specific day of data from the Postgres log file

Question & Answer


Question

How can I retrieve a specific day of data from the /nz/kit/log/postgres/pg.log file?

Answer

The following Linux command parses the Postgres log and sends all entries for February 15, 2005 into a separate file named feb15_pg.log:

cat pg.log | sed -n "/2005-02-15 00:00:00/,/2005-02-15 23:59:29/p" >feb15_pg.log

[{"Product":{"code":"SSULQD","label":"IBM PureData System"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":null,"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Historical Number

NZ801045

Document Information

More support for:
IBM PureData System

Software version:
1.0.0

Document number:
464437

Modified date:
17 October 2019

UID

swg21572317