#! /bin/tcsh -f # ----------------------------------------------------------------------------- # # Name : validate_passX_lastruns.tcsh # # Purpose : For a given passtable, make plots of table cid verses run number # and table count versus run number, and copy these to webpage area # on fcdflnx3. Only do this for the last X runs (specified by lastruns) # # Usage : validate_passtable.tcsh # # Arguements : = name of passtable to be validated. will take the highest un-retired passindex of this passname # = how many runs back do you want the plots to go # = controls which plots are made # # Created : 02/07/2004 # # # Author : Ben Cooper # # ----------------------------------------------------------------------------- #setup the software source ~cdfsoft/cdf2.cshrc setup cdfsoft2 4.11.2 set aaaaa_oracle_dir = `echo $ORACLE_CLIENT_DIR` setup cdfdb setup yasql #is the database working? if not exit with no output dbPing -dcdfonprd -s > /dev/null || exit 6 @ zero = 0 @ one = 1 cd /cdf/onln/data/cdfcalib/cron_scripts/monitoring/driveScripts sqlplus -s cdf_reader/reader@cdfonprd @get_all_runs.sql PROD_PHYSICS_CDF $1 @ first_run = `tail -n $2 all_runs.lst | head -n 1` echo "*************making plots of last $2 runs, first run = $first_run" #ow make table count plots cd /cdf/onln/data/cdfcalib/cron_scripts/monitoring/validate_passtable_count echo "**************making table count plots" ./validate_NumberOfTables_passtable_new.tcsh $1 $first_run 500000 convert tableCount_$1.eps tableCount_$1.gif scp tableCount_$1.gif cdfopr@fcdflnx3.fnal.gov:/cdf/home/www/usr/cdfopr/calibrations/plots/ rm tableCount_$1.eps tableCount_$1.gif if($3>$zero) then #first make cid vs run number plots cd /cdf/onln/data/cdfcalib/cron_scripts/monitoring/validate_passtable echo "*****************making cid vs run number plots" ./validate_passtable_new.tcsh $1 $first_run 500000 root -q -b make_passname_$1_eps.C ./multiple_eps_to_gif.tcsh passname_$1_eps passname_$1_gif scp passname_$1_gif/* cdfopr@fcdflnx3.fnal.gov:/cdf/home/www/usr/cdfopr/calibrations/plots/cidvsrun_$1 rm passname_$1_eps/* rm passname_$1_gif/* endif if($3>$one) then #now make performance time delay plots cd /cdf/onln/data/cdfcalib/cron_scripts/monitoring/timeDelay echo "*****************making time delay plots" ./timeDelay_new.tcsh $1 $first_run 500000 convert time_delay_profile_recent_$1.eps time_delay_profile_recent_$1.gif convert time_delay_hist_recent_$1.eps time_delay_hist_recent_$1.gif scp time_delay_profile_recent_$1.gif cdfopr@fcdflnx3.fnal.gov:/cdf/home/www/usr/cdfopr/calibrations/plots/ scp time_delay_hist_recent_$1.gif cdfopr@fcdflnx3.fnal.gov:/cdf/home/www/usr/cdfopr/calibrations/plots/ rm time_delay_profile_recent_$1.eps time_delay_profile_recent_$1.gif rm time_delay_hist_recent_$1.eps time_delay_hist_recent_$1.gif endif