#! /bin/csh -f set usage = "$0 YAR MON" # Reads per-day access and error logs for month YAR/MON: # # http-log-${YAR}-${MON}-${DAY} # http-err-${YAR}-${MON}-${DAY} # # Writes files # # http-day-stats-${YAR}-${MON}${TAG}.plot # http-day-stats-by-file-${YAR}-${MON}${TAG}.cts # http-day-stats-by-host-${YAR}-${MON}${TAG}.cts # http-day-stats-by-user-${YAR}-${MON}${TAG}.cts # # where ${TAG} is # "-x" for external hosts, # "-u" for unicamp hosts outside IC, # "-l" for IC hosts # # See "summarize-http-logs-by-file-and-host" and # "summarize-http-logs-of-month-by-day" for the file formats. # if ( $#argv != 2) then echo "usage: $usage" exit 1 endif set YAR = "$1" set MON = "$2" set LIB = "${STOLFIHOME}/programs/csh/http-log-tools" foreach ORG ( -external.x -unicamp.u -local.l ) set ORGOPT = "${ORG:r}" set ORGTAG = "${ORG:e}" summarize-http-logs-of-month-by-day ${ORGOPT} ${YAR} ${MON} "${ORGTAG}" plot-http-stats-by-day http-day-stats-${YAR}-${MON}-${ORGTAG}.plot summarize-http-logs-by-file-and-host ${ORGOPT} "${YAR}-${MON}-${ORGTAG}" \ http-log-${YAR}-${MON}-?? end