buccaneers
Programmer
Hello Gurus,
I am new what at awk and easily getting lost. I am stuck now and would really appreciate your help. Here is what I am trying to achieve as output from the input file mentioned below :-
EXPECTED OUTPUT :-
Date Time sylogina1 sylogina2 others Total
Feb 21 2006 12:00AM 2 1 1 4
Feb 21 2006 12:10AM 2 2
Feb 21 2006 12:20AM 0
INPUT FILE CONTAINS FOLLOWING LINES:-
--------------------------
Feb 21 2006 12:00AM
-------------------------------------------------------------------------
List of Processes where TableScans are more than 10000 pages in 5 minutes
SPID KPID CPUTime PhysicalReads TableAccesses IndexAccesses Transactions Application Login
ClientHost ClientIP ClientOSPID
------ ----------- ----------- ------------- ------------- ------------- ------------ ------------------------------ --------------------------
---- ------------------------------ ------------------------ ------------------------------
574 200868197 7500 -26154 102056 -4175520 0 NULL sylogina1
NULL NULL 6352
558 232063384 8800 -73762 100563 -4382005 0 NULL syspoper1
NULL NULL 6352
45 1521746431 10000 -95351 98227 -4580323 0 NULL sylogina1
NULL NULL 6352
545 1521746431 10000 -95351 98227 -4580323 0 NULL sylogina2
NULL NULL 6352
SPID of the highest count of Table Scans in this sample period is: '574'
SPID KPID BatchID SequenceInBatch SQLText
------ ----------- ----------- --------------- ------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------
---------------
PlanID SPID KPID BatchID ContextID SequenceNumber DBID ProcedureID PlanText
----------- ------ ----------- ----------- ----------- -------------- ----------- ----------- -------------------------------------------------
---------------------------------------------------------------------------------------------------------------
--------------------------
Feb 21 2006 12:10AM
-------------------------------------------------------------------------
List of Processes where TableScans are more than 10000 pages in 5 minutes
SPID KPID CPUTime PhysicalReads TableAccesses IndexAccesses Transactions Application Login
ClientHost ClientIP ClientOSPID
------ ----------- ----------- ------------- ------------- ------------- ------------ ------------------------------ --------------------------
---- ------------------------------ ------------------------ ------------------------------
5 1521746431 10000 -95351 98227 -4580323 0 NULL sylogina1
NULL NULL 6352
49 1521746431 10000 -95351 98227 -4580323 0 NULL sylogina1
NULL NULL 6352
--------------------------
Feb 21 2006 12:20AM
-------------------------------------------------------------------------
List of Processes where TableScans are more than 10000 pages in 5 minutes
SPID KPID CPUTime PhysicalReads TableAccesses IndexAccesses Transactions Application Login
ClientHost ClientIP ClientOSPID
------ ----------- ----------- ------------- ------------- ------------- ------------ ------------------------------ --------------------------
---- ------------------------------ ------------------------ ------------------------------
--------------------------
Feb 21 2006 12:30AM
-------------------------------------------------------------------------
List of Processes where TableScans are more than 10000 pages in 5 minutes
SPID KPID CPUTime PhysicalReads TableAccesses IndexAccesses Transactions Application Login
ClientHost ClientIP ClientOSPID
------ ----------- ----------- ------------- ------------- ------------- ------------ ------------------------------ --------------------------
---- ------------------------------ ------------------------ ------------------------------
TIA,
I am new what at awk and easily getting lost. I am stuck now and would really appreciate your help. Here is what I am trying to achieve as output from the input file mentioned below :-
EXPECTED OUTPUT :-
Date Time sylogina1 sylogina2 others Total
Feb 21 2006 12:00AM 2 1 1 4
Feb 21 2006 12:10AM 2 2
Feb 21 2006 12:20AM 0
INPUT FILE CONTAINS FOLLOWING LINES:-
--------------------------
Feb 21 2006 12:00AM
-------------------------------------------------------------------------
List of Processes where TableScans are more than 10000 pages in 5 minutes
SPID KPID CPUTime PhysicalReads TableAccesses IndexAccesses Transactions Application Login
ClientHost ClientIP ClientOSPID
------ ----------- ----------- ------------- ------------- ------------- ------------ ------------------------------ --------------------------
---- ------------------------------ ------------------------ ------------------------------
574 200868197 7500 -26154 102056 -4175520 0 NULL sylogina1
NULL NULL 6352
558 232063384 8800 -73762 100563 -4382005 0 NULL syspoper1
NULL NULL 6352
45 1521746431 10000 -95351 98227 -4580323 0 NULL sylogina1
NULL NULL 6352
545 1521746431 10000 -95351 98227 -4580323 0 NULL sylogina2
NULL NULL 6352
SPID of the highest count of Table Scans in this sample period is: '574'
SPID KPID BatchID SequenceInBatch SQLText
------ ----------- ----------- --------------- ------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------
---------------
PlanID SPID KPID BatchID ContextID SequenceNumber DBID ProcedureID PlanText
----------- ------ ----------- ----------- ----------- -------------- ----------- ----------- -------------------------------------------------
---------------------------------------------------------------------------------------------------------------
--------------------------
Feb 21 2006 12:10AM
-------------------------------------------------------------------------
List of Processes where TableScans are more than 10000 pages in 5 minutes
SPID KPID CPUTime PhysicalReads TableAccesses IndexAccesses Transactions Application Login
ClientHost ClientIP ClientOSPID
------ ----------- ----------- ------------- ------------- ------------- ------------ ------------------------------ --------------------------
---- ------------------------------ ------------------------ ------------------------------
5 1521746431 10000 -95351 98227 -4580323 0 NULL sylogina1
NULL NULL 6352
49 1521746431 10000 -95351 98227 -4580323 0 NULL sylogina1
NULL NULL 6352
--------------------------
Feb 21 2006 12:20AM
-------------------------------------------------------------------------
List of Processes where TableScans are more than 10000 pages in 5 minutes
SPID KPID CPUTime PhysicalReads TableAccesses IndexAccesses Transactions Application Login
ClientHost ClientIP ClientOSPID
------ ----------- ----------- ------------- ------------- ------------- ------------ ------------------------------ --------------------------
---- ------------------------------ ------------------------ ------------------------------
--------------------------
Feb 21 2006 12:30AM
-------------------------------------------------------------------------
List of Processes where TableScans are more than 10000 pages in 5 minutes
SPID KPID CPUTime PhysicalReads TableAccesses IndexAccesses Transactions Application Login
ClientHost ClientIP ClientOSPID
------ ----------- ----------- ------------- ------------- ------------- ------------ ------------------------------ --------------------------
---- ------------------------------ ------------------------ ------------------------------
TIA,