#!/bin/awk -f # this script parses log file produced on the Farm and extracts and # formats information about the process size in memory as a function # of time # output format: # # pid1 pid2 run event ievent size(MB) # --------------------------------------------- # 43488 1 138425 122937 2788 525.7280 # # where pid1 and pid2 are 2 FBS ID's, # ievent - sequential number of the event in the file #------------------------------------------------------------------------------ BEGIN { node=0 pid = 0; inst = 0; name = ""; nrec = 0; nrun = 0; nev = 0; nrecstr = ""; nrunstr = ""; } /Coded request for resource manager/ { split($10,val,","); split(val[3],ids,"."); pid = ids[1] + 0; inst = ids[2] + 0; # printf("%s\n" ids[5]; node = substr(val[5],6,3)+0; } /Checked the executable status/ { split($12,val,","); nrun = val[1]; nev = val[2]; nrec = val[3]; vsize = $15; vsize /= 1000; printf "%4i %7d %3d %10d %10d %10d %12.4f \n",node,pid,inst,nrun,nev,nrec,vsize; }