# /usr/scripts/report.awk # # AWK script: report.awk # # Author: Kevin FitzGerrell # # Called by /usr/scripts/shift1.script and /usr/scripts/shift2.script, # this awk script is used to parse needed data out of the files # report1.tmp and report2.tmp. # # last modified 5/4/99 # BEGIN { FS = "\n"; RS = "$" } { time[NR] = $2 new_feed[NR] = $3 recycle[NR] = $4 SAG_speed[NR] = $5 SAG_HP[NR] = $6 SAG_bp[NR] = $7 noise[NR] = $8 BM1_HP[NR] = $9 BM2_HP[NR] = $10 CFP_gpm[NR] = $11 cyc1_psi[NR] = $12 cyc2_psi[NR] = $13 cyc1_den[NR] = $14 cyc2_den[NR] = $15 cyc1_grnd[NR] = $16 cyc2_grnd[NR] = $17 cyc1_ofden[NR] = $18 cyc2_ofden[NR] = $19 torque[NR] = $20 lift[NR] = $21 slime[NR] = $22 floc[NR] = $23 uf_den[NR] = $24 uf_gpm[NR] = $25 uf_mass[NR] = $26 fresh[NR] = $27 process[NR] = $28 potable[NR] = $29 leach_air[NR] = $30 barge_pumps[NR] = $31 cr_amps[NR] = $32 fd_oil[NR] = $33 rtn_oil[NR] = $34 seal_wtr[NR] = $35 chute[NR] = $36 } END { printf("%55s\n%50s\n\n\n", "FAIRBANKS GOLD MINING, INC.", "CONTROL ROOM REPORT" ) printf("%-15s", "Time: ") for ( x=1; x < NR; x++) printf("%10s", time[x]) printf("\n") printf("%-15s\n", "SAG MILL" ) printf("%-15s", "New feed: ") for ( x=1; x < NR; x++) printf("%10.0f", new_feed[x]) printf("\n") printf("%-15s", "Recycle: ") for ( x=1; x < NR; x++) printf("%10.0f", recycle[x]) printf("\n") printf("%-15s", "Sag speed: ") for ( x=1; x < NR; x++) printf("%10.0f", SAG_speed[x]) printf("\n") printf("%-15s", "SAG HP: ") for ( x=1; x < NR; x++) printf("%10.0f", SAG_HP[x]) printf("\n") printf("%-15s", "SAG psi: ") for ( x=1; x < NR; x++) printf("%10.0f", SAG_bp[x]) printf("\n") printf("%-15s", "SAG Noise: ") for ( x=1; x < NR; x++) printf("%10.0f", noise[x]) printf("\n") printf("%-15s\n", "BALL MILL - N/S") printf("%-15s", "BM HP: ") for ( x=1; x < NR; x++) printf("%5.0f%1s%4.0f", BM1_HP[x], "/", BM2_HP[x]) printf("\n") printf("%-15s", "Cyclone GPM: ") for ( x=1; x < NR; x++) printf("%10.0f", CFP_gpm[x]) printf("\n") printf("%-15s", "Cyclone psi: ") for ( x=1; x < NR; x++) printf("%7.0f%1s%2.0f", cyc1_psi[x], "/", cyc2_psi[x]) printf("\n") printf("%-15s", "Cyclone %sol: ") for ( x=1; x < NR; x++) printf("%7.0f%1s%2.0f", cyc1_den[x], "/", cyc2_den[x]) printf("\n") printf("%-15s", "PSM %-100: ") for ( x=1; x < NR; x++) printf("%7.0f%1s%2.0f", cyc1_grnd[x], "/", cyc2_grnd[x]) printf("\n") printf("%-15s", "PSM density: ") for ( x=1; x < NR; x++) printf("%7.0f%1s%2.0f", cyc1_ofden[x], "/", cyc2_ofden[x]) printf("\n") printf("%-15s\n", "THICKENER") printf("%-15s", "Rake torque: ") for ( x=1; x < NR; x++) printf("%10.0f", torque[x]) printf("\n") printf("%-15s", "Rake level: ") for ( x=1; x < NR; x++) printf("%10.0f", lift[x]) printf("\n") printf("%-15s", "Slime level: ") for ( x=1; x < NR; x++) printf("%10.1f", slime[x]) printf("\n") printf("%-15s", "Floc gpm: ") for ( x=1; x < NR; x++) printf("%10.1f", floc[x]) printf("\n") printf("%-15s", "U/F %solids: ") for ( x=1; x < NR; x++) printf("%10.1f", uf_den[x]) printf("\n") printf("%-15s", "Underflow gpm: ") for ( x=1; x < NR; x++) printf("%10.0f", uf_gpm[x]) printf("\n") printf("%-15s", "U/F massflow: ") for ( x=1; x < NR; x++) printf("%10.0f", uf_mass[x]) printf("\n") printf("%-15s\n", "UTILITIES") printf("%-15s", "Fresh water: ") for ( x=1; x < NR; x++) printf("%10.0f", fresh[x]) printf("\n") printf("%-15s", "Process water: ") for ( x=1; x < NR; x++) printf("%10.0f", process[x]) printf("\n") printf("%-15s", "Potable water: ") for ( x=1; x < NR; x++) printf("%10.0f", potable[x]) printf("\n") printf("%-15s", "Leach air psi: ") for ( x=1; x < NR; x++) printf("%10.0f", leach_air[x]) printf("\n") printf("%-15s", "Barge pumps: ") for ( x=1; x < NR; x++) printf("%10.0f", barge_pumps[x]) printf("\n") printf("%-15s\n", "RECYCLE CRUSHER") printf("%-15s", "Crusher amps: ") for ( x=1; x < NR; x++) printf("%10.0f", cr_amps[x]) printf("\n") printf("%-15s", "Feed oil temp: ") for ( x=1; x < NR; x++) printf("%10.0f", fd_oil[x]) printf("\n") printf("%-15s", "Rtrn oil temp: ") for ( x=1; x < NR; x++) printf("%10.0f", rtn_oil[x]) printf("\n") printf("%-15s", "Dust seal gpm: ") for ( x=1; x < NR; x++) printf("%10.1f", seal_wtr[x]) printf("\n") printf("%-15s", "Diverter: ") for ( x=1; x < NR; x++) printf("%10.0f", chute[x]) printf("\n") }