raghvens has asked for the wisdom of the Perl Monks concerning the following question:
I need your help. I am planning to write a perl script to: I have a big log file where in which there are many lines like:
Starting osci build in ostore_7.4_int_bld.sol2c5.picopt at 2011-09-08- +1702. SUCCESS: Completed osci build in ostore_7.4_int_bld.sol2c5.picopt at 2 +011-09-08-1707. Starting the OSCI build Starting osji build in ostore_7.4_int_bld.sol2c5.picopt at 2011-09-08- +1707. SUCCESS: Completed osji build in ostore_7.4_int_bld.sol2c5.picopt at 2 +011-09-08-1715. Starting xpath build in ostore_7.4_int_bld.sol2c5.picopt at 2011-09-08 +-1715. SUCCESS: Completed xpath build in ostore_7.4_int_bld.sol2c5.picopt at +2011-09-08-1716. Starting ddml build in ostore_7.4_int_bld.sol2c5.picopt at 2011-09-08- +1715. SUCCESS: Completed ddml build in ostore_7.4_int_bld.sol2c5.picopt at 2 +011-09-08-1716. Starting jmtl build in ostore_7.4_int_bld.sol2c5.picopt at 2011-09-08- +1715. SUCCESS: Completed jmtl build in ostore_7.4_int_bld.sol2c5.picopt at 2 +011-09-08-1719. Starting xpath package in ostore_7.4_int_bld.sol2c5.picopt at 2011-09- +08-1719.
I need a script which matches the module names such as osci build, ddml build, osji build, xpath build, etc which has time stamp at the end and store the module name and time in an array and then search for those lines beginning with SUCCESS along the corresponding module names and the time-stamp. Finally give the time difference between the start and complete of the modules. Kindly help.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: search and give the time difference
by marto (Cardinal) on Sep 09, 2011 at 13:17 UTC | |
|
Re: search and give the time difference
by muba (Priest) on Sep 09, 2011 at 13:31 UTC | |
by raghvens (Novice) on Sep 09, 2011 at 14:05 UTC |