Code:
# cat tst
-07/07@04:03:34 - 10.7.23.144 : DIAG 3x3b: Reason: code 0x60, Sent by kernel-
-07/07@04:04:14 - 10.37.42.194 : DIAG 3x3b: Reason: code 0x60, Sent by kernel-
-07/07@06:50:04 - 10.7.14.854 : DIAG 0x72: Reason: FATAL MEMORY ERROR - guard band corrupt (addr:0x70e6190 size:32 owner:75(TblMgr Main)) at _mem_DeletePointer line 1737-
-07/07@08:35:28 - 10.7.62.820 : DIAG 0x72: Reason: OCP initiated reset...Rebooting from Delay Dial Option-
-07/07@10:33:14 - 10.7.23.167 : DIAG 0x72: Reason: PASSTHRU RESET MESSAGE-
-07/07@10:34:28 - 10.7.42.621 : DIAG 0x72: Reason: OCP initiated reset...Rebooting from Delay Dial Option-
-07/07@11:19:33 - 10.5.26.704 : DIAG 3x3b: Reason: code 0x11, Unmapped address, fault address: 0x00000925-
-07/07@11:19:33 - 10.7.26.704 : DIAG 3x3b: Reason: code 0x11, Unmapped address, fault address: 0x00000925-
-07/07@11:19:45 - 10.7.24.277 : DIAG 0x72: Reason: OCP initiated reset...Rebooting from Delay Dial Option-
-07/07@15:43:47 - 10.7.25.474 : DIAG 0x72: Reason: PASSTHRU RESET MESSAGE-
-07/07@15:56:38 - 10.7.65.77 : DIAG 0x72: Reason: Error! line 548 of dacct_ExitLoadClImage() in dacctrail/dacct.c-
-07/07@17:13:40 - 10.7.23.342 : DIAG 0x72: Reason: OCP initiated reset...IMAGE upgrade complete!-
-07/07@17:47:57 - 10.5.44.351 : DIAG 0x72: Reason: ERROR: dk_Reset called.-
# sed '/OCP/d;/PASSTHRU RESET/d;/Reason/!d;s/ \- /,-,-,/;s/ : /,/;s/\([0-9\.]*\),DIAG[^-]*/&,$DATE,\1/;s/\.,/,/;s/-$//' tst
-07/07@04:03:34,-,-,10.7.23.144,DIAG 3x3b: Reason: code 0x60, Sent by kernel,$DATE,10.7.23.144
-07/07@04:04:14,-,-,10.37.42.194,DIAG 3x3b: Reason: code 0x60, Sent by kernel,$DATE,10.37.42.194
-07/07@06:50:04,-,-,10.7.14.854,DIAG 0x72: Reason: FATAL MEMORY ERROR ,$DATE,10.7.14.854- guard band corrupt (addr:0x70e6190 size:32 owner:75(TblMgr Main)) at _mem_DeletePointer line 1737
-07/07@11:19:33,-,-,10.5.26.704,DIAG 3x3b: Reason: code 0x11, Unmapped address, fault address: 0x00000925,$DATE,10.5.26.704
-07/07@11:19:33,-,-,10.7.26.704,DIAG 3x3b: Reason: code 0x11, Unmapped address, fault address: 0x00000925,$DATE,10.7.26.704
-07/07@15:56:38,-,-,10.7.65.77,DIAG 0x72: Reason: Error! line 548 of dacct_ExitLoadClImage() in dacctrail/dacct.c,$DATE,10.7.65.77
-07/07@17:47:57,-,-,10.5.44.351,DIAG 0x72: Reason: ERROR: dk_Reset called,$DATE,10.5.44.351
# sed '/OCP/d;/PASSTHRU RESET/d;/Reason/!d;s;^\([^ ]*\) - \([^ ]*\) : \(.*\)-$;\1,-,-,\2,\3,$DATE/\2;;s/\.,/,/' tst
-07/07@04:03:34,-,-,10.7.23.144,DIAG 3x3b: Reason: code 0x60, Sent by kernel,$DATE/10.7.23.144
-07/07@04:04:14,-,-,10.37.42.194,DIAG 3x3b: Reason: code 0x60, Sent by kernel,$DATE/10.37.42.194
-07/07@06:50:04,-,-,10.7.14.854,DIAG 0x72: Reason: FATAL MEMORY ERROR - guard band corrupt (addr:0x70e6190 size:32 owner:75(TblMgr Main)) at _mem_DeletePointer line 1737,$DATE/10.7.14.854
-07/07@11:19:33,-,-,10.5.26.704,DIAG 3x3b: Reason: code 0x11, Unmapped address, fault address: 0x00000925,$DATE/10.5.26.704
-07/07@11:19:33,-,-,10.7.26.704,DIAG 3x3b: Reason: code 0x11, Unmapped address, fault address: 0x00000925,$DATE/10.7.26.704
-07/07@15:56:38,-,-,10.7.65.77,DIAG 0x72: Reason: Error! line 548 of dacct_ExitLoadClImage() in dacctrail/dacct.c,$DATE/10.7.65.77
-07/07@17:47:57,-,-,10.5.44.351,DIAG 0x72: Reason: ERROR: dk_Reset called,$DATE/10.5.44.351