I have an Input file – InFileA containing some info:
FIRST NOTE: There are many more lines to this file than printed below, but they are mostly between the “0 and 100” under the “% Complete” column. :
SECOND NOTE: the notification Backing up / filesystem .. occurs throughout the 0 and 100 “% Complete” column – For Example, Backing up afdata01 .. which is a logical volume – this is repeated for EACH logical volume in the volume group being backed up.
THIRD NOTE: The “Estimated size is …” info actually may change during the course of the backup – it changed here from a statement of “Estimated size is 141772 MB” but in the end, it turned out to be 141819 of 141819. this info may not be pertinent however as long as we can average the total minutes in the backup.
FOURTH NOTE: There is also one other notification within the contents of this InFileA – telling us to change Volume 2, Volume 3, Volume 4, etc. tapes Again, this info may not be pertinent however as long as we can average the total minutes in the backup. It looks like this:
******************************************************
* Device rmt1 reached end of media during backup of *
* "audata07". *
* --------------------------- *
* Please insert volume 2. Backup will continue *
* automatically when new tape has been inserted. *
******************************************************
The backup then continues and is logged into InFileA as shown below:
BEGINNING of FILE:
Changing tape block size to 512 ..
Placing boot image on tape ..
bosboot: Boot image is 14437 512 byte blocks.
Placing install image on tape ..
Placing Sysback programs on tape ..
Returning tape block size to 131072 ..
Repositioning tape ..
Generating LVM information ..
Generating table of contents ..
Pre-processing / filesystem ..
Pre-processing afdata01 logical volume ..
Pre-processing afdata15 logical volume ..
Writing table of contents ..
Backing up System:
Volume Groups "rootvg prodvg1"
Start date is Wed Nov 17 10:37:25 2004
User is xxxx at system1
Estimated size is 141772 MB
Backing up / filesystem ..
ESTIMATED PROGRESS
-----------+-------------------+----------------+---------
% Complete | Elapsed Time | Megabytes |Kbytes/Sec
-----------+-------------------+----------------+---------
0 | 0 minutes of 1050 | 1 of 141772 | 4095
Backing up afdata01 ..
0 | 0 minutes of 1040 | 10 of 141772 | 4096
0 | 0 minutes of 1000 |100 of 141772 | 4195
1 | 3 minutes of 950 |1000 of 141772 | 4295
Backing up audata07 ..
5 | 25 minutes of 900 |10000 of 141772 | 4395
******************************************************
* Device rmt1 reached end of media during backup of *
* "audata07". *
* --------------------------- *
* Please insert volume 2. Backup will continue *
* automatically when new tape has been inserted. *
******************************************************
90 | 400 minutes of 444 | 141800 of 141819 | 5441
100 | 444 minutes of 444 | 141819 of 141819 | 5442
Backup ended Wed Nov 17 18:42:20 2004
141819 megabytes written to 3 volumes.
SUCCESS: System backup completed successfully.
Changing tape block size from 131072 back to 1024
END of FILE:
I want to extract ONLY the lines with 0 to 100 “% Complete” to do the “averaging” of only 2 fields – the “ xx minutes “ and the “Kbytes/Sec numerical values” but print the following info as well:
• The Estimated size is 141772 MB
• The Actual size was xxxxxx MB - this would be the 141819 value.
• Running Time Calculations
• Average # of minutes: 300.7 – this is the average of the “ xx minutes “
• Running Speed Calculations
• Average tape speed: 5442.3 – this is the average of the “Kbytes/Sec numerical values”
I believe I successfully average the “xx minutes” field, but fail when trying the same operation with the
“Kbytes/Sec” field. But I'm not extracting the pertinent data to another file, so it could be wrong all the way.
Note: If it matters, the file InFileA, is created by Sysback Ver. 5.1 on AIX 5.1.
Any help?
FIRST NOTE: There are many more lines to this file than printed below, but they are mostly between the “0 and 100” under the “% Complete” column. :
SECOND NOTE: the notification Backing up / filesystem .. occurs throughout the 0 and 100 “% Complete” column – For Example, Backing up afdata01 .. which is a logical volume – this is repeated for EACH logical volume in the volume group being backed up.
THIRD NOTE: The “Estimated size is …” info actually may change during the course of the backup – it changed here from a statement of “Estimated size is 141772 MB” but in the end, it turned out to be 141819 of 141819. this info may not be pertinent however as long as we can average the total minutes in the backup.
FOURTH NOTE: There is also one other notification within the contents of this InFileA – telling us to change Volume 2, Volume 3, Volume 4, etc. tapes Again, this info may not be pertinent however as long as we can average the total minutes in the backup. It looks like this:
******************************************************
* Device rmt1 reached end of media during backup of *
* "audata07". *
* --------------------------- *
* Please insert volume 2. Backup will continue *
* automatically when new tape has been inserted. *
******************************************************
The backup then continues and is logged into InFileA as shown below:
BEGINNING of FILE:
Changing tape block size to 512 ..
Placing boot image on tape ..
bosboot: Boot image is 14437 512 byte blocks.
Placing install image on tape ..
Placing Sysback programs on tape ..
Returning tape block size to 131072 ..
Repositioning tape ..
Generating LVM information ..
Generating table of contents ..
Pre-processing / filesystem ..
Pre-processing afdata01 logical volume ..
Pre-processing afdata15 logical volume ..
Writing table of contents ..
Backing up System:
Volume Groups "rootvg prodvg1"
Start date is Wed Nov 17 10:37:25 2004
User is xxxx at system1
Estimated size is 141772 MB
Backing up / filesystem ..
ESTIMATED PROGRESS
-----------+-------------------+----------------+---------
% Complete | Elapsed Time | Megabytes |Kbytes/Sec
-----------+-------------------+----------------+---------
0 | 0 minutes of 1050 | 1 of 141772 | 4095
Backing up afdata01 ..
0 | 0 minutes of 1040 | 10 of 141772 | 4096
0 | 0 minutes of 1000 |100 of 141772 | 4195
1 | 3 minutes of 950 |1000 of 141772 | 4295
Backing up audata07 ..
5 | 25 minutes of 900 |10000 of 141772 | 4395
******************************************************
* Device rmt1 reached end of media during backup of *
* "audata07". *
* --------------------------- *
* Please insert volume 2. Backup will continue *
* automatically when new tape has been inserted. *
******************************************************
90 | 400 minutes of 444 | 141800 of 141819 | 5441
100 | 444 minutes of 444 | 141819 of 141819 | 5442
Backup ended Wed Nov 17 18:42:20 2004
141819 megabytes written to 3 volumes.
SUCCESS: System backup completed successfully.
Changing tape block size from 131072 back to 1024
END of FILE:
I want to extract ONLY the lines with 0 to 100 “% Complete” to do the “averaging” of only 2 fields – the “ xx minutes “ and the “Kbytes/Sec numerical values” but print the following info as well:
• The Estimated size is 141772 MB
• The Actual size was xxxxxx MB - this would be the 141819 value.
• Running Time Calculations
• Average # of minutes: 300.7 – this is the average of the “ xx minutes “
• Running Speed Calculations
• Average tape speed: 5442.3 – this is the average of the “Kbytes/Sec numerical values”
I believe I successfully average the “xx minutes” field, but fail when trying the same operation with the
“Kbytes/Sec” field. But I'm not extracting the pertinent data to another file, so it could be wrong all the way.
Note: If it matters, the file InFileA, is created by Sysback Ver. 5.1 on AIX 5.1.
Any help?