/////////////////////////////////////////////////////////////////////////////// // Andrea Castro October 18, 2005 // stores plots and HTML files into $OFFLINE_MON_DIR /////////////////////////////////////////////////////////////////////////////// #include "TSystem.h" #include "TFile.h" #include "TTree.h" #include "TH1.h" #include "TProfile.h" #include "TLine.h" #include "TCanvas.h" #include "TPaveText.h" #include /* Directory information. */ #include #include "OfflineMon/TEnstoreMonitor.hh" ClassImp(TEnstoreMonitor) ClassImp(TEnstoreMonitor::Data_t) ClassImp(TEnstoreMonitor::Mover_t) //_____________________________________________________________________________ TEnstoreMonitor::TEnstoreMonitor(const char* Name): TOfflineMonitor(Name) { fData = new TEnstoreMonitor::Data_t(); fMover = new TEnstoreMonitor::Mover_t(); } //_____________________________________________________________________________ TEnstoreMonitor::~TEnstoreMonitor() { delete fData; delete fMover; } //_____________________________________________________________________________ int TEnstoreMonitor::Init() { printf(" inside TEnstoreMonitor::Init()\n"); // AC TDatime lastAccess = TDatime(2000,1,1,0,0,0); // initialize in case the ntuple does not exist; // initialize Params structure TString parsFile; char dummy[200]; parsFile = fHtmlDirectory + "/Params.dat"; FILE* fIn = fopen(parsFile,"r"); fscanf(fIn,"%s",dummy); fscanf(fIn,"%d %f %f", &fPars.maxMoversDead, &fPars.maxMoversPctLow, &fPars.maxMoversPctXLow); fscanf(fIn,"%s",dummy); fscanf(fIn,"%f %f", &fPars.netwPctLow, &fPars.netwPctXLow); fscanf(fIn,"%s",dummy); fscanf(fIn,"%f %f", &fPars.transfPctLow, &fPars.transfPctXLow); fscanf(fIn,"%s",dummy); fscanf(fIn,"%f %f", &fPars.diskPctLow, &fPars.diskPctXLow); fscanf(fIn,"%s",dummy); fscanf(fIn,"%f %f", &fPars.drivePctLow, &fPars.drivePctXLow); fscanf(fIn,"%s",dummy); fscanf(fIn,"%f %f", &fPars.overallPctLow, &fPars.overallPctXLow); fscanf(fIn,"%s",dummy); fscanf(fIn,"%f %f", &fPars.netwLowRateSam, &fPars.netwXLowRateSam); fscanf(fIn,"%s",dummy); fscanf(fIn,"%f %f", &fPars.transfLowRateSam, &fPars.transfXLowRateSam); fscanf(fIn,"%s",dummy); fscanf(fIn,"%f %f", &fPars.diskLowRateSam, &fPars.diskXLowRateSam); fscanf(fIn,"%s",dummy); fscanf(fIn,"%f %f", &fPars.driveLowRateSam, &fPars.driveXLowRateSam); fscanf(fIn,"%s",dummy); fscanf(fIn,"%f %f", &fPars.overallLowRateSam, &fPars.overallXLowRateSam); fscanf(fIn,"%s",dummy); fscanf(fIn,"%f %f", &fPars.netwLowRateStager, &fPars.netwXLowRateStager); fscanf(fIn,"%s",dummy); fscanf(fIn,"%f %f", &fPars.transfLowRateStager, &fPars.transfXLowRateStager); fscanf(fIn,"%s",dummy); fscanf(fIn,"%f %f", &fPars.diskLowRateStager, &fPars.diskXLowRateStager); fscanf(fIn,"%s",dummy); fscanf(fIn,"%f %f", &fPars.driveLowRateStager, &fPars.driveXLowRateStager); fscanf(fIn,"%s",dummy); fscanf(fIn,"%f %f", &fPars.overallLowRateStager, &fPars.overallXLowRateStager); fscanf(fIn,"%s",dummy); fscanf(fIn,"%f %f", &fPars.netwLowRateRoot, &fPars.netwXLowRateRoot); fscanf(fIn,"%s",dummy); fscanf(fIn,"%f %f", &fPars.transfLowRateRoot, &fPars.transfXLowRateRoot); fscanf(fIn,"%s",dummy); fscanf(fIn,"%f %f", &fPars.diskLowRateRoot, &fPars.diskXLowRateRoot); fscanf(fIn,"%s",dummy); fscanf(fIn,"%f %f", &fPars.driveLowRateRoot, &fPars.driveXLowRateRoot); fscanf(fIn,"%s",dummy); fscanf(fIn,"%f %f", &fPars.overallLowRateRoot, &fPars.overallXLowRateRoot); fclose(fIn); // initialize Status structure fStatus.netw=fStatus.transf=fStatus.disk=fStatus.drive=fStatus.overall=0; fStatus.global=0; fStatus.time = lastAccess; fStatus.entries_sam = fStatus.entries_stager = fStatus.entries_root = 0; fStatus.entries_sam_day = fStatus.entries_stager_day = fStatus.entries_root_day = 0; fStatus.entries_sam_week = fStatus.entries_stager_week = fStatus.entries_root_week = 0; fStatus.entries_sam_month = fStatus.entries_stager_month = fStatus.entries_root_month = 0; fStatus.movers=0; // first read the current ntuple to get the time of the most recent history file // FILE* ftest; TTree *tree; bool exist = false; char ntuName[200]; sprintf(ntuName,"%s.root", fNtupleFileName.Data()); // check first if the file is there struct stat buffer; if (!stat(ntuName, &buffer)) { // the file exists exist = true; TFile ntupleIn(ntuName,"read"); tree = (TTree*) ntupleIn.Get("enstore_monitor"); int nentries = static_cast (tree->GetEntries()); tree->SetBranchAddress("EnstoreMonitor", &fData); tree->GetEvent(0); // reading the first event is enough lastAccess = fData->fLastFileTime; ntupleIn.Close(); } fData->fLastFileTime = lastAccess; fData->fNtupExist = exist; // now the second file exist=false; sprintf(ntuName,"%s_syst.root", fNtupleFileName.Data()); if (!stat(ntuName, &buffer)) { // the file exists exist = true; TFile ntupleIn(ntuName,"read"); tree = (TTree*) ntupleIn.Get("enstore_monitor_syst"); int nentries = static_cast (tree->GetEntries()); tree->SetBranchAddress("EnstoreMonitorSyst", &fMover); tree->GetEvent(0); // reading the first event is enough lastAccess = fMover->fLastFileTime; ntupleIn.Close(); } fMover->fLastFileTime = lastAccess; fMover->fNtupExist = exist; return 0; } //_____________________________________________________________________________ int TEnstoreMonitor::UpdateNtuple() { printf(" inside TEnstoreMonitor::UpdateNtuple()\n"); // AC // read the data file and fill the ntuple //----------------------------------------------------------------------------- #define FILLSTRLEN 2000 TDatime thisTime; TDatime now; Int_t nFiles, nFiles2; int cmpLen, cmpLen2, len; char *inFile[10000]; // an array of strings char *inFile2[10000]; // an array of strings char dummy[200], dummy1[10], dummy2[10], cmp[200], cmp2[200]; sprintf(cmp,"%sencp_enstore_system",fInputDirName.Data()); cmpLen = strlen(cmp); TString dirNameStatus; dirNameStatus = fInputDirName + ".status/"; // the status subdirectory sprintf(cmp2,"%sstatus_enstore_system",dirNameStatus.Data()); cmpLen2 = strlen(cmp2); // TString inFile; DIR *dir_p; struct dirent *dir_entry_p; dir_p = opendir(fInputDirName); // open the directory nFiles=0; while( NULL != (dir_entry_p = readdir(dir_p))) { // loop over all files in the directory char cyear[5], cmonth[3], cday[3], chour[3], cmin[3], csec[3]; int dotPosition; char * dot; sprintf(dummy,"%s%s",fInputDirName.Data(), dir_entry_p->d_name); // we need to check if this file is more recent than the last file used in the ntuple, if yes keep it! len = strlen(dummy) + 1; char* newSpace = new char[len]; // allocate with new strcpy(newSpace, dummy); // copy to new space if(strncmp(cmp, newSpace, cmpLen)==0) { // only enstore files dot=strchr(dir_entry_p->d_name,'.'); dotPosition=dot-dir_entry_p->d_name+1; cyear[0] = dir_entry_p->d_name[dotPosition]; cyear[1] = dir_entry_p->d_name[dotPosition+1]; cyear[2] = dir_entry_p->d_name[dotPosition+2]; cyear[3] = dir_entry_p->d_name[dotPosition+3]; cmonth[0] = dir_entry_p->d_name[dotPosition+5]; cmonth[1] = dir_entry_p->d_name[dotPosition+6]; cday[0] = dir_entry_p->d_name[dotPosition+8]; cday[1] = dir_entry_p->d_name[dotPosition+9]; chour[0] = dir_entry_p->d_name[dotPosition+11]; chour[1] = dir_entry_p->d_name[dotPosition+12]; cmin[0] = dir_entry_p->d_name[dotPosition+14]; cmin[1] = dir_entry_p->d_name[dotPosition+15]; csec[0] = dir_entry_p->d_name[dotPosition+17]; csec[1] = dir_entry_p->d_name[dotPosition+18]; thisTime = TDatime(atoi(cyear), atoi(cmonth), atoi(cday), atoi(chour), atoi(cmin), atoi(csec)); if(atoi(cyear)<1995) printf(" WARNING 1 year %d <1995\n", atoi(cyear)); // if( thisTime.Convert() > (fData->fLastFileTime).Convert() ) { // then include as new files if(((now.Convert() - thisTime.Convert())/60.) < TMAX_MONTH) { // then include as new files inFile[nFiles] = newSpace; // save pointer nFiles++; } } // end if enstore files } closedir(dir_p); // close the directory fData->fLastFileTime = thisTime; fData->fNfiles = nFiles; // next we do the .status subdirectory dir_p = opendir(dirNameStatus); // open the directory nFiles2=0; while( NULL != (dir_entry_p = readdir(dir_p))) { // loop over all files in the directory char cyear[5], cmonth[3], cday[3], chour[3], cmin[3], csec[3]; int dotPosition; char * dot; sprintf(dummy,"%s%s",dirNameStatus.Data(), dir_entry_p->d_name); // we need to check if this file is more recent than the last file used in the ntuple, if yes keep it! len = strlen(dummy) + 1; char* newSpace = new char[len]; // allocate with new strcpy(newSpace, dummy); // copy to new space if(strncmp(cmp2, newSpace, cmpLen2)==0) { // only enstore files dot=strchr(dir_entry_p->d_name,'.'); dotPosition=dot-dir_entry_p->d_name+1; cyear[0] = dir_entry_p->d_name[dotPosition]; cyear[1] = dir_entry_p->d_name[dotPosition+1]; cyear[2] = dir_entry_p->d_name[dotPosition+2]; cyear[3] = dir_entry_p->d_name[dotPosition+3]; cmonth[0] = dir_entry_p->d_name[dotPosition+5]; cmonth[1] = dir_entry_p->d_name[dotPosition+6]; cday[0] = dir_entry_p->d_name[dotPosition+8]; cday[1] = dir_entry_p->d_name[dotPosition+9]; chour[0] = dir_entry_p->d_name[dotPosition+11]; chour[1] = dir_entry_p->d_name[dotPosition+12]; cmin[0] = dir_entry_p->d_name[dotPosition+14]; cmin[1] = dir_entry_p->d_name[dotPosition+15]; csec[0] = dir_entry_p->d_name[dotPosition+17]; csec[1] = dir_entry_p->d_name[dotPosition+18]; thisTime = TDatime(atoi(cyear), atoi(cmonth), atoi(cday), atoi(chour), atoi(cmin), atoi(csec)); if(atoi(cyear)<1995) printf(" WARNING 2 year %d <1995\n", atoi(cyear)); // if( thisTime.Convert() > (fMover->fLastFileTime).Convert() ) { // then include as new files if(((now.Convert() - thisTime.Convert())/60.) < TMAX_MONTH) { // then include as new files inFile2[nFiles2] = newSpace; // save pointer nFiles2++; } // end of new files } // end if enstore files } closedir(dir_p); // close the directory fMover->fLastFileTime = thisTime; fMover->fNfiles = nFiles2; // we store here the date-time of the (alphabetically)last history file. // this is also the last file written unless we change the way the date-time is concatenated inside the file name TFile* ntupleOut; TTree * tree; TBranch* br; FILE* f; char ntuName[200]; // first encp files/ntuple if(nFiles>0) { // then we update the ntuple sprintf(ntuName,"%s.root",fNtupleFileName.Data()); if(!fData->fNtupExist) ntupleOut = new TFile(ntuName,"create"); if(fData->fNtupExist) ntupleOut = new TFile(ntuName,"recreate"); tree = new TTree("enstore_monitor","Enstore Monitor"); br = tree->Branch("EnstoreMonitor","TEnstoreMonitor::Data_t", &fData); // loop over encp files for(int i=0; ifNode, fData->fUser, fData->fMover, &fData->fBytes); fscanf(f,"%s %s %f %f %f %f %f", dummy1, dummy2, &fData->fNetRate, &fData->fTransfRate, &fData->fDriveRate, &fData->fDiskRate, &fData->fOverallRate); sprintf(fData->fVolume,"%s %s", dummy1, dummy2); sprintf(sqlDateTime,"%s %s",date, time); fData->fTime = TDatime(sqlDateTime); fData->fAbsTime = fData->fTime.Convert(); // strcpy(fData->fVolume, volume); //----------------------------------------------------------------------------- // output files //----------------------------------------------------------------------------- tree->Fill(); } // end of scanning file fclose(f); } // end of loop over files ntupleOut->Write(); delete ntupleOut; } // endif nFiles>0 // then status files/ntuple if(nFiles2>0) { // then we update the ntuple sprintf(ntuName,"%s_syst.root",fNtupleFileName.Data()); if(!fMover->fNtupExist) ntupleOut = new TFile(ntuName,"create"); if(fMover->fNtupExist) ntupleOut = new TFile(ntuName,"recreate"); tree = new TTree("enstore_monitor_syst","Enstore Monitor Syst"); br = tree->Branch("EnstoreMonitorSyst","TEnstoreMonitor::Mover_t", &fMover); // loop over status files for(int i=0; ifName, fMover->fName, fMover->fStatus) != -1){ if(strncmp(fMover->fStatus,"dead",4)==0) { fgets(fillStr, FILLSTRLEN, f); // just reads till EOL strcpy(fMover->fStatus,"DEAD"); strcpy(fMover->fDoing, "DEAD"); } else if(strncmp(fMover->fStatus,"CANNOT",6)==0) { fgets(fillStr, FILLSTRLEN, f); // just reads till EOL strcpy(fMover->fStatus,"NOUPDATE"); strcpy(fMover->fDoing, "NOUPDATE"); } else { strcpy(fMover->fStatus,"ALIVE"); fscanf(f,"%s %s", dummy, fMover->fDoing); if(strncmp(fMover->fDoing,"ERROR",5)==0) { fgets(fillStr, FILLSTRLEN, f); // just reads till EOL } else if(strncmp(fMover->fDoing,"busy",4)==0) { fgets(fillStr, FILLSTRLEN, f); // just reads till EOL strcpy(fMover->fDoing, "BUSY"); } else if(strncmp(fMover->fDoing,"HAVE",4)==0) { fgets(fillStr, FILLSTRLEN, f); // just reads till EOL strcpy(fMover->fDoing,"IDLE"); } else { fgets(fillStr, FILLSTRLEN, f); // just reads till EOL } } fMover->fTime =now; fMover->fAbsTime = fMover->fTime.Convert(); //----------------------------------------------------------------------------- // output files //----------------------------------------------------------------------------- tree->Fill(); } // end of scanning file fclose(f); } // end of loop over files ntupleOut->Write(); delete ntupleOut; } // endif nFiles2>0 return 0; } //_____________________________________________________________________________ int TEnstoreMonitor::MakePlots(const char* HtmlFile) { #define min(A,B) ((A)<(B)?(A):(B)) #define max(A,B) ((A)>(B)?(A):(B)) printf(" inside TEnstoreMonitor::MakePlots()\n"); // AC char *mStatus[POSSIBLE_STATUS] = {"DEAD", "IDLE", "BUSY", "SETUP", "OFFLINE", "SEEK", "NOUPDATE", "ERROR", "OTHER"}; // histos for Mover status TH1F *hEnstMoverStatusDay = new TH1F("hEnstMoverStatusDay","Mover status (LAST 24 hours)",POSSIBLE_STATUS, 0, POSSIBLE_STATUS); TH1F *hEnstMoverStatusWeek = new TH1F("hEnstMoverStatusWeek","Mover status (LAST 7days)",POSSIBLE_STATUS, 0, POSSIBLE_STATUS); TH1F *hEnstMoverStatusMonth = new TH1F("hEnstMoverStatusMonth","Mover status (LAST 31 days)",POSSIBLE_STATUS, 0, POSSIBLE_STATUS); // histos: simple rates // histos for sam TH1F *hEnstNetRateSam = new TH1F("hEnstNetRateSam","ENSTORE Network rate - LAST 24 hours - (sam) (MB/s)",ENST_RATE_NBINS, ENST_RATE_MIN, ENST_RATE_MAX); TH1F *hEnstTranRateSam = new TH1F("hEnstTranRateSam","ENSTORE Transf rate - LAST 24 hours - (sam) (MB/s)",ENST_RATE_NBINS, ENST_RATE_MIN, ENST_RATE_MAX); TH1F *hEnstDriveRateSam = new TH1F("hEnstDriveRateSam","ENSTORE Drive rate - LAST 24 hours - (sam) (MB/s)",ENST_RATE_NBINS, ENST_RATE_MIN, ENST_RATE_MAX); TH1F *hEnstDiskRateSam = new TH1F("hEnstDiskRateSam","ENSTORE Disk rate - LAST 24 hours - (sam) (MB/s)",ENST_RATE_NBINS, ENST_RATE_MIN, ENST_RATE_MAX); TH1F *hEnstOverallRateSam = new TH1F("hEnstOverallRateSam","ENSTORE Overall rate - LAST 24 hours - (sam) (MB/s)",ENST_RATE_NBINS, ENST_RATE_MIN, ENST_RATE_MAX); // histos for stager TH1F *hEnstNetRateStager = new TH1F("hEnstNetRateStager","ENSTORE Network rate - LAST 24 hours - (stager) (MB/s)",ENST_RATE_NBINS, ENST_RATE_MIN, ENST_RATE_MAX); TH1F *hEnstTranRateStager = new TH1F("hEnstTranRateStager","ENSTORE Transf rate - LAST 24 hours - (stager) (MB/s)",ENST_RATE_NBINS, ENST_RATE_MIN, ENST_RATE_MAX); TH1F *hEnstDriveRateStager = new TH1F("hEnstDriveRateStager","ENSTORE Drive rate - LAST 24 hours - (stager) (MB/s)",ENST_RATE_NBINS, ENST_RATE_MIN, ENST_RATE_MAX); TH1F *hEnstDiskRateStager = new TH1F("hEnstDiskRateStager","ENSTORE Disk rate - LAST 24 hours - (stager) (MB/s)",ENST_RATE_NBINS, ENST_RATE_MIN, ENST_RATE_MAX); TH1F *hEnstOverallRateStager = new TH1F("hEnstOverallRateStager","ENSTORE Overall rate - LAST 24 hours - (stager) (MB/s)",ENST_RATE_NBINS, ENST_RATE_MIN, ENST_RATE_MAX); // histos for root TH1F *hEnstNetRateRoot = new TH1F("hEnstNetRateRoot","ENSTORE Network rate - LAST 24 hours - (root) (MB/s)",ENST_RATE_NBINS, ENST_RATE_MIN, ENST_RATE_MAX); TH1F *hEnstTranRateRoot = new TH1F("hEnstTranRateRoot","ENSTORE Transf rate - LAST 24 hours - (root) (MB/s)",ENST_RATE_NBINS, ENST_RATE_MIN, ENST_RATE_MAX); TH1F *hEnstDriveRateRoot = new TH1F("hEnstDriveRateRoot","ENSTORE Drive rate - LAST 24 hours - (root) (MB/s)",ENST_RATE_NBINS, ENST_RATE_MIN, ENST_RATE_MAX); TH1F *hEnstDiskRateRoot = new TH1F("hEnstDiskRateRoot","ENSTORE Disk rate - LAST 24 hours - (root) (MB/s)",ENST_RATE_NBINS, ENST_RATE_MIN, ENST_RATE_MAX); TH1F *hEnstOverallRateRoot = new TH1F("hEnstOverallRateRoot","ENSTORE Overall rate - LAST 24 hours - (root) (MB/s)",ENST_RATE_NBINS, ENST_RATE_MIN, ENST_RATE_MAX); // rates vs time Sam (day) TProfile *hEnstNetRateDaySam = new TProfile("hEnstNetRateDaySam","ENSTORE Network rate (sam) (MB/s) vs time (TODAY)",NBINS_TIME_DAY, 0, 24); TProfile *hEnstTranRateDaySam = new TProfile("hEnstTranRateDaySam","ENSTORE Transf rate (sam) (MB/s) vs time (TODAY)",NBINS_TIME_DAY, 0, 24); TProfile *hEnstDriveRateDaySam = new TProfile("hEnstDriveRateDaySam","ENSTORE Drive rate (sam) (MB/s) vs time (TODAY)",NBINS_TIME_DAY, 0, 24); TProfile *hEnstDiskRateDaySam = new TProfile("hEnstDiskRateDaySam","ENSTORE Disk rate (sam) (MB/s) vs time (TODAY)",NBINS_TIME_DAY, 0, 24); TProfile *hEnstOverallRateDaySam = new TProfile("hEnstOverallRateDaySam","ENSTORE Overall rate (sam) (MB/s) vs time (TODAY)",NBINS_TIME_DAY, 0, 24); // rates vs time Sam (week) TProfile *hEnstNetRateWeekSam = new TProfile("hEnstNetRateWeekSam","ENSTORE Network rate (sam) (MB/s) vs time (THIS WEEK)",NBINS_TIME_WEEK, 0, 7); TProfile *hEnstTranRateWeekSam = new TProfile("hEnstTranRateWeekSam","ENSTORE Transf rate (sam) (MB/s) vs time (THIS WEEK)",NBINS_TIME_WEEK, 0, 7); TProfile *hEnstDriveRateWeekSam = new TProfile("hEnstDriveRateWeekSam","ENSTORE Drive rate (sam) (MB/s) vs time (THIS WEEK)",NBINS_TIME_WEEK, 0, 7); TProfile *hEnstDiskRateWeekSam = new TProfile("hEnstDiskRateWeekSam","ENSTORE Disk rate (sam) (MB/s) vs time (THIS WEEK)",NBINS_TIME_WEEK, 0, 7); TProfile *hEnstOverallRateWeekSam = new TProfile("hEnstOverallRateWeekSam","ENSTORE Overall rate (sam) (MB/s) vs time (THIS WEEK)",NBINS_TIME_WEEK, 0, 7); // rates vs time Sam (month) TProfile *hEnstNetRateMonthSam = new TProfile("hEnstNetRateMonthSam","ENSTORE Network rate (sam) (MB/s) vs time (THIS MONTH)",NBINS_TIME_MONTH, 0, 31); TProfile *hEnstTranRateMonthSam = new TProfile("hEnstTranRateMonthSam","ENSTORE Transf rate (sam) (MB/s) vs time (THIS MONTH)",NBINS_TIME_MONTH, 0, 31); TProfile *hEnstDriveRateMonthSam = new TProfile("hEnstDriveRateMonthSam","ENSTORE Drive rate (sam) (MB/s) vs time (THIS MONTH)",NBINS_TIME_MONTH, 0, 31); TProfile *hEnstDiskRateMonthSam = new TProfile("hEnstDiskRateMonthSam","ENSTORE Disk rate (sam) (MB/s) vs time (THIS MONTH)",NBINS_TIME_MONTH, 0, 31); TProfile *hEnstOverallRateMonthSam = new TProfile("hEnstOverallRateMonthSam","ENSTORE Overall rate (sam) (MB/s) vs time (THIS MONTH)",NBINS_TIME_MONTH, 0, 31); // rates vs time Stager (day) TProfile *hEnstNetRateDayStager = new TProfile("hEnstNetRateDayStager","ENSTORE Network rate (stager) (MB/s) vs time (TODAY)",NBINS_TIME_DAY, 0, 24); TProfile *hEnstTranRateDayStager = new TProfile("hEnstTranRateDayStager","ENSTORE Transf rate (stager) (MB/s) vs time (TODAY)",NBINS_TIME_DAY, 0, 24); TProfile *hEnstDriveRateDayStager = new TProfile("hEnstDriveRateDayStager","ENSTORE Drive rate (stager) (MB/s) vs time (TODAY)",NBINS_TIME_DAY, 0, 24); TProfile *hEnstDiskRateDayStager = new TProfile("hEnstDiskRateDayStager","ENSTORE Disk rate (stager) (MB/s) vs time (TODAY)",NBINS_TIME_DAY, 0, 24); TProfile *hEnstOverallRateDayStager = new TProfile("hEnstOverallRateDayStager","ENSTORE Overall rate (stager) (MB/s) vs time (TODAY)",NBINS_TIME_DAY, 0, 24); // rates vs time Stager (week) TProfile *hEnstNetRateWeekStager = new TProfile("hEnstNetRateWeekStager","ENSTORE Network rate (stager) (MB/s) vs time (THIS WEEK)",NBINS_TIME_WEEK, 0, 7); TProfile *hEnstTranRateWeekStager = new TProfile("hEnstTranRateWeekStager","ENSTORE Transf rate (stager) (MB/s) vs time (THIS WEEK)",NBINS_TIME_WEEK, 0, 7); TProfile *hEnstDriveRateWeekStager = new TProfile("hEnstDriveRateWeekStager","ENSTORE Drive rate (stager) (MB/s) vs time (THIS WEEK)",NBINS_TIME_WEEK, 0, 7); TProfile *hEnstDiskRateWeekStager = new TProfile("hEnstDiskRateWeekStager","ENSTORE Disk rate (stager) (MB/s) vs time (THIS WEEK)",NBINS_TIME_WEEK, 0, 7); TProfile *hEnstOverallRateWeekStager = new TProfile("hEnstOverallRateWeekStager","ENSTORE Overall rate (stager) (MB/s) vs time (THIS WEEK)",NBINS_TIME_WEEK, 0, 7); // rates vs time Stager (month) TProfile *hEnstNetRateMonthStager = new TProfile("hEnstNetRateMonthStager","ENSTORE Network rate (stager) (MB/s) vs time (THIS MONTH)",NBINS_TIME_MONTH, 0, 31); TProfile *hEnstTranRateMonthStager = new TProfile("hEnstTranRateMonthStager","ENSTORE Transf rate (stager) (MB/s) vs time (THIS MONTH)",NBINS_TIME_MONTH, 0, 31); TProfile *hEnstDriveRateMonthStager = new TProfile("hEnstDriveRateMonthStager","ENSTORE Drive rate (stager) (MB/s) vs time (THIS MONTH)",NBINS_TIME_MONTH, 0, 31); TProfile *hEnstDiskRateMonthStager = new TProfile("hEnstDiskRateMonthStager","ENSTORE Disk rate (stager) (MB/s) vs time (THIS MONTH)",NBINS_TIME_MONTH, 0, 31); TProfile *hEnstOverallRateMonthStager = new TProfile("hEnstOverallRateMonthStager","ENSTORE Overall rate (stager) (MB/s) vs time (THIS MONTH)",NBINS_TIME_MONTH, 0, 31); // rates vs time Root (day) TProfile *hEnstNetRateDayRoot = new TProfile("hEnstNetRateDayRoot","ENSTORE Network rate (root) (MB/s) vs time (TODAY)",NBINS_TIME_DAY, 0, 24); TProfile *hEnstTranRateDayRoot = new TProfile("hEnstTranRateDayRoot","ENSTORE Transf rate (root) (MB/s) vs time (TODAY)",NBINS_TIME_DAY, 0, 24); TProfile *hEnstDriveRateDayRoot = new TProfile("hEnstDriveRateDayRoot","ENSTORE Drive rate (root) (MB/s) vs time (TODAY)",NBINS_TIME_DAY, 0, 24); TProfile *hEnstDiskRateDayRoot = new TProfile("hEnstDiskRateDayRoot","ENSTORE Disk rate (root) (MB/s) vs time (TODAY)",NBINS_TIME_DAY, 0, 24); TProfile *hEnstOverallRateDayRoot = new TProfile("hEnstOverallRateDayRoot","ENSTORE Overall rate (root) (MB/s) vs time (TODAY)",NBINS_TIME_DAY, 0, 24); // rates vs time Root (week) TProfile *hEnstNetRateWeekRoot = new TProfile("hEnstNetRateWeekRoot","ENSTORE Network rate (root) (MB/s) vs time (THIS WEEK)",NBINS_TIME_WEEK, 0, 7); TProfile *hEnstTranRateWeekRoot = new TProfile("hEnstTranRateWeekRoot","ENSTORE Transf rate (root) (MB/s) vs time (THIS WEEK)",NBINS_TIME_WEEK, 0, 7); TProfile *hEnstDriveRateWeekRoot = new TProfile("hEnstDriveRateWeekRoot","ENSTORE Drive rate (root) (MB/s) vs time (THIS WEEK)",NBINS_TIME_WEEK, 0, 7); TProfile *hEnstDiskRateWeekRoot = new TProfile("hEnstDiskRateWeekRoot","ENSTORE Disk rate (root) (MB/s) vs time (THIS WEEK)",NBINS_TIME_WEEK, 0, 7); TProfile *hEnstOverallRateWeekRoot = new TProfile("hEnstOverallRateWeekRoot","ENSTORE Overall rate (root) (MB/s) vs time (THIS WEEK)",NBINS_TIME_WEEK, 0, 7); // rates vs time Root (month) TProfile *hEnstNetRateMonthRoot = new TProfile("hEnstNetRateMonthRoot","ENSTORE Network rate (root) (MB/s) vs time (THIS MONTH)",NBINS_TIME_MONTH, 0, 31); TProfile *hEnstTranRateMonthRoot = new TProfile("hEnstTranRateMonthRoot","ENSTORE Transf rate (root) (MB/s) vs time (THIS MONTH)",NBINS_TIME_MONTH, 0, 31); TProfile *hEnstDriveRateMonthRoot = new TProfile("hEnstDriveRateMonthRoot","ENSTORE Drive rate (root) (MB/s) vs time (THIS MONTH)",NBINS_TIME_MONTH, 0, 31); TProfile *hEnstDiskRateMonthRoot = new TProfile("hEnstDiskRateMonthRoot","ENSTORE Disk rate (root) (MB/s) vs time (THIS MONTH)",NBINS_TIME_MONTH, 0, 31); TProfile *hEnstOverallRateMonthRoot = new TProfile("hEnstOverallRateMonthRoot","ENSTORE Overall rate (root) (MB/s) vs time (THIS MONTH)",NBINS_TIME_MONTH, 0, 31); float timeDay, timeWeek, timeMonth; // absolute time for today/this week/this month TDatime now; UInt_t absTime; int nentries; TTree *tree; // input file is always a raw data file... char ntuName[200]; // first read _syst ntuple for Mover status sprintf(ntuName,"%s_syst.root",fNtupleFileName.Data()); TFile ntuple_file_syst(ntuName,"read"); tree = (TTree*) ntuple_file_syst.Get("enstore_monitor_syst"); int movers_status_day, movers_status_week, movers_status_month; int deadMov_day, deadMov_week, deadMov_month; nentries = static_cast (tree->GetEntries()); tree->SetBranchAddress("EnstoreMonitorSyst", &fMover); int status; movers_status_day = movers_status_week = movers_status_month = 0; deadMov_day = deadMov_week = deadMov_month = 0; for(int nev=0; nevGetEvent(nev); absTime = fMover->fAbsTime; // first fill histos timeDay = (absTime - static_cast ( (now.Convert() - TMAX_DAY*60.) ))/60.; // because TDatime.Convert() gives the time in seconds timeWeek = (absTime - static_cast ( (now.Convert() - TMAX_WEEK*60.) ))/60.; timeMonth = (absTime - static_cast ( (now.Convert() - TMAX_MONTH*60.) ))/60.; status=POSSIBLE_STATUS; if(strncmp(fMover->fDoing,"DEAD",4)==0) status=0; if(strncmp(fMover->fDoing,"IDLE",4)==0) status=1; if(strncmp(fMover->fDoing,"BUSY",4)==0) status=2; if(strncmp(fMover->fDoing,"SETUP",5)==0) status=3; if(strncmp(fMover->fDoing,"OFFLINE",6)==0) status=4; if(strncmp(fMover->fDoing,"SEEK",4)==0) status=5; if(strncmp(fMover->fDoing,"NOUPDATE",8)==0) status=6; if(strncmp(fMover->fDoing,"ERROR",5)==0) status=7; if(strncmp(fMover->fName,"9940B",5)==0) { if(((now.Convert() - absTime)/60.) < TMAX_DAY) { hEnstMoverStatusDay->Fill(status); if(status==0) deadMov_day++; } if(((now.Convert() - absTime)/60.) < TMAX_WEEK) { hEnstMoverStatusWeek->Fill(status); if(status==0) deadMov_week++; } if(((now.Convert() - absTime)/60.) < TMAX_MONTH) { hEnstMoverStatusMonth->Fill(status); if(status==0) deadMov_month++; } fStatus.entries_movers++; if(((now.Convert() - absTime)/60.) < TMAX_DAY) fStatus.entries_movers_day++; if(((now.Convert() - absTime)/60.) < TMAX_WEEK) fStatus.entries_movers_week++; if(((now.Convert() - absTime)/60.) < TMAX_MONTH) fStatus.entries_movers_month++; } } // end loop over syst ntuple ntuple_file_syst.Close(); // // then check for too many dead movers // if(deadMov_day > fPars.maxMoversPctLow*fStatus.entries_movers_day) movers_status_day=1; if(deadMov_day > fPars.maxMoversPctXLow*fStatus.entries_movers_day) movers_status_day=2; if(deadMov_week > fPars.maxMoversPctLow*fStatus.entries_movers_week) movers_status_week=1; if(deadMov_week > fPars.maxMoversPctXLow*fStatus.entries_movers_week) movers_status_week=2; if(deadMov_month > fPars.maxMoversPctLow*fStatus.entries_movers_month) movers_status_month=1; if(deadMov_month > fPars.maxMoversPctXLow*fStatus.entries_movers_month) movers_status_month=2; fStatus.movers = movers_status_day; // then read the regular enstore ntuple sprintf(ntuName,"%s.root",fNtupleFileName.Data()); TFile ntuple_file(ntuName,"read"); tree = (TTree*) ntuple_file.Get("enstore_monitor"); int netw_status_sam_day, transf_status_sam_day, disk_status_sam_day, drive_status_sam_day, overall_status_sam_day; int netw_status_stager_day, transf_status_stager_day, disk_status_stager_day, drive_status_stager_day, overall_status_stager_day; int netw_status_root_day, transf_status_root_day, disk_status_root_day, drive_status_root_day, overall_status_root_day; int netw_status_sam_week, transf_status_sam_week, disk_status_sam_week, drive_status_sam_week, overall_status_sam_week; int netw_status_stager_week, transf_status_stager_week, disk_status_stager_week, drive_status_stager_week, overall_status_stager_week; int netw_status_root_week, transf_status_root_week, disk_status_root_week, drive_status_root_week, overall_status_root_week; int netw_status_sam_month, transf_status_sam_month, disk_status_sam_month, drive_status_sam_month, overall_status_sam_month; int netw_status_stager_month, transf_status_stager_month, disk_status_stager_month, drive_status_stager_month, overall_status_stager_month; int netw_status_root_month, transf_status_root_month, disk_status_root_month, drive_status_root_month, overall_status_root_month; float netwRate, transfRate, driveRate, diskRate,overallRate; char nodeN[16], userN[16], moverN[16], volumeN[20]; Int_t nBytes; int netwLowSamDay, transfLowSamDay, diskLowSamDay, driveLowSamDay, overallLowSamDay; int netwXLowSamDay, transfXLowSamDay, diskXLowSamDay, driveXLowSamDay, overallXLowSamDay; int netwLowStagerDay, transfLowStagerDay, diskLowStagerDay, driveLowStagerDay, overallLowStagerDay; int netwXLowStagerDay, transfXLowStagerDay, diskXLowStagerDay, driveXLowStagerDay, overallXLowStagerDay; int netwLowRootDay, transfLowRootDay, diskLowRootDay, driveLowRootDay, overallLowRootDay; int netwXLowRootDay, transfXLowRootDay, diskXLowRootDay, driveXLowRootDay, overallXLowRootDay; int netwLowSamWeek, transfLowSamWeek, diskLowSamWeek, driveLowSamWeek, overallLowSamWeek; int netwXLowSamWeek, transfXLowSamWeek, diskXLowSamWeek, driveXLowSamWeek, overallXLowSamWeek; int netwLowStagerWeek, transfLowStagerWeek, diskLowStagerWeek, driveLowStagerWeek, overallLowStagerWeek; int netwXLowStagerWeek, transfXLowStagerWeek, diskXLowStagerWeek, driveXLowStagerWeek, overallXLowStagerWeek; int netwLowRootWeek, transfLowRootWeek, diskLowRootWeek, driveLowRootWeek, overallLowRootWeek; int netwXLowRootWeek, transfXLowRootWeek, diskXLowRootWeek, driveXLowRootWeek, overallXLowRootWeek; int netwLowSamMonth, transfLowSamMonth, diskLowSamMonth, driveLowSamMonth, overallLowSamMonth; int netwXLowSamMonth, transfXLowSamMonth, diskXLowSamMonth, driveXLowSamMonth, overallXLowSamMonth; int netwLowStagerMonth, transfLowStagerMonth, diskLowStagerMonth, driveLowStagerMonth, overallLowStagerMonth; int netwXLowStagerMonth, transfXLowStagerMonth, diskXLowStagerMonth, driveXLowStagerMonth, overallXLowStagerMonth; int netwLowRootMonth, transfLowRootMonth, diskLowRootMonth, driveLowRootMonth, overallLowRootMonth; int netwXLowRootMonth, transfXLowRootMonth, diskXLowRootMonth, driveXLowRootMonth, overallXLowRootMonth; char command[200]; // initialize the status netw_status_sam_day=transf_status_sam_day=disk_status_sam_day=drive_status_sam_day=overall_status_sam_day=0; netw_status_stager_day=transf_status_stager_day=disk_status_stager_day=drive_status_stager_day=overall_status_stager_day=0; netw_status_root_day=transf_status_root_day=disk_status_root_day=drive_status_root_day=overall_status_root_day=0; netw_status_sam_week=transf_status_sam_week=disk_status_sam_week=drive_status_sam_week=overall_status_sam_week=0; netw_status_stager_week=transf_status_stager_week=disk_status_stager_week=drive_status_stager_week=overall_status_stager_week=0; netw_status_root_week=transf_status_root_week=disk_status_root_week=drive_status_root_week=overall_status_root_week=0; netw_status_sam_month=transf_status_sam_month=disk_status_sam_month=drive_status_sam_month=overall_status_sam_month=0; netw_status_stager_month=transf_status_stager_month=disk_status_stager_month=drive_status_stager_month=overall_status_stager_month=0; netw_status_root_month=transf_status_root_month=disk_status_root_month=drive_status_root_month=overall_status_root_month=0; netwLowSamDay=transfLowSamDay=diskLowSamDay=driveLowSamDay=overallLowSamDay=0; netwXLowSamDay=transfXLowSamDay=diskXLowSamDay=driveXLowSamDay=overallXLowSamDay=0; netwLowStagerDay=transfLowStagerDay=diskLowStagerDay=driveLowStagerDay=overallLowStagerDay=0; netwXLowStagerDay=transfXLowStagerDay=diskXLowStagerDay=driveXLowStagerDay=overallXLowStagerDay=0; netwLowRootDay=transfLowRootDay=diskLowRootDay=driveLowRootDay=overallLowRootDay=0; netwXLowRootDay=transfXLowRootDay=diskXLowRootDay=driveXLowRootDay=overallXLowRootDay=0; netwLowSamWeek=transfLowSamWeek=diskLowSamWeek=driveLowSamWeek=overallLowSamWeek=0; netwXLowSamWeek=transfXLowSamWeek=diskXLowSamWeek=driveXLowSamWeek=overallXLowSamWeek=0; netwLowStagerWeek=transfLowStagerWeek=diskLowStagerWeek=driveLowStagerWeek=overallLowStagerWeek=0; netwXLowStagerWeek=transfXLowStagerWeek=diskXLowStagerWeek=driveXLowStagerWeek=overallXLowStagerWeek=0; netwLowRootWeek=transfLowRootWeek=diskLowRootWeek=driveLowRootWeek=overallLowRootWeek=0; netwXLowRootWeek=transfXLowRootWeek=diskXLowRootWeek=driveXLowRootWeek=overallXLowRootWeek=0; netwLowSamMonth=transfLowSamMonth=diskLowSamMonth=driveLowSamMonth=overallLowSamMonth=0; netwXLowSamMonth=transfXLowSamMonth=diskXLowSamMonth=driveXLowSamMonth=overallXLowSamMonth=0; netwLowStagerMonth=transfLowStagerMonth=diskLowStagerMonth=driveLowStagerMonth=overallLowStagerMonth=0; netwXLowStagerMonth=transfXLowStagerMonth=diskXLowStagerMonth=driveXLowStagerMonth=overallXLowStagerMonth=0; netwLowRootMonth=transfLowRootMonth=diskLowRootMonth=driveLowRootMonth=overallLowRootMonth=0; netwXLowRootMonth=transfXLowRootMonth=diskXLowRootMonth=driveXLowRootMonth=overallXLowRootMonth=0; nentries = static_cast (tree->GetEntries()); tree->SetBranchAddress("EnstoreMonitor", &fData); for(int nev=0; nevGetEvent(nev); netwRate=fData->fNetRate; transfRate=fData->fTransfRate; driveRate=fData->fDriveRate; diskRate=fData->fDiskRate; overallRate=fData->fOverallRate; strcpy(userN, fData->fUser); strcpy(nodeN, fData->fNode); strcpy(moverN, fData->fMover); strcpy(volumeN, fData->fVolume); nBytes = fData->fBytes; absTime = fData->fAbsTime; // first fill histos timeDay = (absTime - static_cast ( (now.Convert() - TMAX_DAY*60.) ))/60.; // because TDatime.Convert() gives the time in seconds timeWeek = (absTime - static_cast ( (now.Convert() - TMAX_WEEK*60.) ))/60.; timeMonth = (absTime - static_cast ( (now.Convert() - TMAX_MONTH*60.) ))/60.; // if(strcmp(userN,"sam/cdf")==0) { // sam fStatus.entries_sam++; if(((now.Convert() - absTime)/60.) < TMAX_DAY) fStatus.entries_sam_day++; if(((now.Convert() - absTime)/60.) < TMAX_WEEK) fStatus.entries_sam_week++; if(((now.Convert() - absTime)/60.) < TMAX_MONTH) fStatus.entries_sam_month++; //rates vs time if(((now.Convert() - absTime)/60.) < TMAX_DAY) { // simple rates (last 24 hours) hEnstNetRateSam->Fill(netwRate); hEnstTranRateSam->Fill(transfRate); hEnstDriveRateSam->Fill(driveRate); hEnstDiskRateSam->Fill(diskRate); hEnstOverallRateSam->Fill(overallRate); hEnstNetRateDaySam->Fill(timeDay/60., netwRate); // time in hours hEnstTranRateDaySam->Fill(timeDay/60., transfRate); hEnstDriveRateDaySam->Fill(timeDay/60., driveRate); hEnstDiskRateDaySam->Fill(timeDay/60., diskRate); hEnstOverallRateDaySam->Fill(timeDay/60., overallRate); } if(((now.Convert() - absTime)/60.)< TMAX_WEEK) { hEnstNetRateWeekSam->Fill(timeWeek/TMAX_DAY, netwRate); // time in days hEnstTranRateWeekSam->Fill(timeWeek/TMAX_DAY, transfRate); hEnstDriveRateWeekSam->Fill(timeWeek/TMAX_DAY, driveRate); hEnstDiskRateWeekSam->Fill(timeWeek/TMAX_DAY, diskRate); hEnstOverallRateWeekSam->Fill(timeWeek/TMAX_DAY, overallRate); } if(((now.Convert() - absTime)/60.)< TMAX_MONTH) { hEnstNetRateMonthSam->Fill(timeMonth/TMAX_DAY, netwRate); hEnstTranRateMonthSam->Fill(timeMonth/TMAX_DAY, transfRate); hEnstDriveRateMonthSam->Fill(timeMonth/TMAX_DAY, driveRate); hEnstDiskRateMonthSam->Fill(timeMonth/TMAX_DAY, diskRate); hEnstOverallRateMonthSam->Fill(timeMonth/TMAX_DAY, overallRate); } } if(strcmp(userN,"stager/cdf")==0) { // stager fStatus.entries_stager++; if(((now.Convert() - absTime)/60.) < TMAX_DAY) fStatus.entries_stager_day++; if(((now.Convert() - absTime)/60.) < TMAX_WEEK) fStatus.entries_stager_week++; if(((now.Convert() - absTime)/60.) < TMAX_MONTH) fStatus.entries_stager_month++; //rates vs time if(((now.Convert() - absTime)/60.)< TMAX_DAY) { // simple rates hEnstNetRateStager->Fill(netwRate); hEnstTranRateStager->Fill(transfRate); hEnstDriveRateStager->Fill(driveRate); hEnstDiskRateStager->Fill(diskRate); hEnstOverallRateStager->Fill(overallRate); hEnstNetRateDayStager->Fill(timeDay/60., netwRate); hEnstTranRateDayStager->Fill(timeDay/60., transfRate); hEnstDriveRateDayStager->Fill(timeDay/60., driveRate); hEnstDiskRateDayStager->Fill(timeDay/60., diskRate); hEnstOverallRateDayStager->Fill(timeDay/60., overallRate); } if(((now.Convert() - absTime)/60.)< TMAX_WEEK) { hEnstNetRateWeekStager->Fill(timeWeek/TMAX_DAY, netwRate); hEnstTranRateWeekStager->Fill(timeWeek/TMAX_DAY, transfRate); hEnstDriveRateWeekStager->Fill(timeWeek/TMAX_DAY, driveRate); hEnstDiskRateWeekStager->Fill(timeWeek/TMAX_DAY, diskRate); hEnstOverallRateWeekStager->Fill(timeWeek/TMAX_DAY, overallRate); } if(((now.Convert() - absTime)/60.)< TMAX_MONTH) { hEnstNetRateMonthStager->Fill(timeMonth/TMAX_DAY, netwRate); hEnstTranRateMonthStager->Fill(timeMonth/TMAX_DAY, transfRate); hEnstDriveRateMonthStager->Fill(timeMonth/TMAX_DAY, driveRate); hEnstDiskRateMonthStager->Fill(timeMonth/TMAX_DAY, diskRate); hEnstOverallRateMonthStager->Fill(timeMonth/TMAX_DAY, overallRate); } } if(strcmp(userN,"root/cdf")==0) { // root fStatus.entries_root++; if(((now.Convert() - absTime)/60.) < TMAX_DAY) fStatus.entries_root_day++; if(((now.Convert() - absTime)/60.) < TMAX_WEEK) fStatus.entries_root_week++; if(((now.Convert() - absTime)/60.) < TMAX_MONTH) fStatus.entries_root_month++; //rates vs time if(((now.Convert() - absTime)/60.)< TMAX_DAY) { // simple rates hEnstNetRateRoot->Fill(netwRate); hEnstTranRateRoot->Fill(transfRate); hEnstDriveRateRoot->Fill(driveRate); hEnstDiskRateRoot->Fill(diskRate); hEnstOverallRateRoot->Fill(overallRate); hEnstNetRateDayRoot->Fill(timeDay/60., netwRate); hEnstTranRateDayRoot->Fill(timeDay/60., transfRate); hEnstDriveRateDayRoot->Fill(timeDay/60., driveRate); hEnstDiskRateDayRoot->Fill(timeDay/60., diskRate); hEnstOverallRateDayRoot->Fill(timeDay/60., overallRate); } if(((now.Convert() - absTime)/60.)< TMAX_WEEK) { hEnstNetRateWeekRoot->Fill(timeWeek/TMAX_DAY, netwRate); hEnstTranRateWeekRoot->Fill(timeWeek/TMAX_DAY, transfRate); hEnstDriveRateWeekRoot->Fill(timeWeek/TMAX_DAY, driveRate); hEnstDiskRateWeekRoot->Fill(timeWeek/TMAX_DAY, diskRate); hEnstOverallRateWeekRoot->Fill(timeWeek/TMAX_DAY, overallRate); } if(((now.Convert() - absTime)/60.)< TMAX_MONTH) { hEnstNetRateMonthRoot->Fill(timeMonth/TMAX_DAY, netwRate); hEnstTranRateMonthRoot->Fill(timeMonth/TMAX_DAY, transfRate); hEnstDriveRateMonthRoot->Fill(timeMonth/TMAX_DAY, driveRate); hEnstDiskRateMonthRoot->Fill(timeMonth/TMAX_DAY, diskRate); hEnstOverallRateMonthRoot->Fill(timeMonth/TMAX_DAY, overallRate); } } // // then check for exceedingly low rates // if(strcmp(userN,"sam/cdf")==0) { // sam if(((now.Convert() - absTime)/60.) < TMAX_DAY) { // last 24 hours if(netwRate < fPars.netwLowRateSam) netwLowSamDay++; // this is low if(netwRate < fPars.netwXLowRateSam) netwXLowSamDay++; // this is very low! if(transfRate < fPars.transfLowRateSam) transfLowSamDay++; // this is low if(transfRate < fPars.transfXLowRateSam) transfXLowSamDay++; // this is very low! if(diskRate < fPars.diskLowRateSam) diskLowSamDay++; // this is low if(diskRate < fPars.diskXLowRateSam) diskXLowSamDay++; // this is very low! if(driveRate < fPars.driveLowRateSam) driveLowSamDay++; // this is low if(driveRate < fPars.driveXLowRateSam) driveXLowSamDay++; // this is very low! if(overallRate < fPars.overallLowRateSam) overallLowSamDay++; // this is low if(overallRate < fPars.overallXLowRateSam) overallXLowSamDay++; // this is very low! } if(((now.Convert() - absTime)/60.) < TMAX_WEEK) { // last 7 days if(netwRate < fPars.netwLowRateSam) netwLowSamWeek++; // this is low if(netwRate < fPars.netwXLowRateSam) netwXLowSamWeek++; // this is very low! if(transfRate < fPars.transfLowRateSam) transfLowSamWeek++; // this is low if(transfRate < fPars.transfXLowRateSam) transfXLowSamWeek++; // this is very low! if(diskRate < fPars.diskLowRateSam) diskLowSamWeek++; // this is low if(diskRate < fPars.diskXLowRateSam) diskXLowSamWeek++; // this is very low! if(driveRate < fPars.driveLowRateSam) driveLowSamWeek++; // this is low if(driveRate < fPars.driveXLowRateSam) driveXLowSamWeek++; // this is very low! if(overallRate < fPars.overallLowRateSam) overallLowSamWeek++; // this is low if(overallRate < fPars.overallXLowRateSam) overallXLowSamWeek++; // this is very low! } if(((now.Convert() - absTime)/60.) < TMAX_MONTH) { // last 31 days if(netwRate < fPars.netwLowRateSam) netwLowSamMonth++; // this is low if(netwRate < fPars.netwXLowRateSam) netwXLowSamMonth++; // this is very low! if(transfRate < fPars.transfLowRateSam) transfLowSamMonth++; // this is low if(transfRate < fPars.transfXLowRateSam) transfXLowSamMonth++; // this is very low! if(diskRate < fPars.diskLowRateSam) diskLowSamMonth++; // this is low if(diskRate < fPars.diskXLowRateSam) diskXLowSamMonth++; // this is very low! if(driveRate < fPars.driveLowRateSam) driveLowSamMonth++; // this is low if(driveRate < fPars.driveXLowRateSam) driveXLowSamMonth++; // this is very low! if(overallRate < fPars.overallLowRateSam) overallLowSamMonth++; // this is low if(overallRate < fPars.overallXLowRateSam) overallXLowSamMonth++; // this is very low! } } if(strcmp(userN,"stager/cdf")==0) { // stager if(((now.Convert() - absTime)/60.) < TMAX_DAY) { // last 24 hours if(netwRate < fPars.netwLowRateStager) netwLowStagerDay++; // this is low if(netwRate < fPars.netwXLowRateStager) netwXLowStagerDay++; // this is very low! if(transfRate < fPars.transfLowRateStager) transfLowStagerDay++; // this is low if(transfRate < fPars.transfXLowRateStager) transfXLowStagerDay++; // this is very low! if(diskRate < fPars.diskLowRateStager) diskLowStagerDay++; // this is low if(diskRate < fPars.diskXLowRateStager) diskXLowStagerDay++; // this is very low! if(driveRate < fPars.driveLowRateStager) driveLowStagerDay++; // this is low if(driveRate < fPars.driveXLowRateStager) driveXLowStagerDay++; // this is very low! if(overallRate < fPars.overallLowRateStager) overallLowStagerDay++; // this is low if(overallRate < fPars.overallXLowRateStager) overallXLowStagerDay++; // this is very low! } if(((now.Convert() - absTime)/60.) < TMAX_WEEK) { // last 7 days if(netwRate < fPars.netwLowRateStager) netwLowStagerWeek++; // this is low if(netwRate < fPars.netwXLowRateStager) netwXLowStagerWeek++; // this is very low! if(transfRate < fPars.transfLowRateStager) transfLowStagerWeek++; // this is low if(transfRate < fPars.transfXLowRateStager) transfXLowStagerWeek++; // this is very low! if(diskRate < fPars.diskLowRateStager) diskLowStagerWeek++; // this is low if(diskRate < fPars.diskXLowRateStager) diskXLowStagerWeek++; // this is very low! if(driveRate < fPars.driveLowRateStager) driveLowStagerWeek++; // this is low if(driveRate < fPars.driveXLowRateStager) driveXLowStagerWeek++; // this is very low! if(overallRate < fPars.overallLowRateStager) overallLowStagerWeek++; // this is low if(overallRate < fPars.overallXLowRateStager) overallXLowStagerWeek++; // this is very low! } if(((now.Convert() - absTime)/60.) < TMAX_MONTH) { // last 31 days if(netwRate < fPars.netwLowRateStager) netwLowStagerMonth++; // this is low if(netwRate < fPars.netwXLowRateStager) netwXLowStagerMonth++; // this is very low! if(transfRate < fPars.transfLowRateStager) transfLowStagerMonth++; // this is low if(transfRate < fPars.transfXLowRateStager) transfXLowStagerMonth++; // this is very low! if(diskRate < fPars.diskLowRateStager) diskLowStagerMonth++; // this is low if(diskRate < fPars.diskXLowRateStager) diskXLowStagerMonth++; // this is very low! if(driveRate < fPars.driveLowRateStager) driveLowStagerMonth++; // this is low if(driveRate < fPars.driveXLowRateStager) driveXLowStagerMonth++; // this is very low! if(overallRate < fPars.overallLowRateStager) overallLowStagerMonth++; // this is low if(overallRate < fPars.overallXLowRateStager) overallXLowStagerMonth++; // this is very low! } } if(strcmp(userN,"root/cdf")==0) { // root if(((now.Convert() - absTime)/60.) < TMAX_DAY) { // last 24 hours if(netwRate < fPars.netwLowRateRoot) netwLowRootDay++; // this is low if(netwRate < fPars.netwXLowRateRoot) netwXLowRootDay++; // this is very low! if(transfRate < fPars.transfLowRateRoot) transfLowRootDay++; // this is low if(transfRate < fPars.transfXLowRateRoot) transfXLowRootDay++; // this is very low! if(diskRate < fPars.diskLowRateRoot) diskLowRootDay++; // this is low if(diskRate < fPars.diskXLowRateRoot) diskXLowRootDay++; // this is very low! if(driveRate < fPars.driveLowRateRoot) driveLowRootDay++; // this is low if(driveRate < fPars.driveXLowRateRoot) driveXLowRootDay++; // this is very low! if(overallRate < fPars.overallLowRateRoot) overallLowRootDay++; // this is low if(overallRate < fPars.overallXLowRateRoot) overallXLowRootDay++; // this is very low! } if(((now.Convert() - absTime)/60.) < TMAX_WEEK) { // last 7 days if(netwRate < fPars.netwLowRateRoot) netwLowRootWeek++; // this is low if(netwRate < fPars.netwXLowRateRoot) netwXLowRootWeek++; // this is very low! if(transfRate < fPars.transfLowRateRoot) transfLowRootWeek++; // this is low if(transfRate < fPars.transfXLowRateRoot) transfXLowRootWeek++; // this is very low! if(diskRate < fPars.diskLowRateRoot) diskLowRootWeek++; // this is low if(diskRate < fPars.diskXLowRateRoot) diskXLowRootWeek++; // this is very low! if(driveRate < fPars.driveLowRateRoot) driveLowRootWeek++; // this is low if(driveRate < fPars.driveXLowRateRoot) driveXLowRootWeek++; // this is very low! if(overallRate < fPars.overallLowRateRoot) overallLowRootWeek++; // this is low if(overallRate < fPars.overallXLowRateRoot) overallXLowRootWeek++; // this is very low! } if(((now.Convert() - absTime)/60.) < TMAX_MONTH) { // last 31 days if(netwRate < fPars.netwLowRateRoot) netwLowRootMonth++; // this is low if(netwRate < fPars.netwXLowRateRoot) netwXLowRootMonth++; // this is very low! if(transfRate < fPars.transfLowRateRoot) transfLowRootMonth++; // this is low if(transfRate < fPars.transfXLowRateRoot) transfXLowRootMonth++; // this is very low! if(diskRate < fPars.diskLowRateRoot) diskLowRootMonth++; // this is low if(diskRate < fPars.diskXLowRateRoot) diskXLowRootMonth++; // this is very low! if(driveRate < fPars.driveLowRateRoot) driveLowRootMonth++; // this is low if(driveRate < fPars.driveXLowRateRoot) driveXLowRootMonth++; // this is very low! if(overallRate < fPars.overallLowRateRoot) overallLowRootMonth++; // this is low if(overallRate < fPars.overallXLowRateRoot) overallXLowRootMonth++; // this is very low! } } } ntuple_file.Close(); // now check the status // last 24 hours // sam if(netwLowSamDay> fPars.netwPctLow*fStatus.entries_sam_day) netw_status_sam_day=1; if(netwXLowSamDay> fPars.netwPctXLow*fStatus.entries_sam_day) netw_status_sam_day=2; if(transfLowSamDay> fPars.transfPctLow*fStatus.entries_sam_day) transf_status_sam_day=1; if(transfXLowSamDay> fPars.transfPctXLow*fStatus.entries_sam_day) transf_status_sam_day=2; if(diskLowSamDay> fPars.diskPctLow*fStatus.entries_sam_day) disk_status_sam_day=1; if(diskXLowSamDay> fPars.diskPctXLow*fStatus.entries_sam_day) disk_status_sam_day=2; if(driveLowSamDay> fPars.drivePctLow*fStatus.entries_sam_day) drive_status_sam_day=1; if(driveXLowSamDay> fPars.drivePctXLow*fStatus.entries_sam_day) drive_status_sam_day=2; if(overallLowSamDay> fPars.overallPctLow*fStatus.entries_sam_day) overall_status_sam_day=1; if(overallXLowSamDay> fPars.overallPctXLow*fStatus.entries_sam_day) overall_status_sam_day=2; // stager if(netwLowStagerDay> fPars.netwPctLow*fStatus.entries_stager_day) netw_status_stager_day=1; if(netwXLowStagerDay> fPars.netwPctXLow*fStatus.entries_stager_day) netw_status_stager_day=2; if(transfLowStagerDay> fPars.transfPctLow*fStatus.entries_stager_day) transf_status_stager_day=1; if(transfXLowStagerDay> fPars.transfPctXLow*fStatus.entries_stager_day) transf_status_stager_day=2; if(diskLowStagerDay> fPars.diskPctLow*fStatus.entries_stager_day) disk_status_stager_day=1; if(diskXLowStagerDay> fPars.diskPctXLow*fStatus.entries_stager_day) disk_status_stager_day=2; if(driveLowStagerDay> fPars.drivePctLow*fStatus.entries_stager_day) drive_status_stager_day=1; if(driveXLowStagerDay> fPars.drivePctXLow*fStatus.entries_stager_day) drive_status_stager_day=2; if(overallLowStagerDay> fPars.overallPctLow*fStatus.entries_stager_day) overall_status_stager_day=1; if(overallXLowStagerDay> fPars.overallPctXLow*fStatus.entries_stager_day) overall_status_stager_day=2; // root if(netwLowRootDay> fPars.netwPctLow*fStatus.entries_root_day) netw_status_root_day=1; if(netwXLowRootDay> fPars.netwPctXLow*fStatus.entries_root_day) netw_status_root_day=2; if(transfLowRootDay> fPars.transfPctLow*fStatus.entries_root_day) transf_status_root_day=1; if(transfXLowRootDay> fPars.transfPctXLow*fStatus.entries_root_day) transf_status_root_day=2; if(diskLowRootDay> fPars.diskPctLow*fStatus.entries_root_day) disk_status_root_day=1; if(diskXLowRootDay> fPars.diskPctXLow*fStatus.entries_root_day) disk_status_root_day=2; if(driveLowRootDay> fPars.drivePctLow*fStatus.entries_root_day) drive_status_root_day=1; if(driveXLowRootDay> fPars.drivePctXLow*fStatus.entries_root_day) drive_status_root_day=2; if(overallLowRootDay> fPars.overallPctLow*fStatus.entries_root_day) overall_status_root_day=1; if(overallXLowRootDay> fPars.overallPctXLow*fStatus.entries_root_day) overall_status_root_day=2; // last 7 days // sam if(netwLowSamWeek> fPars.netwPctLow*fStatus.entries_sam_week) netw_status_sam_week=1; if(netwXLowSamWeek> fPars.netwPctXLow*fStatus.entries_sam_week) netw_status_sam_week=2; if(transfLowSamWeek> fPars.transfPctLow*fStatus.entries_sam_week) transf_status_sam_week=1; if(transfXLowSamWeek> fPars.transfPctXLow*fStatus.entries_sam_week) transf_status_sam_week=2; if(diskLowSamWeek> fPars.diskPctLow*fStatus.entries_sam_week) disk_status_sam_week=1; if(diskXLowSamWeek> fPars.diskPctXLow*fStatus.entries_sam_week) disk_status_sam_week=2; if(driveLowSamWeek> fPars.drivePctLow*fStatus.entries_sam_week) drive_status_sam_week=1; if(driveXLowSamWeek> fPars.drivePctXLow*fStatus.entries_sam_week) drive_status_sam_week=2; if(overallLowSamWeek> fPars.overallPctLow*fStatus.entries_sam_week) overall_status_sam_week=1; if(overallXLowSamWeek> fPars.overallPctXLow*fStatus.entries_sam_week) overall_status_sam_week=2; // stager if(netwLowStagerWeek> fPars.netwPctLow*fStatus.entries_stager_week) netw_status_stager_week=1; if(netwXLowStagerWeek> fPars.netwPctXLow*fStatus.entries_stager_week) netw_status_stager_week=2; if(transfLowStagerWeek> fPars.transfPctLow*fStatus.entries_stager_week) transf_status_stager_week=1; if(transfXLowStagerWeek> fPars.transfPctXLow*fStatus.entries_stager_week) transf_status_stager_week=2; if(diskLowStagerWeek> fPars.diskPctLow*fStatus.entries_stager_week) disk_status_stager_week=1; if(diskXLowStagerWeek> fPars.diskPctXLow*fStatus.entries_stager_week) disk_status_stager_week=2; if(driveLowStagerWeek> fPars.drivePctLow*fStatus.entries_stager_week) drive_status_stager_week=1; if(driveXLowStagerWeek> fPars.drivePctXLow*fStatus.entries_stager_week) drive_status_stager_week=2; if(overallLowStagerWeek> fPars.overallPctLow*fStatus.entries_stager_week) overall_status_stager_week=1; if(overallXLowStagerWeek> fPars.overallPctXLow*fStatus.entries_stager_week) overall_status_stager_week=2; // root if(netwLowRootWeek> fPars.netwPctLow*fStatus.entries_root_week) netw_status_root_week=1; if(netwXLowRootWeek> fPars.netwPctXLow*fStatus.entries_root_week) netw_status_root_week=2; if(transfLowRootWeek> fPars.transfPctLow*fStatus.entries_root_week) transf_status_root_week=1; if(transfXLowRootWeek> fPars.transfPctXLow*fStatus.entries_root_week) transf_status_root_week=2; if(diskLowRootWeek> fPars.diskPctLow*fStatus.entries_root_week) disk_status_root_week=1; if(diskXLowRootWeek> fPars.diskPctXLow*fStatus.entries_root_week) disk_status_root_week=2; if(driveLowRootWeek> fPars.drivePctLow*fStatus.entries_root_week) drive_status_root_week=1; if(driveXLowRootWeek> fPars.drivePctXLow*fStatus.entries_root_week) drive_status_root_week=2; if(overallLowRootWeek> fPars.overallPctLow*fStatus.entries_root_week) overall_status_root_week=1; if(overallXLowRootWeek> fPars.overallPctXLow*fStatus.entries_root_week) overall_status_root_week=2; // last 31 days // sam if(netwLowSamMonth> fPars.netwPctLow*fStatus.entries_sam_month) netw_status_sam_month=1; if(netwXLowSamMonth> fPars.netwPctXLow*fStatus.entries_sam_month) netw_status_sam_month=2; if(transfLowSamMonth> fPars.transfPctLow*fStatus.entries_sam_month) transf_status_sam_month=1; if(transfXLowSamMonth> fPars.transfPctXLow*fStatus.entries_sam_month) transf_status_sam_month=2; if(diskLowSamMonth> fPars.diskPctLow*fStatus.entries_sam_month) disk_status_sam_month=1; if(diskXLowSamMonth> fPars.diskPctXLow*fStatus.entries_sam_month) disk_status_sam_month=2; if(driveLowSamMonth> fPars.drivePctLow*fStatus.entries_sam_month) drive_status_sam_month=1; if(driveXLowSamMonth> fPars.drivePctXLow*fStatus.entries_sam_month) drive_status_sam_month=2; if(overallLowSamMonth> fPars.overallPctLow*fStatus.entries_sam_month) overall_status_sam_month=1; if(overallXLowSamMonth> fPars.overallPctXLow*fStatus.entries_sam_month) overall_status_sam_month=2; // stager if(netwLowStagerMonth> fPars.netwPctLow*fStatus.entries_stager_month) netw_status_stager_month=1; if(netwXLowStagerMonth> fPars.netwPctXLow*fStatus.entries_stager_month) netw_status_stager_month=2; if(transfLowStagerMonth> fPars.transfPctLow*fStatus.entries_stager_month) transf_status_stager_month=1; if(transfXLowStagerMonth> fPars.transfPctXLow*fStatus.entries_stager_month) transf_status_stager_month=2; if(diskLowStagerMonth> fPars.diskPctLow*fStatus.entries_stager_month) disk_status_stager_month=1; if(diskXLowStagerMonth> fPars.diskPctXLow*fStatus.entries_stager_month) disk_status_stager_month=2; if(driveLowStagerMonth> fPars.drivePctLow*fStatus.entries_stager_month) drive_status_stager_month=1; if(driveXLowStagerMonth> fPars.drivePctXLow*fStatus.entries_stager_month) drive_status_stager_month=2; if(overallLowStagerMonth> fPars.overallPctLow*fStatus.entries_stager_month) overall_status_stager_month=1; if(overallXLowStagerMonth> fPars.overallPctXLow*fStatus.entries_stager_month) overall_status_stager_month=2; // root if(netwLowRootMonth> fPars.netwPctLow*fStatus.entries_root_month) netw_status_root_month=1; if(netwXLowRootMonth> fPars.netwPctXLow*fStatus.entries_root_month) netw_status_root_month=2; if(transfLowRootMonth> fPars.transfPctLow*fStatus.entries_root_month) transf_status_root_month=1; if(transfXLowRootMonth> fPars.transfPctXLow*fStatus.entries_root_month) transf_status_root_month=2; if(diskLowRootMonth> fPars.diskPctLow*fStatus.entries_root_month) disk_status_root_month=1; if(diskXLowRootMonth> fPars.diskPctXLow*fStatus.entries_root_month) disk_status_root_month=2; if(driveLowRootMonth> fPars.drivePctLow*fStatus.entries_root_month) drive_status_root_month=1; if(driveXLowRootMonth> fPars.drivePctXLow*fStatus.entries_root_month) drive_status_root_month=2; if(overallLowRootMonth> fPars.overallPctLow*fStatus.entries_root_month) overall_status_root_month=1; if(overallXLowRootMonth> fPars.overallPctXLow*fStatus.entries_root_month) overall_status_root_month=2; // now all the three of them fStatus.netw = max(netw_status_sam_day, netw_status_stager_day); fStatus.netw = max (fStatus.netw, netw_status_root_day); fStatus.transf = max(transf_status_sam_day, transf_status_stager_day); fStatus.transf = max (fStatus.transf, transf_status_root_day); fStatus.disk = max(disk_status_sam_day, disk_status_stager_day); fStatus.disk = max (fStatus.disk, disk_status_root_day); fStatus.drive = max(drive_status_sam_day, drive_status_stager_day); fStatus.drive = max (fStatus.drive, drive_status_root_day); fStatus.overall = max(overall_status_sam_day, overall_status_stager_day); fStatus.overall = max (fStatus.overall, overall_status_root_day); if(fStatus.netw==1 || fStatus.transf==1 || fStatus.disk==1 || fStatus.drive==1 || fStatus.overall==1) fStatus.global=1; if(fStatus.netw==2 || fStatus.transf==2 || fStatus.disk==2 || fStatus.drive==2 || fStatus.overall==2) fStatus.global=2; // // write the status file // TString statusFile; statusFile = fHtmlDirectory + "/Status.dat"; FILE* fOut = fopen(statusFile,"w"); TDatime time; time = TDatime(); fprintf(fOut,"%d %d\n", fStatus.global, fStatus.movers); fprintf(fOut,"%s", time.AsSQLString()); fStatus.time = time; fclose(fOut); // // now plot histograms // TString psFile, gifFile; // first syst for (int i=1;i<=POSSIBLE_STATUS;i++) { // relabel hEnstMoverStatusDay->GetXaxis()->SetBinLabel(i,mStatus[i-1]); hEnstMoverStatusWeek->GetXaxis()->SetBinLabel(i,mStatus[i-1]); hEnstMoverStatusMonth->GetXaxis()->SetBinLabel(i,mStatus[i-1]); } hEnstMoverStatusDay->SetStats(false); hEnstMoverStatusWeek->SetStats(false); hEnstMoverStatusMonth->SetStats(false); if(movers_status_day==0) hEnstMoverStatusDay->SetFillColor(kGreen); if(movers_status_day==1) hEnstMoverStatusDay->SetFillColor(kYellow); if(movers_status_day==2) hEnstMoverStatusDay->SetFillColor(kRed); if(movers_status_week==0) hEnstMoverStatusWeek->SetFillColor(kGreen); if(movers_status_week==1) hEnstMoverStatusWeek->SetFillColor(kYellow); if(movers_status_week==2) hEnstMoverStatusWeek->SetFillColor(kRed); if(movers_status_month==0) hEnstMoverStatusMonth->SetFillColor(kGreen); if(movers_status_month==1) hEnstMoverStatusMonth->SetFillColor(kYellow); if(movers_status_month==2) hEnstMoverStatusMonth->SetFillColor(kRed); TCanvas * cStatus = new TCanvas("cStatus"); hEnstMoverStatusDay->Draw(); psFile = fHtmlDirectory + "/MoverStatus.eps"; cStatus->Print(psFile); gifFile = fHtmlDirectory + "/MoverStatus.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cStatus->Print(gifFile); } TCanvas * cStatusWM = new TCanvas("cStatusWM"); cStatusWM->Divide(1,2); cStatusWM->cd(1); hEnstMoverStatusWeek->Draw(); cStatusWM->cd(2); hEnstMoverStatusMonth->Draw(); psFile = fHtmlDirectory + "/MoverStatusWM.eps"; cStatusWM->Print(psFile); gifFile = fHtmlDirectory + "/MoverStatusWM.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cStatusWM->Print(gifFile); } // then the enstore ntuple TLine *lNetLSam, *lTranLSam, *lDiskLSam, *lDriveLSam, *lOverLSam; TLine *lNetXLSam, *lTranXLSam, *lDiskXLSam, *lDriveXLSam, *lOverXLSam; TLine *lNetLStager, *lTranLStager, *lDiskLStager, *lDriveLStager, *lOverLStager; TLine *lNetXLStager, *lTranXLStager, *lDiskXLStager, *lDriveXLStager, *lOverXLStager; TLine *lNetLRoot, *lTranLRoot, *lDiskLRoot, *lDriveLRoot, *lOverLRoot; TLine *lNetXLRoot, *lTranXLRoot, *lDiskXLRoot, *lDriveXLRoot, *lOverXLRoot; TLine *lpNetLSamD, *lpTranLSamD, *lpDiskLSamD, *lpDriveLSamD, *lpOverLSamD; TLine *lpNetXLSamD, *lpTranXLSamD, *lpDiskXLSamD, *lpDriveXLSamD, *lpOverXLSamD; TLine *lpNetLStagerD, *lpTranLStagerD, *lpDiskLStagerD, *lpDriveLStagerD, *lpOverLStagerD; TLine *lpNetXLStagerD, *lpTranXLStagerD, *lpDiskXLStagerD, *lpDriveXLStagerD, *lpOverXLStagerD; TLine *lpNetLRootD, *lpTranLRootD, *lpDiskLRootD, *lpDriveLRootD, *lpOverLRootD; TLine *lpNetXLRootD, *lpTranXLRootD, *lpDiskXLRootD, *lpDriveXLRootD, *lpOverXLRootD; TLine *lpNetLSamW, *lpTranLSamW, *lpDiskLSamW, *lpDriveLSamW, *lpOverLSamW; TLine *lpNetXLSamW, *lpTranXLSamW, *lpDiskXLSamW, *lpDriveXLSamW, *lpOverXLSamW; TLine *lpNetLStagerW, *lpTranLStagerW, *lpDiskLStagerW, *lpDriveLStagerW, *lpOverLStagerW; TLine *lpNetXLStagerW, *lpTranXLStagerW, *lpDiskXLStagerW, *lpDriveXLStagerW, *lpOverXLStagerW; TLine *lpNetLRootW, *lpTranLRootW, *lpDiskLRootW, *lpDriveLRootW, *lpOverLRootW; TLine *lpNetXLRootW, *lpTranXLRootW, *lpDiskXLRootW, *lpDriveXLRootW, *lpOverXLRootW; TLine *lpNetLSamM, *lpTranLSamM, *lpDiskLSamM, *lpDriveLSamM, *lpOverLSamM; TLine *lpNetXLSamM, *lpTranXLSamM, *lpDiskXLSamM, *lpDriveXLSamM, *lpOverXLSamM; TLine *lpNetLStagerM, *lpTranLStagerM, *lpDiskLStagerM, *lpDriveLStagerM, *lpOverLStagerM; TLine *lpNetXLStagerM, *lpTranXLStagerM, *lpDiskXLStagerM, *lpDriveXLStagerM, *lpOverXLStagerM; TLine *lpNetLRootM, *lpTranLRootM, *lpDiskLRootM, *lpDriveLRootM, *lpOverLRootM; TLine *lpNetXLRootM, *lpTranXLRootM, *lpDiskXLRootM, *lpDriveXLRootM, *lpOverXLRootM; // network rates if(netw_status_sam_day==0) hEnstNetRateSam->SetFillColor(kGreen); if(netw_status_sam_day==1) hEnstNetRateSam->SetFillColor(kYellow); if(netw_status_sam_day==2) hEnstNetRateSam->SetFillColor(kRed); if(netw_status_stager_day==0) hEnstNetRateStager->SetFillColor(kGreen); if(netw_status_stager_day==1) hEnstNetRateStager->SetFillColor(kYellow); if(netw_status_stager_day==2) hEnstNetRateStager->SetFillColor(kRed); if(netw_status_root_day==0) hEnstNetRateRoot->SetFillColor(kGreen); if(netw_status_root_day==1) hEnstNetRateRoot->SetFillColor(kYellow); if(netw_status_root_day==2) hEnstNetRateRoot->SetFillColor(kRed); // simple rates TCanvas * cNetw = new TCanvas("cNetw"); cNetw->Divide(1,3); cNetw->cd(1); hEnstNetRateSam->Draw(); lNetLSam = new TLine(fPars.netwLowRateSam, 0, fPars.netwLowRateSam, 100000); lNetLSam->SetLineColor(kYellow); lNetLSam->Draw(); lNetXLSam = new TLine(fPars.netwXLowRateSam, 0, fPars.netwXLowRateSam, 100000); lNetXLSam->SetLineColor(kRed); lNetXLSam->Draw(); cNetw->cd(2); hEnstNetRateStager->Draw(); lNetLStager = new TLine(fPars.netwLowRateStager, 0, fPars.netwLowRateStager, 100000); lNetLStager->SetLineColor(kYellow); lNetLStager->Draw(); lNetXLStager = new TLine(fPars.netwXLowRateStager, 0, fPars.netwXLowRateStager, 100000); lNetXLStager->SetLineColor(kRed); lNetXLStager->Draw(); cNetw->cd(3); hEnstNetRateRoot->Draw(); lNetLRoot = new TLine(fPars.netwLowRateRoot, 0, fPars.netwLowRateRoot, 100000); lNetLRoot->SetLineColor(kYellow); lNetLRoot->Draw(); lNetXLRoot = new TLine(fPars.netwXLowRateRoot, 0, fPars.netwXLowRateRoot, 100000); lNetXLRoot->SetLineColor(kRed); lNetXLRoot->Draw(); psFile = fHtmlDirectory + "/NetwRates.eps"; cNetw->Print(psFile); gifFile = fHtmlDirectory + "/NetwRates.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cNetw->Print(gifFile); } // transfer rates if(transf_status_sam_day==0) hEnstTranRateSam->SetFillColor(kGreen); if(transf_status_sam_day==1) hEnstTranRateSam->SetFillColor(kYellow); if(transf_status_sam_day==2) hEnstTranRateSam->SetFillColor(kRed); if(transf_status_stager_day==0) hEnstTranRateStager->SetFillColor(kGreen); if(transf_status_stager_day==1) hEnstTranRateStager->SetFillColor(kYellow); if(transf_status_stager_day==2) hEnstTranRateStager->SetFillColor(kRed); if(transf_status_root_day==0) hEnstTranRateRoot->SetFillColor(kGreen); if(transf_status_root_day==1) hEnstTranRateRoot->SetFillColor(kYellow); if(transf_status_root_day==2) hEnstTranRateRoot->SetFillColor(kRed); TCanvas * cTran = new TCanvas("cTran"); cTran->Divide(1,3); cTran->cd(1); hEnstTranRateSam->Draw(); lTranLSam = new TLine(fPars.transfLowRateSam, 0, fPars.transfLowRateSam, 100000); lTranLSam->SetLineColor(kYellow); lTranLSam->Draw(); lTranXLSam = new TLine(fPars.transfXLowRateSam, 0, fPars.transfXLowRateSam, 100000); lTranXLSam->SetLineColor(kRed); lTranXLSam->Draw(); cTran->cd(2); hEnstTranRateStager->Draw(); lTranLStager = new TLine(fPars.transfLowRateStager, 0, fPars.transfLowRateStager, 100000); lTranLStager->SetLineColor(kYellow); lTranLStager->Draw(); lTranXLStager = new TLine(fPars.transfXLowRateStager, 0, fPars.transfXLowRateStager, 100000); lTranXLStager->SetLineColor(kRed); lTranXLStager->Draw(); cTran->cd(3); hEnstTranRateRoot->Draw(); lTranLRoot = new TLine(fPars.transfLowRateRoot, 0, fPars.transfLowRateRoot, 100000); lTranLRoot->SetLineColor(kYellow); lTranLRoot->Draw(); lTranXLRoot = new TLine(fPars.transfXLowRateRoot, 0, fPars.transfXLowRateRoot, 100000); lTranXLRoot->SetLineColor(kRed); lTranXLRoot->Draw(); psFile = fHtmlDirectory + "/TransfRates.eps"; cTran->Print(psFile); gifFile = fHtmlDirectory + "/TransfRates.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cTran->Print(gifFile); } // disk if(disk_status_sam_day==0) hEnstDiskRateSam->SetFillColor(kGreen); if(disk_status_sam_day==1) hEnstDiskRateSam->SetFillColor(kYellow); if(disk_status_sam_day==2) hEnstDiskRateSam->SetFillColor(kRed); if(disk_status_stager_day==0) hEnstDiskRateStager->SetFillColor(kGreen); if(disk_status_stager_day==1) hEnstDiskRateStager->SetFillColor(kYellow); if(disk_status_stager_day==2) hEnstDiskRateStager->SetFillColor(kRed); if(disk_status_root_day==0) hEnstDiskRateRoot->SetFillColor(kGreen); if(disk_status_root_day==1) hEnstDiskRateRoot->SetFillColor(kYellow); if(disk_status_root_day==2) hEnstDiskRateRoot->SetFillColor(kRed); TCanvas * cDisk = new TCanvas("cDisk"); cDisk->Divide(1,3); cDisk->cd(1); hEnstDiskRateSam->Draw(); lDiskLSam = new TLine(fPars.diskLowRateSam, 0, fPars.diskLowRateSam, 100000); lDiskLSam->SetLineColor(kYellow); lDiskLSam->Draw(); lDiskXLSam = new TLine(fPars.diskXLowRateSam, 0, fPars.diskXLowRateSam, 100000); lDiskXLSam->SetLineColor(kRed); lDiskXLSam->Draw(); cDisk->cd(2); hEnstDiskRateStager->Draw(); lDiskLStager = new TLine(fPars.diskLowRateSam, 0, fPars.diskLowRateSam, 100000); lDiskLStager->SetLineColor(kYellow); lDiskLStager->Draw(); lDiskXLStager = new TLine(fPars.diskXLowRateSam, 0, fPars.diskXLowRateSam, 100000); lDiskXLStager->SetLineColor(kRed); lDiskXLStager->Draw(); cDisk->cd(3); hEnstDiskRateRoot->Draw(); lDiskLRoot = new TLine(fPars.diskLowRateSam, 0, fPars.diskLowRateSam, 100000); lDiskLRoot->SetLineColor(kYellow); lDiskLRoot->Draw(); lDiskXLRoot = new TLine(fPars.diskXLowRateSam, 0, fPars.diskXLowRateSam, 100000); lDiskXLRoot->SetLineColor(kRed); lDiskXLRoot->Draw(); psFile = fHtmlDirectory + "/DiskRates.eps"; cDisk->Print(psFile); gifFile = fHtmlDirectory + "/DiskRates.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cDisk->Print(gifFile); } // drive if(drive_status_sam_day==0) hEnstDriveRateSam->SetFillColor(kGreen); if(drive_status_sam_day==1) hEnstDriveRateSam->SetFillColor(kYellow); if(drive_status_sam_day==2) hEnstDriveRateSam->SetFillColor(kRed); if(drive_status_stager_day==0) hEnstDriveRateStager->SetFillColor(kGreen); if(drive_status_stager_day==1) hEnstDriveRateStager->SetFillColor(kYellow); if(drive_status_stager_day==2) hEnstDriveRateStager->SetFillColor(kRed); if(drive_status_root_day==0) hEnstDriveRateRoot->SetFillColor(kGreen); if(drive_status_root_day==1) hEnstDriveRateRoot->SetFillColor(kYellow); if(drive_status_root_day==2) hEnstDriveRateRoot->SetFillColor(kRed); TCanvas * cDrive = new TCanvas("cDrive"); cDrive->Divide(1,3); cDrive->cd(1); hEnstDriveRateSam->Draw(); lDriveLSam = new TLine(fPars.driveLowRateSam, 0, fPars.driveLowRateSam, 100000); lDriveLSam->SetLineColor(kYellow); lDriveLSam->Draw(); lDriveXLSam = new TLine(fPars.driveXLowRateSam, 0, fPars.driveXLowRateSam, 100000); lDriveXLSam->SetLineColor(kRed); lDriveXLSam->Draw(); cDrive->cd(2); hEnstDriveRateStager->Draw(); lDriveLStager = new TLine(fPars.driveLowRateSam, 0, fPars.driveLowRateSam, 100000); lDriveLStager->SetLineColor(kYellow); lDriveLStager->Draw(); lDriveXLStager = new TLine(fPars.driveXLowRateSam, 0, fPars.driveXLowRateSam, 100000); lDriveXLStager->SetLineColor(kRed); lDriveXLStager->Draw(); cDrive->cd(3); hEnstDriveRateRoot->Draw(); lDriveLRoot = new TLine(fPars.driveLowRateSam, 0, fPars.driveLowRateSam, 100000); lDriveLRoot->SetLineColor(kYellow); lDriveLRoot->Draw(); lDriveXLRoot = new TLine(fPars.driveXLowRateSam, 0, fPars.driveXLowRateSam, 100000); lDriveXLRoot->SetLineColor(kRed); lDriveXLRoot->Draw(); psFile = fHtmlDirectory + "/DriveRates.eps"; cDrive->Print(psFile); gifFile = fHtmlDirectory + "/DriveRates.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cDrive->Print(gifFile); } // overall if(overall_status_sam_day==0) hEnstOverallRateSam->SetFillColor(kGreen); if(overall_status_sam_day==1) hEnstOverallRateSam->SetFillColor(kYellow); if(overall_status_sam_day==2) hEnstOverallRateSam->SetFillColor(kRed); if(overall_status_stager_day==0) hEnstOverallRateStager->SetFillColor(kGreen); if(overall_status_stager_day==1) hEnstOverallRateStager->SetFillColor(kYellow); if(overall_status_stager_day==2) hEnstOverallRateStager->SetFillColor(kRed); if(overall_status_root_day==0) hEnstOverallRateRoot->SetFillColor(kGreen); if(overall_status_root_day==1) hEnstOverallRateRoot->SetFillColor(kYellow); if(overall_status_root_day==2) hEnstOverallRateRoot->SetFillColor(kRed); TCanvas * cOverall = new TCanvas("cOverall"); cOverall->Divide(1,3); cOverall->cd(1); hEnstOverallRateSam->Draw(); lOverLSam = new TLine(fPars.overallLowRateSam, 0, fPars.overallLowRateSam, 100000); lOverLSam->SetLineColor(kYellow); lOverLSam->Draw(); lOverXLSam = new TLine(fPars.overallXLowRateSam, 0, fPars.overallXLowRateSam, 100000); lOverXLSam->SetLineColor(kRed); lOverXLSam->Draw(); cOverall->cd(2); hEnstOverallRateStager->Draw(); lOverLStager = new TLine(fPars.overallLowRateSam, 0, fPars.overallLowRateSam, 100000); lOverLStager->SetLineColor(kYellow); lOverLStager->Draw(); lOverXLStager = new TLine(fPars.overallXLowRateSam, 0, fPars.overallXLowRateSam, 100000); lOverXLStager->SetLineColor(kRed); lOverXLStager->Draw(); cOverall->cd(3); hEnstOverallRateRoot->Draw(); lOverLRoot = new TLine(fPars.overallLowRateSam, 0, fPars.overallLowRateSam, 100000); lOverLRoot->SetLineColor(kYellow); lOverLRoot->Draw(); lOverXLRoot = new TLine(fPars.overallXLowRateSam, 0, fPars.overallXLowRateSam, 100000); lOverXLRoot->SetLineColor(kRed); lOverXLRoot->Draw(); psFile = fHtmlDirectory + "/OverallRates.eps"; cOverall->Print(psFile); gifFile = fHtmlDirectory + "/OverallRates.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cOverall->Print(gifFile); } // rates vs time (day) hEnstNetRateDaySam->SetMarkerStyle(20); hEnstNetRateDayStager->SetMarkerStyle(20); hEnstNetRateDayRoot->SetMarkerStyle(20); hEnstTranRateDaySam->SetMarkerStyle(20); hEnstTranRateDayStager->SetMarkerStyle(20); hEnstTranRateDayRoot->SetMarkerStyle(20); hEnstDiskRateDaySam->SetMarkerStyle(20); hEnstDiskRateDayStager->SetMarkerStyle(20); hEnstDiskRateDayRoot->SetMarkerStyle(20); hEnstDriveRateDaySam->SetMarkerStyle(20); hEnstDriveRateDayStager->SetMarkerStyle(20); hEnstDriveRateDayRoot->SetMarkerStyle(20); hEnstOverallRateDaySam->SetMarkerStyle(20); hEnstOverallRateDayStager->SetMarkerStyle(20); hEnstOverallRateDayRoot->SetMarkerStyle(20); hEnstNetRateDaySam->SetStats(false); hEnstNetRateDayStager->SetStats(false); hEnstNetRateDayRoot->SetStats(false); hEnstTranRateDaySam->SetStats(false); hEnstTranRateDayStager->SetStats(false); hEnstTranRateDayRoot->SetStats(false); hEnstDiskRateDaySam->SetStats(false); hEnstDiskRateDayStager->SetStats(false); hEnstDiskRateDayRoot->SetStats(false); hEnstDriveRateDaySam->SetStats(false); hEnstDriveRateDayStager->SetStats(false); hEnstDriveRateDayRoot->SetStats(false); hEnstOverallRateDaySam->SetStats(false); hEnstOverallRateDayStager->SetStats(false); hEnstOverallRateDayRoot->SetStats(false); if(netw_status_sam_day==0) hEnstNetRateDaySam->SetMarkerColor(kGreen); if(netw_status_sam_day==1) hEnstNetRateDaySam->SetMarkerColor(kYellow); if(netw_status_sam_day==2) hEnstNetRateDaySam->SetMarkerColor(kRed); if(netw_status_stager_day==0) hEnstNetRateDayStager->SetMarkerColor(kGreen); if(netw_status_stager_day==1) hEnstNetRateDayStager->SetMarkerColor(kYellow); if(netw_status_stager_day==2) hEnstNetRateDayStager->SetMarkerColor(kRed); if(netw_status_root_day==0) hEnstNetRateDayRoot->SetMarkerColor(kGreen); if(netw_status_root_day==1) hEnstNetRateDayRoot->SetMarkerColor(kYellow); if(netw_status_root_day==2) hEnstNetRateDayRoot->SetMarkerColor(kRed); hEnstNetRateDaySam->GetXaxis()->SetTitle("Hours"); hEnstNetRateDayStager->GetXaxis()->SetTitle("Hours"); hEnstNetRateDayRoot->GetXaxis()->SetTitle("Hours"); if(transf_status_sam_day==0) hEnstTranRateDaySam->SetMarkerColor(kGreen); if(transf_status_sam_day==1) hEnstTranRateDaySam->SetMarkerColor(kYellow); if(transf_status_sam_day==2) hEnstTranRateDaySam->SetMarkerColor(kRed); if(transf_status_stager_day==0) hEnstTranRateDayStager->SetMarkerColor(kGreen); if(transf_status_stager_day==1) hEnstTranRateDayStager->SetMarkerColor(kYellow); if(transf_status_stager_day==2) hEnstTranRateDayStager->SetMarkerColor(kRed); if(transf_status_root_day==0) hEnstTranRateDayRoot->SetMarkerColor(kGreen); if(transf_status_root_day==1) hEnstTranRateDayRoot->SetMarkerColor(kYellow); if(transf_status_root_day==2) hEnstTranRateDayRoot->SetMarkerColor(kRed); hEnstTranRateDaySam->GetXaxis()->SetTitle("Hours"); hEnstTranRateDayStager->GetXaxis()->SetTitle("Hours"); hEnstTranRateDayRoot->GetXaxis()->SetTitle("Hours"); if(disk_status_sam_day==0) hEnstDiskRateDaySam->SetMarkerColor(kGreen); if(disk_status_sam_day==1) hEnstDiskRateDaySam->SetMarkerColor(kYellow); if(disk_status_sam_day==2) hEnstDiskRateDaySam->SetMarkerColor(kRed); if(disk_status_stager_day==0) hEnstDiskRateDayStager->SetMarkerColor(kGreen); if(disk_status_stager_day==1) hEnstDiskRateDayStager->SetMarkerColor(kYellow); if(disk_status_stager_day==2) hEnstDiskRateDayStager->SetMarkerColor(kRed); if(disk_status_root_day==0) hEnstDiskRateDayRoot->SetMarkerColor(kGreen); if(disk_status_root_day==1) hEnstDiskRateDayRoot->SetMarkerColor(kYellow); if(disk_status_root_day==2) hEnstDiskRateDayRoot->SetMarkerColor(kRed); hEnstDiskRateDaySam->GetXaxis()->SetTitle("Hours"); hEnstDiskRateDayStager->GetXaxis()->SetTitle("Hours"); hEnstDiskRateDayRoot->GetXaxis()->SetTitle("Hours"); if(drive_status_sam_day==0) hEnstDriveRateDaySam->SetMarkerColor(kGreen); if(drive_status_sam_day==1) hEnstDriveRateDaySam->SetMarkerColor(kYellow); if(drive_status_sam_day==2) hEnstDriveRateDaySam->SetMarkerColor(kRed); if(drive_status_stager_day==0) hEnstDriveRateDayStager->SetMarkerColor(kGreen); if(drive_status_stager_day==1) hEnstDriveRateDayStager->SetMarkerColor(kYellow); if(drive_status_stager_day==2) hEnstDriveRateDayStager->SetMarkerColor(kRed); if(drive_status_root_day==0) hEnstDriveRateDayRoot->SetMarkerColor(kGreen); if(drive_status_root_day==1) hEnstDriveRateDayRoot->SetMarkerColor(kYellow); if(drive_status_root_day==2) hEnstDriveRateDayRoot->SetMarkerColor(kRed); hEnstDriveRateDaySam->GetXaxis()->SetTitle("Hours"); hEnstDriveRateDayStager->GetXaxis()->SetTitle("Hours"); hEnstDriveRateDayRoot->GetXaxis()->SetTitle("Hours"); if(overall_status_sam_day==0) hEnstOverallRateDaySam->SetMarkerColor(kGreen); if(overall_status_sam_day==1) hEnstOverallRateDaySam->SetMarkerColor(kYellow); if(overall_status_sam_day==2) hEnstOverallRateDaySam->SetMarkerColor(kRed); if(overall_status_stager_day==0) hEnstOverallRateDayStager->SetMarkerColor(kGreen); if(overall_status_stager_day==1) hEnstOverallRateDayStager->SetMarkerColor(kYellow); if(overall_status_stager_day==2) hEnstOverallRateDayStager->SetMarkerColor(kRed); if(overall_status_root_day==0) hEnstOverallRateDayRoot->SetMarkerColor(kGreen); if(overall_status_root_day==1) hEnstOverallRateDayRoot->SetMarkerColor(kYellow); if(overall_status_root_day==2) hEnstOverallRateDayRoot->SetMarkerColor(kRed); hEnstOverallRateDaySam->GetXaxis()->SetTitle("Hours"); hEnstOverallRateDayStager->GetXaxis()->SetTitle("Hours"); hEnstOverallRateDayRoot->GetXaxis()->SetTitle("Hours"); lpNetLSamD = new TLine(0, fPars.netwLowRateSam, 24, fPars.netwLowRateSam); lpNetLSamD->SetLineColor(kYellow); lpNetXLSamD = new TLine(0, fPars.netwXLowRateSam, 24, fPars.netwXLowRateSam); lpNetXLSamD->SetLineColor(kRed); lpNetLStagerD = new TLine(0, fPars.netwLowRateStager, 24, fPars.netwLowRateStager); lpNetLStagerD->SetLineColor(kYellow); lpNetXLStagerD = new TLine(0, fPars.netwXLowRateStager, 24, fPars.netwXLowRateStager); lpNetXLStagerD->SetLineColor(kRed); lpNetLRootD = new TLine(0, fPars.netwLowRateRoot, 24, fPars.netwLowRateRoot); lpNetLRootD->SetLineColor(kYellow); lpNetXLRootD = new TLine(0, fPars.netwXLowRateRoot, 24, fPars.netwXLowRateRoot); lpNetXLRootD->SetLineColor(kRed); TCanvas * cNetwTD = new TCanvas("cNetwTD"); cNetwTD->Divide(1,3); cNetwTD->cd(1); hEnstNetRateDaySam->Draw(); lpNetLSamD->Draw(); lpNetXLSamD->Draw(); cNetwTD->cd(2); hEnstNetRateDayStager->Draw(); lpNetLStagerD->Draw(); lpNetXLStagerD->Draw(); cNetwTD->cd(3); hEnstNetRateDayRoot->Draw(); lpNetLRootD->Draw(); lpNetXLRootD->Draw(); psFile = fHtmlDirectory + "/NetwRatesDay.eps"; cNetwTD->Print(psFile); gifFile = fHtmlDirectory + "/NetwRatesDay.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cNetwTD->Print(gifFile); } // transfer rates lpTranLSamD = new TLine(0, fPars.transfLowRateSam, 24, fPars.transfLowRateSam); lpTranLSamD->SetLineColor(kYellow); lpTranXLSamD = new TLine(0, fPars.transfXLowRateSam, 24, fPars.transfXLowRateSam); lpTranXLSamD->SetLineColor(kRed); lpTranLStagerD = new TLine(0, fPars.transfLowRateStager, 24, fPars.transfLowRateStager); lpTranLStagerD->SetLineColor(kYellow); lpTranXLStagerD = new TLine(0, fPars.transfXLowRateStager, 24, fPars.transfXLowRateStager); lpTranXLStagerD->SetLineColor(kRed); lpTranLRootD = new TLine(0, fPars.transfLowRateRoot, 24, fPars.transfLowRateRoot); lpTranLRootD->SetLineColor(kYellow); lpTranXLRootD = new TLine(0, fPars.transfXLowRateRoot, 24, fPars.transfXLowRateRoot); lpTranXLRootD->SetLineColor(kRed); TCanvas * cTranTD = new TCanvas("cTranTD"); cTranTD->Divide(1,3); cTranTD->cd(1); hEnstTranRateDaySam->Draw(); lpTranLSamD->Draw(); lpTranXLSamD->Draw(); cTranTD->cd(2); hEnstTranRateDayStager->Draw(); lpTranLStagerD->Draw(); lpTranXLStagerD->Draw(); cTranTD->cd(3); hEnstTranRateDayRoot->Draw(); lpTranLRootD->Draw(); lpTranXLRootD->Draw(); psFile = fHtmlDirectory + "/TransfRatesDay.eps"; cTranTD->Print(psFile); gifFile = fHtmlDirectory + "/TransfRatesDay.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cTranTD->Print(gifFile); } // disk lpDiskLSamD = new TLine(0, fPars.diskLowRateSam, 24, fPars.diskLowRateSam); lpDiskLSamD->SetLineColor(kYellow); lpDiskXLSamD = new TLine(0, fPars.diskXLowRateSam, 24, fPars.diskXLowRateSam); lpDiskXLSamD->SetLineColor(kRed); lpDiskLStagerD = new TLine(0, fPars.diskLowRateStager, 24, fPars.diskLowRateStager); lpDiskLStagerD->SetLineColor(kYellow); lpDiskXLStagerD = new TLine(0, fPars.diskXLowRateStager, 24, fPars.diskXLowRateStager); lpDiskXLStagerD->SetLineColor(kRed); lpDiskLRootD = new TLine(0, fPars.diskLowRateRoot, 24, fPars.diskLowRateRoot); lpDiskLRootD->SetLineColor(kYellow); lpDiskXLRootD = new TLine(0, fPars.diskXLowRateRoot, 24, fPars.diskXLowRateRoot); lpDiskXLRootD->SetLineColor(kRed); TCanvas * cDiskTD = new TCanvas("cDiskTD"); cDiskTD->Divide(1,3); cDiskTD->cd(1); hEnstDiskRateDaySam->Draw(); lpDiskLSamD->Draw(); lpDiskXLSamD->Draw(); cDiskTD->cd(2); hEnstDiskRateDayStager->Draw(); lpDiskLStagerD->Draw(); lpDiskXLStagerD->Draw(); cDiskTD->cd(3); hEnstDiskRateDayRoot->Draw(); lpDiskLRootD->Draw(); lpDiskXLRootD->Draw(); psFile = fHtmlDirectory + "/DiskRatesDay.eps"; cDiskTD->Print(psFile); gifFile = fHtmlDirectory + "/DiskRatesDay.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cDiskTD->Print(gifFile); } // drive lpDriveLSamD = new TLine(0, fPars.driveLowRateSam, 24, fPars.driveLowRateSam); lpDriveLSamD->SetLineColor(kYellow); lpDriveXLSamD = new TLine(0, fPars.driveXLowRateSam, 24, fPars.driveXLowRateSam); lpDriveXLSamD->SetLineColor(kRed); lpDriveLStagerD = new TLine(0, fPars.driveLowRateStager, 24, fPars.driveLowRateStager); lpDriveLStagerD->SetLineColor(kYellow); lpDriveXLStagerD = new TLine(0, fPars.driveXLowRateStager, 24, fPars.driveXLowRateStager); lpDriveXLStagerD->SetLineColor(kRed); lpDriveLRootD = new TLine(0, fPars.driveLowRateRoot, 24, fPars.driveLowRateRoot); lpDriveLRootD->SetLineColor(kYellow); lpDriveXLRootD = new TLine(0, fPars.driveXLowRateRoot, 24, fPars.driveXLowRateRoot); lpDriveXLRootD->SetLineColor(kRed); TCanvas * cDriveTD = new TCanvas("cDriveTD"); cDriveTD->Divide(1,3); cDriveTD->cd(1); hEnstDriveRateDaySam->Draw(); lpDriveLSamD->Draw(); lpDriveXLSamD->Draw(); cDriveTD->cd(2); hEnstDriveRateDayStager->Draw(); lpDriveLStagerD->Draw(); lpDriveXLStagerD->Draw(); cDriveTD->cd(3); hEnstDriveRateDayRoot->Draw(); lpDriveLRootD->Draw(); lpDriveXLRootD->Draw(); psFile = fHtmlDirectory + "/DriveRatesDay.eps"; cDriveTD->Print(psFile); gifFile = fHtmlDirectory + "/DriveRatesDay.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cDriveTD->Print(gifFile); } // overall lpOverLSamD = new TLine(0, fPars.overallLowRateSam, 24, fPars.overallLowRateSam); lpOverLSamD->SetLineColor(kYellow); lpOverXLSamD = new TLine(0, fPars.overallXLowRateSam, 24, fPars.overallXLowRateSam); lpOverXLSamD->SetLineColor(kRed); lpOverLStagerD = new TLine(0, fPars.overallLowRateStager, 24, fPars.overallLowRateStager); lpOverLStagerD->SetLineColor(kYellow); lpOverXLStagerD = new TLine(0, fPars.overallXLowRateStager, 24, fPars.overallXLowRateStager); lpOverXLStagerD->SetLineColor(kRed); lpOverLRootD = new TLine(0, fPars.overallLowRateRoot, 24, fPars.overallLowRateRoot); lpOverLRootD->SetLineColor(kYellow); lpOverXLRootD = new TLine(0, fPars.overallXLowRateRoot, 24, fPars.overallXLowRateRoot); lpOverXLRootD->SetLineColor(kRed); TCanvas * cOverallTD = new TCanvas("cOverallTD"); cOverallTD->Divide(1,3); cOverallTD->cd(1); hEnstOverallRateDaySam->Draw(); lpOverLSamD->Draw(); lpOverXLSamD->Draw(); cOverallTD->cd(2); hEnstOverallRateDayStager->Draw(); lpOverLStagerD->Draw(); lpOverXLStagerD->Draw(); cOverallTD->cd(3); hEnstOverallRateDayRoot->Draw(); lpOverLRootD->Draw(); lpOverXLRootD->Draw(); psFile = fHtmlDirectory + "/OverallRatesDay.eps"; cOverallTD->Print(psFile); gifFile = fHtmlDirectory + "/OverallRatesDay.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cOverallTD->Print(gifFile); } // rates vs time (week) hEnstNetRateWeekSam->SetMarkerStyle(20); hEnstNetRateWeekStager->SetMarkerStyle(20); hEnstNetRateWeekRoot->SetMarkerStyle(20); hEnstTranRateWeekSam->SetMarkerStyle(20); hEnstTranRateWeekStager->SetMarkerStyle(20); hEnstTranRateWeekRoot->SetMarkerStyle(20); hEnstDiskRateWeekSam->SetMarkerStyle(20); hEnstDiskRateWeekStager->SetMarkerStyle(20); hEnstDiskRateWeekRoot->SetMarkerStyle(20); hEnstDriveRateWeekSam->SetMarkerStyle(20); hEnstDriveRateWeekStager->SetMarkerStyle(20); hEnstDriveRateWeekRoot->SetMarkerStyle(20); hEnstOverallRateWeekSam->SetMarkerStyle(20); hEnstOverallRateWeekStager->SetMarkerStyle(20); hEnstOverallRateWeekRoot->SetMarkerStyle(20); hEnstNetRateWeekSam->SetStats(false); hEnstNetRateWeekStager->SetStats(false); hEnstNetRateWeekRoot->SetStats(false); hEnstTranRateWeekSam->SetStats(false); hEnstTranRateWeekStager->SetStats(false); hEnstTranRateWeekRoot->SetStats(false); hEnstDiskRateWeekSam->SetStats(false); hEnstDiskRateWeekStager->SetStats(false); hEnstDiskRateWeekRoot->SetStats(false); hEnstDriveRateWeekSam->SetStats(false); hEnstDriveRateWeekStager->SetStats(false); hEnstDriveRateWeekRoot->SetStats(false); hEnstOverallRateWeekSam->SetStats(false); hEnstOverallRateWeekStager->SetStats(false); hEnstOverallRateWeekRoot->SetStats(false); if(netw_status_sam_week==0) hEnstNetRateWeekSam->SetMarkerColor(kGreen); if(netw_status_sam_week==1) hEnstNetRateWeekSam->SetMarkerColor(kYellow); if(netw_status_sam_week==2) hEnstNetRateWeekSam->SetMarkerColor(kRed); if(netw_status_stager_week==0) hEnstNetRateWeekStager->SetMarkerColor(kGreen); if(netw_status_stager_week==1) hEnstNetRateWeekStager->SetMarkerColor(kYellow); if(netw_status_stager_week==2) hEnstNetRateWeekStager->SetMarkerColor(kRed); if(netw_status_root_week==0) hEnstNetRateWeekRoot->SetMarkerColor(kGreen); if(netw_status_root_week==1) hEnstNetRateWeekRoot->SetMarkerColor(kYellow); if(netw_status_root_week==2) hEnstNetRateWeekRoot->SetMarkerColor(kRed); hEnstNetRateWeekSam->GetXaxis()->SetTitle("Days"); hEnstNetRateWeekStager->GetXaxis()->SetTitle("Days"); hEnstNetRateWeekRoot->GetXaxis()->SetTitle("Days"); if(transf_status_sam_week==0) hEnstTranRateWeekSam->SetMarkerColor(kGreen); if(transf_status_sam_week==1) hEnstTranRateWeekSam->SetMarkerColor(kYellow); if(transf_status_sam_week==2) hEnstTranRateWeekSam->SetMarkerColor(kRed); if(transf_status_stager_week==0) hEnstTranRateWeekStager->SetMarkerColor(kGreen); if(transf_status_stager_week==1) hEnstTranRateWeekStager->SetMarkerColor(kYellow); if(transf_status_stager_week==2) hEnstTranRateWeekStager->SetMarkerColor(kRed); if(transf_status_root_week==0) hEnstTranRateWeekRoot->SetMarkerColor(kGreen); if(transf_status_root_week==1) hEnstTranRateWeekRoot->SetMarkerColor(kYellow); if(transf_status_root_week==2) hEnstTranRateWeekRoot->SetMarkerColor(kRed); hEnstTranRateWeekSam->GetXaxis()->SetTitle("Days"); hEnstTranRateWeekStager->GetXaxis()->SetTitle("Days"); hEnstTranRateWeekRoot->GetXaxis()->SetTitle("Days"); if(disk_status_sam_week==0) hEnstDiskRateWeekSam->SetMarkerColor(kGreen); if(disk_status_sam_week==1) hEnstDiskRateWeekSam->SetMarkerColor(kYellow); if(disk_status_sam_week==2) hEnstDiskRateWeekSam->SetMarkerColor(kRed); if(disk_status_stager_week==0) hEnstDiskRateWeekStager->SetMarkerColor(kGreen); if(disk_status_stager_week==1) hEnstDiskRateWeekStager->SetMarkerColor(kYellow); if(disk_status_stager_week==2) hEnstDiskRateWeekStager->SetMarkerColor(kRed); if(disk_status_root_week==0) hEnstDiskRateWeekRoot->SetMarkerColor(kGreen); if(disk_status_root_week==1) hEnstDiskRateWeekRoot->SetMarkerColor(kYellow); if(disk_status_root_week==2) hEnstDiskRateWeekRoot->SetMarkerColor(kRed); hEnstDiskRateWeekSam->GetXaxis()->SetTitle("Days"); hEnstDiskRateWeekStager->GetXaxis()->SetTitle("Days"); hEnstDiskRateWeekRoot->GetXaxis()->SetTitle("Days"); if(drive_status_sam_week==0) hEnstDriveRateWeekSam->SetMarkerColor(kGreen); if(drive_status_sam_week==1) hEnstDriveRateWeekSam->SetMarkerColor(kYellow); if(drive_status_sam_week==2) hEnstDriveRateWeekSam->SetMarkerColor(kRed); if(drive_status_stager_week==0) hEnstDriveRateWeekStager->SetMarkerColor(kGreen); if(drive_status_stager_week==1) hEnstDriveRateWeekStager->SetMarkerColor(kYellow); if(drive_status_stager_week==2) hEnstDriveRateWeekStager->SetMarkerColor(kRed); if(drive_status_root_week==0) hEnstDriveRateWeekRoot->SetMarkerColor(kGreen); if(drive_status_root_week==1) hEnstDriveRateWeekRoot->SetMarkerColor(kYellow); if(drive_status_root_week==2) hEnstDriveRateWeekRoot->SetMarkerColor(kRed); hEnstDriveRateWeekSam->GetXaxis()->SetTitle("Days"); hEnstDriveRateWeekStager->GetXaxis()->SetTitle("Days"); hEnstDriveRateWeekRoot->GetXaxis()->SetTitle("Days"); if(overall_status_sam_week==0) hEnstOverallRateWeekSam->SetMarkerColor(kGreen); if(overall_status_sam_week==1) hEnstOverallRateWeekSam->SetMarkerColor(kYellow); if(overall_status_sam_week==2) hEnstOverallRateWeekSam->SetMarkerColor(kRed); if(overall_status_stager_week==0) hEnstOverallRateWeekStager->SetMarkerColor(kGreen); if(overall_status_stager_week==1) hEnstOverallRateWeekStager->SetMarkerColor(kYellow); if(overall_status_stager_week==2) hEnstOverallRateWeekStager->SetMarkerColor(kRed); if(overall_status_root_week==0) hEnstOverallRateWeekRoot->SetMarkerColor(kGreen); if(overall_status_root_week==1) hEnstOverallRateWeekRoot->SetMarkerColor(kYellow); if(overall_status_root_week==2) hEnstOverallRateWeekRoot->SetMarkerColor(kRed); hEnstOverallRateWeekSam->GetXaxis()->SetTitle("Days"); hEnstOverallRateWeekStager->GetXaxis()->SetTitle("Days"); hEnstOverallRateWeekRoot->GetXaxis()->SetTitle("Days"); lpNetLSamW = new TLine(0, fPars.netwLowRateSam, 7, fPars.netwLowRateSam); lpNetLSamW->SetLineColor(kYellow); lpNetXLSamW = new TLine(0, fPars.netwXLowRateSam, 7, fPars.netwXLowRateSam); lpNetXLSamW->SetLineColor(kRed); lpNetLStagerW = new TLine(0, fPars.netwLowRateStager, 7, fPars.netwLowRateStager); lpNetLStagerW->SetLineColor(kYellow); lpNetXLStagerW = new TLine(0, fPars.netwXLowRateStager, 7, fPars.netwXLowRateStager); lpNetXLStagerW->SetLineColor(kRed); lpNetLRootW = new TLine(0, fPars.netwLowRateRoot, 7, fPars.netwLowRateRoot); lpNetLRootW->SetLineColor(kYellow); lpNetXLRootW = new TLine(0, fPars.netwXLowRateRoot, 7, fPars.netwXLowRateRoot); lpNetXLRootW->SetLineColor(kRed); TCanvas * cNetwTW = new TCanvas("cNetwTW"); cNetwTW->Divide(1,3); cNetwTW->cd(1); hEnstNetRateWeekSam->Draw(); lpNetLSamW->Draw(); lpNetXLSamW->Draw(); cNetwTW->cd(2); hEnstNetRateWeekStager->Draw(); lpNetLStagerW->Draw(); lpNetXLStagerW->Draw(); cNetwTW->cd(3); hEnstNetRateWeekRoot->Draw(); lpNetLRootW->Draw(); lpNetXLRootW->Draw(); psFile = fHtmlDirectory + "/NetwRatesWeek.eps"; cNetwTW->Print(psFile); gifFile = fHtmlDirectory + "/NetwRatesWeek.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cNetwTW->Print(gifFile); } // transfer rates lpTranLSamW = new TLine(0, fPars.transfLowRateSam, 7, fPars.transfLowRateSam); lpTranLSamW->SetLineColor(kYellow); lpTranXLSamW = new TLine(0, fPars.transfXLowRateSam, 7, fPars.transfXLowRateSam); lpTranXLSamW->SetLineColor(kRed); lpTranLStagerW = new TLine(0, fPars.transfLowRateStager, 7, fPars.transfLowRateStager); lpTranLStagerW->SetLineColor(kYellow); lpTranXLStagerW = new TLine(0, fPars.transfXLowRateStager, 7, fPars.transfXLowRateStager); lpTranXLStagerW->SetLineColor(kRed); lpTranLRootW = new TLine(0, fPars.transfLowRateRoot, 7, fPars.transfLowRateRoot); lpTranLRootW->SetLineColor(kYellow); lpTranXLRootW = new TLine(0, fPars.transfXLowRateRoot, 7, fPars.transfXLowRateRoot); lpTranXLRootW->SetLineColor(kRed); TCanvas * cTranTW = new TCanvas("cTranTW"); cTranTW->Divide(1,3); cTranTW->cd(1); hEnstTranRateWeekSam->Draw(); lpTranLSamW->Draw(); lpTranXLSamW->Draw(); cTranTW->cd(2); hEnstTranRateWeekStager->Draw(); lpTranLStagerW->Draw(); lpTranXLStagerW->Draw(); cTranTW->cd(3); hEnstTranRateWeekRoot->Draw(); lpTranLRootW->Draw(); lpTranXLRootW->Draw(); psFile = fHtmlDirectory + "/TransfRatesWeek.eps"; cTranTW->Print(psFile); gifFile = fHtmlDirectory + "/TransfRatesWeek.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cTranTW->Print(gifFile); } // disk lpDiskLSamW = new TLine(0, fPars.diskLowRateSam, 7, fPars.diskLowRateSam); lpDiskLSamW->SetLineColor(kYellow); lpDiskXLSamW = new TLine(0, fPars.diskXLowRateSam, 7, fPars.diskXLowRateSam); lpDiskXLSamW->SetLineColor(kRed); lpDiskLStagerW = new TLine(0, fPars.diskLowRateStager, 7, fPars.diskLowRateStager); lpDiskLStagerW->SetLineColor(kYellow); lpDiskXLStagerW = new TLine(0, fPars.diskXLowRateStager, 7, fPars.diskXLowRateStager); lpDiskXLStagerW->SetLineColor(kRed); lpDiskLRootW = new TLine(0, fPars.diskLowRateRoot, 7, fPars.diskLowRateRoot); lpDiskLRootW->SetLineColor(kYellow); lpDiskXLRootW = new TLine(0, fPars.diskXLowRateRoot, 7, fPars.diskXLowRateRoot); lpDiskXLRootW->SetLineColor(kRed); TCanvas * cDiskTW = new TCanvas("cDiskTW"); cDiskTW->Divide(1,3); cDiskTW->cd(1); hEnstDiskRateWeekSam->Draw(); lpDiskLSamW->Draw(); lpDiskXLSamW->Draw(); cDiskTW->cd(2); hEnstDiskRateWeekStager->Draw(); lpDiskLStagerW->Draw(); lpDiskXLStagerW->Draw(); cDiskTW->cd(3); hEnstDiskRateWeekRoot->Draw(); lpDiskLRootW->Draw(); lpDiskXLRootW->Draw(); psFile = fHtmlDirectory + "/DiskRatesWeek.eps"; cDiskTW->Print(psFile); gifFile = fHtmlDirectory + "/DiskRatesWeek.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cDiskTW->Print(gifFile); } // drive lpDriveLSamW = new TLine(0, fPars.driveLowRateSam, 7, fPars.driveLowRateSam); lpDriveLSamW->SetLineColor(kYellow); lpDriveXLSamW = new TLine(0, fPars.driveXLowRateSam, 7, fPars.driveXLowRateSam); lpDriveXLSamW->SetLineColor(kRed); lpDriveLStagerW = new TLine(0, fPars.driveLowRateStager, 7, fPars.driveLowRateStager); lpDriveLStagerW->SetLineColor(kYellow); lpDriveXLStagerW = new TLine(0, fPars.driveXLowRateStager, 7, fPars.driveXLowRateStager); lpDriveXLStagerW->SetLineColor(kRed); lpDriveLRootW = new TLine(0, fPars.driveLowRateRoot, 7, fPars.driveLowRateRoot); lpDriveLRootW->SetLineColor(kYellow); lpDriveXLRootW = new TLine(0, fPars.driveXLowRateRoot, 7, fPars.driveXLowRateRoot); lpDriveXLRootW->SetLineColor(kRed); TCanvas * cDriveTW = new TCanvas("cDriveTW"); cDriveTW->Divide(1,3); cDriveTW->cd(1); hEnstDriveRateWeekSam->Draw(); lpDriveLSamW->Draw(); lpDriveXLSamW->Draw(); cDriveTW->cd(2); hEnstDriveRateWeekStager->Draw(); lpDriveLStagerW->Draw(); lpDriveXLStagerW->Draw(); cDriveTW->cd(3); hEnstDriveRateWeekRoot->Draw(); lpDriveLRootW->Draw(); lpDriveXLRootW->Draw(); psFile = fHtmlDirectory + "/DriveRatesWeek.eps"; cDriveTW->Print(psFile); gifFile = fHtmlDirectory + "/DriveRatesWeek.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cDriveTW->Print(gifFile); } // overall lpOverLSamW = new TLine(0, fPars.overallLowRateSam, 7, fPars.overallLowRateSam); lpOverLSamW->SetLineColor(kYellow); lpOverXLSamW = new TLine(0, fPars.overallXLowRateSam, 7, fPars.overallXLowRateSam); lpOverXLSamW->SetLineColor(kRed); lpOverLStagerW = new TLine(0, fPars.overallLowRateStager, 7, fPars.overallLowRateStager); lpOverLStagerW->SetLineColor(kYellow); lpOverXLStagerW = new TLine(0, fPars.overallXLowRateStager, 7, fPars.overallXLowRateStager); lpOverXLStagerW->SetLineColor(kRed); lpOverLRootW = new TLine(0, fPars.overallLowRateRoot, 7, fPars.overallLowRateRoot); lpOverLRootW->SetLineColor(kYellow); lpOverXLRootW = new TLine(0, fPars.overallXLowRateRoot, 7, fPars.overallXLowRateRoot); lpOverXLRootW->SetLineColor(kRed); TCanvas * cOverallTW = new TCanvas("cOverallTW"); cOverallTW->Divide(1,3); cOverallTW->cd(1); hEnstOverallRateWeekSam->Draw(); lpOverLSamW->Draw(); lpOverXLSamW->Draw(); cOverallTW->cd(2); hEnstOverallRateWeekStager->Draw(); lpOverLStagerW->Draw(); lpOverXLStagerW->Draw(); cOverallTW->cd(3); hEnstOverallRateWeekRoot->Draw(); lpOverLRootW->Draw(); lpOverXLRootW->Draw(); psFile = fHtmlDirectory + "/OverallRatesWeek.eps"; cOverallTW->Print(psFile); gifFile = fHtmlDirectory + "/OverallRatesWeek.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cOverallTW->Print(gifFile); } // rates vs time (month) hEnstNetRateMonthSam->SetMarkerStyle(20); hEnstNetRateMonthStager->SetMarkerStyle(20); hEnstNetRateMonthRoot->SetMarkerStyle(20); hEnstTranRateMonthSam->SetMarkerStyle(20); hEnstTranRateMonthStager->SetMarkerStyle(20); hEnstTranRateMonthRoot->SetMarkerStyle(20); hEnstDiskRateMonthSam->SetMarkerStyle(20); hEnstDiskRateMonthStager->SetMarkerStyle(20); hEnstDiskRateMonthRoot->SetMarkerStyle(20); hEnstDriveRateMonthSam->SetMarkerStyle(20); hEnstDriveRateMonthStager->SetMarkerStyle(20); hEnstDriveRateMonthRoot->SetMarkerStyle(20); hEnstOverallRateMonthSam->SetMarkerStyle(20); hEnstOverallRateMonthStager->SetMarkerStyle(20); hEnstOverallRateMonthRoot->SetMarkerStyle(20); hEnstNetRateMonthSam->SetStats(false); hEnstNetRateMonthStager->SetStats(false); hEnstNetRateMonthRoot->SetStats(false); hEnstTranRateMonthSam->SetStats(false); hEnstTranRateMonthStager->SetStats(false); hEnstTranRateMonthRoot->SetStats(false); hEnstDiskRateMonthSam->SetStats(false); hEnstDiskRateMonthStager->SetStats(false); hEnstDiskRateMonthRoot->SetStats(false); hEnstDriveRateMonthSam->SetStats(false); hEnstDriveRateMonthStager->SetStats(false); hEnstDriveRateMonthRoot->SetStats(false); hEnstOverallRateMonthSam->SetStats(false); hEnstOverallRateMonthStager->SetStats(false); hEnstOverallRateMonthRoot->SetStats(false); if(netw_status_sam_month==0) hEnstNetRateMonthSam->SetMarkerColor(kGreen); if(netw_status_sam_month==1) hEnstNetRateMonthSam->SetMarkerColor(kYellow); if(netw_status_sam_month==2) hEnstNetRateMonthSam->SetMarkerColor(kRed); if(netw_status_stager_month==0) hEnstNetRateMonthStager->SetMarkerColor(kGreen); if(netw_status_stager_month==1) hEnstNetRateMonthStager->SetMarkerColor(kYellow); if(netw_status_stager_month==2) hEnstNetRateMonthStager->SetMarkerColor(kRed); if(netw_status_root_month==0) hEnstNetRateMonthRoot->SetMarkerColor(kGreen); if(netw_status_root_month==1) hEnstNetRateMonthRoot->SetMarkerColor(kYellow); if(netw_status_root_month==2) hEnstNetRateMonthRoot->SetMarkerColor(kRed); hEnstNetRateMonthSam->GetXaxis()->SetTitle("Days"); hEnstNetRateMonthStager->GetXaxis()->SetTitle("Days"); hEnstNetRateMonthRoot->GetXaxis()->SetTitle("Days"); if(transf_status_sam_month==0) hEnstTranRateMonthSam->SetMarkerColor(kGreen); if(transf_status_sam_month==1) hEnstTranRateMonthSam->SetMarkerColor(kYellow); if(transf_status_sam_month==2) hEnstTranRateMonthSam->SetMarkerColor(kRed); if(transf_status_stager_month==0) hEnstTranRateMonthStager->SetMarkerColor(kGreen); if(transf_status_stager_month==1) hEnstTranRateMonthStager->SetMarkerColor(kYellow); if(transf_status_stager_month==2) hEnstTranRateMonthStager->SetMarkerColor(kRed); if(transf_status_root_month==0) hEnstTranRateMonthRoot->SetMarkerColor(kGreen); if(transf_status_root_month==1) hEnstTranRateMonthRoot->SetMarkerColor(kYellow); if(transf_status_root_month==2) hEnstTranRateMonthRoot->SetMarkerColor(kRed); hEnstTranRateMonthSam->GetXaxis()->SetTitle("Days"); hEnstTranRateMonthStager->GetXaxis()->SetTitle("Days"); hEnstTranRateMonthRoot->GetXaxis()->SetTitle("Days"); if(disk_status_sam_month==0) hEnstDiskRateMonthSam->SetMarkerColor(kGreen); if(disk_status_sam_month==1) hEnstDiskRateMonthSam->SetMarkerColor(kYellow); if(disk_status_sam_month==2) hEnstDiskRateMonthSam->SetMarkerColor(kRed); if(disk_status_stager_month==0) hEnstDiskRateMonthStager->SetMarkerColor(kGreen); if(disk_status_stager_month==1) hEnstDiskRateMonthStager->SetMarkerColor(kYellow); if(disk_status_stager_month==2) hEnstDiskRateMonthStager->SetMarkerColor(kRed); if(disk_status_root_month==0) hEnstDiskRateMonthRoot->SetMarkerColor(kGreen); if(disk_status_root_month==1) hEnstDiskRateMonthRoot->SetMarkerColor(kYellow); if(disk_status_root_month==2) hEnstDiskRateMonthRoot->SetMarkerColor(kRed); hEnstDiskRateMonthSam->GetXaxis()->SetTitle("Days"); hEnstDiskRateMonthStager->GetXaxis()->SetTitle("Days"); hEnstDiskRateMonthRoot->GetXaxis()->SetTitle("Days"); if(drive_status_sam_month==0) hEnstDriveRateMonthSam->SetMarkerColor(kGreen); if(drive_status_sam_month==1) hEnstDriveRateMonthSam->SetMarkerColor(kYellow); if(drive_status_sam_month==2) hEnstDriveRateMonthSam->SetMarkerColor(kRed); if(drive_status_stager_month==0) hEnstDriveRateMonthStager->SetMarkerColor(kGreen); if(drive_status_stager_month==1) hEnstDriveRateMonthStager->SetMarkerColor(kYellow); if(drive_status_stager_month==2) hEnstDriveRateMonthStager->SetMarkerColor(kRed); if(drive_status_root_month==0) hEnstDriveRateMonthRoot->SetMarkerColor(kGreen); if(drive_status_root_month==1) hEnstDriveRateMonthRoot->SetMarkerColor(kYellow); if(drive_status_root_month==2) hEnstDriveRateMonthRoot->SetMarkerColor(kRed); hEnstDriveRateMonthSam->GetXaxis()->SetTitle("Days"); hEnstDriveRateMonthStager->GetXaxis()->SetTitle("Days"); hEnstDriveRateMonthRoot->GetXaxis()->SetTitle("Days"); if(overall_status_sam_month==0) hEnstOverallRateMonthSam->SetMarkerColor(kGreen); if(overall_status_sam_month==1) hEnstOverallRateMonthSam->SetMarkerColor(kYellow); if(overall_status_sam_month==2) hEnstOverallRateMonthSam->SetMarkerColor(kRed); if(overall_status_stager_month==0) hEnstOverallRateMonthStager->SetMarkerColor(kGreen); if(overall_status_stager_month==1) hEnstOverallRateMonthStager->SetMarkerColor(kYellow); if(overall_status_stager_month==2) hEnstOverallRateMonthStager->SetMarkerColor(kRed); if(overall_status_root_month==0) hEnstOverallRateMonthRoot->SetMarkerColor(kGreen); if(overall_status_root_month==1) hEnstOverallRateMonthRoot->SetMarkerColor(kYellow); if(overall_status_root_month==2) hEnstOverallRateMonthRoot->SetMarkerColor(kRed); hEnstOverallRateMonthSam->GetXaxis()->SetTitle("Days"); hEnstOverallRateMonthStager->GetXaxis()->SetTitle("Days"); hEnstOverallRateMonthRoot->GetXaxis()->SetTitle("Days"); lpNetLSamM = new TLine(0, fPars.netwLowRateSam, 31, fPars.netwLowRateSam); lpNetLSamM->SetLineColor(kYellow); lpNetXLSamM = new TLine(0, fPars.netwXLowRateSam, 31, fPars.netwXLowRateSam); lpNetXLSamM->SetLineColor(kRed); lpNetLStagerM = new TLine(0, fPars.netwLowRateStager, 31, fPars.netwLowRateStager); lpNetLStagerM->SetLineColor(kYellow); lpNetXLStagerM = new TLine(0, fPars.netwXLowRateStager, 31, fPars.netwXLowRateStager); lpNetXLStagerM->SetLineColor(kRed); lpNetLRootM = new TLine(0, fPars.netwLowRateRoot, 31, fPars.netwLowRateRoot); lpNetLRootM->SetLineColor(kYellow); lpNetXLRootM = new TLine(0, fPars.netwXLowRateRoot, 31, fPars.netwXLowRateRoot); lpNetXLRootM->SetLineColor(kRed); TCanvas * cNetwTM = new TCanvas("cNetwTM"); cNetwTM->Divide(1,3); cNetwTM->cd(1); hEnstNetRateMonthSam->Draw(); lpNetLSamM->Draw(); lpNetXLSamM->Draw(); cNetwTM->cd(2); hEnstNetRateMonthStager->Draw(); lpNetLStagerM->Draw(); lpNetXLStagerM->Draw(); cNetwTM->cd(3); hEnstNetRateMonthRoot->Draw(); lpNetLRootM->Draw(); lpNetXLRootM->Draw(); psFile = fHtmlDirectory + "/NetwRatesMonth.eps"; cNetwTM->Print(psFile); gifFile = fHtmlDirectory + "/NetwRatesMonth.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cNetwTM->Print(gifFile); } // transfer rates lpTranLSamM = new TLine(0, fPars.transfLowRateSam, 31, fPars.transfLowRateSam); lpTranLSamM->SetLineColor(kYellow); lpTranXLSamM = new TLine(0, fPars.transfXLowRateSam, 31, fPars.transfXLowRateSam); lpTranXLSamM->SetLineColor(kRed); lpTranLStagerM = new TLine(0, fPars.transfLowRateStager, 31, fPars.transfLowRateStager); lpTranLStagerM->SetLineColor(kYellow); lpTranXLStagerM = new TLine(0, fPars.transfXLowRateStager, 31, fPars.transfXLowRateStager); lpTranXLStagerM->SetLineColor(kRed); lpTranLRootM = new TLine(0, fPars.transfLowRateRoot, 31, fPars.transfLowRateRoot); lpTranLRootM->SetLineColor(kYellow); lpTranXLRootM = new TLine(0, fPars.transfXLowRateRoot, 31, fPars.transfXLowRateRoot); lpTranXLRootM->SetLineColor(kRed); TCanvas * cTranTM = new TCanvas("cTranTM"); cTranTM->Divide(1,3); cTranTM->cd(1); hEnstTranRateMonthSam->Draw(); lpTranLSamM->Draw(); lpTranXLSamM->Draw(); cTranTM->cd(2); hEnstTranRateMonthStager->Draw(); lpTranLStagerM->Draw(); lpTranXLStagerM->Draw(); cTranTM->cd(3); hEnstTranRateMonthRoot->Draw(); lpTranLRootM->Draw(); lpTranXLRootM->Draw(); psFile = fHtmlDirectory + "/TransfRatesMonth.eps"; cTranTM->Print(psFile); gifFile = fHtmlDirectory + "/TransfRatesMonth.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cTranTM->Print(gifFile); } // disk lpDiskLSamM = new TLine(0, fPars.diskLowRateSam, 31, fPars.diskLowRateSam); lpDiskLSamM->SetLineColor(kYellow); lpDiskXLSamM = new TLine(0, fPars.diskXLowRateSam, 31, fPars.diskXLowRateSam); lpDiskXLSamM->SetLineColor(kRed); lpDiskLStagerM = new TLine(0, fPars.diskLowRateStager, 31, fPars.diskLowRateStager); lpDiskLStagerM->SetLineColor(kYellow); lpDiskXLStagerM = new TLine(0, fPars.diskXLowRateStager, 31, fPars.diskXLowRateStager); lpDiskXLStagerM->SetLineColor(kRed); lpDiskLRootM = new TLine(0, fPars.diskLowRateRoot, 31, fPars.diskLowRateRoot); lpDiskLRootM->SetLineColor(kYellow); lpDiskXLRootM = new TLine(0, fPars.diskXLowRateRoot, 31, fPars.diskXLowRateRoot); lpDiskXLRootM->SetLineColor(kRed); TCanvas * cDiskTM = new TCanvas("cDiskTM"); cDiskTM->Divide(1,3); cDiskTM->cd(1); hEnstDiskRateMonthSam->Draw(); lpDiskLSamM->Draw(); lpDiskXLSamM->Draw(); cDiskTM->cd(2); hEnstDiskRateMonthStager->Draw(); lpDiskLStagerM->Draw(); lpDiskXLStagerM->Draw(); cDiskTM->cd(3); hEnstDiskRateMonthRoot->Draw(); lpDiskLRootM->Draw(); lpDiskXLRootM->Draw(); psFile = fHtmlDirectory + "/DiskRatesMonth.eps"; cDiskTM->Print(psFile); gifFile = fHtmlDirectory + "/DiskRatesMonth.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cDiskTM->Print(gifFile); } // drive lpDriveLSamM = new TLine(0, fPars.driveLowRateSam, 31, fPars.driveLowRateSam); lpDriveLSamM->SetLineColor(kYellow); lpDriveXLSamM = new TLine(0, fPars.driveXLowRateSam, 31, fPars.driveXLowRateSam); lpDriveXLSamM->SetLineColor(kRed); lpDriveLStagerM = new TLine(0, fPars.driveLowRateStager, 31, fPars.driveLowRateStager); lpDriveLStagerM->SetLineColor(kYellow); lpDriveXLStagerM = new TLine(0, fPars.driveXLowRateStager, 31, fPars.driveXLowRateStager); lpDriveXLStagerM->SetLineColor(kRed); lpDriveLRootM = new TLine(0, fPars.driveLowRateRoot, 31, fPars.driveLowRateRoot); lpDriveLRootM->SetLineColor(kYellow); lpDriveXLRootM = new TLine(0, fPars.driveXLowRateRoot, 31, fPars.driveXLowRateRoot); lpDriveXLRootM->SetLineColor(kRed); TCanvas * cDriveTM = new TCanvas("cDriveTM"); cDriveTM->Divide(1,3); cDriveTM->cd(1); hEnstDriveRateMonthSam->Draw(); lpDriveLSamM->Draw(); lpDriveXLSamM->Draw(); cDriveTM->cd(2); hEnstDriveRateMonthStager->Draw(); lpDriveLStagerM->Draw(); lpDriveXLStagerM->Draw(); cDriveTM->cd(3); hEnstDriveRateMonthRoot->Draw(); lpDriveLRootM->Draw(); lpDriveXLRootM->Draw(); psFile = fHtmlDirectory + "/DriveRatesMonth.eps"; cDriveTM->Print(psFile); gifFile = fHtmlDirectory + "/DriveRatesMonth.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cDriveTM->Print(gifFile); } // overall lpOverLSamM = new TLine(0, fPars.overallLowRateSam, 31, fPars.overallLowRateSam); lpOverLSamM->SetLineColor(kYellow); lpOverXLSamM = new TLine(0, fPars.overallXLowRateSam, 31, fPars.overallXLowRateSam); lpOverXLSamM->SetLineColor(kRed); lpOverLStagerM = new TLine(0, fPars.overallLowRateStager, 31, fPars.overallLowRateStager); lpOverLStagerM->SetLineColor(kYellow); lpOverXLStagerM = new TLine(0, fPars.overallXLowRateStager, 31, fPars.overallXLowRateStager); lpOverXLStagerM->SetLineColor(kRed); lpOverLRootM = new TLine(0, fPars.overallLowRateRoot, 31, fPars.overallLowRateRoot); lpOverLRootM->SetLineColor(kYellow); lpOverXLRootM = new TLine(0, fPars.overallXLowRateRoot, 31, fPars.overallXLowRateRoot); lpOverXLRootM->SetLineColor(kRed); TCanvas * cOverallTM = new TCanvas("cOverallTM"); cOverallTM->Divide(1,3); cOverallTM->cd(1); hEnstOverallRateMonthSam->Draw(); lpOverLSamM->Draw(); lpOverXLSamM->Draw(); cOverallTM->cd(2); hEnstOverallRateMonthStager->Draw(); lpOverLStagerM->Draw(); lpOverXLStagerM->Draw(); cOverallTM->cd(3); hEnstOverallRateMonthRoot->Draw(); lpOverLRootM->Draw(); lpOverXLRootM->Draw(); psFile = fHtmlDirectory + "/OverallRatesMonth.eps"; cOverallTM->Print(psFile); gifFile = fHtmlDirectory + "/OverallRatesMonth.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cOverallTM->Print(gifFile); } return 0; } //_____________________________________________________________________________ int TEnstoreMonitor::MakeHtml(const char* HtmlFile) { // input file is always a raw data file... printf(" inside TEnstoreMonitor::MakeHtml()\n"); // AC char * wwwBase={"http://www-cdf.fnal.gov/offline/monitoring/"}; TDatime time; time = fStatus.time; FILE* page; // first we fill the individual status gif's const char* mon_dir = gSystem->Getenv("OFFLINE_MON_DIR"); TString inFile, outFile; TString psFile, gifFile; char command[400]; char cFileName[200]; TCanvas * ctime = new TCanvas("ctime","ctime",250,80); TPaveText * ptime = new TPaveText(0.,0.,1.,1.); char timeLabel[100]; sprintf(timeLabel, "%s", time.AsString()); TText *txt = ptime->AddText(timeLabel); if(fStatus.global==0) txt->SetTextColor(kGreen); if(fStatus.global==1) txt->SetTextColor(kYellow); if(fStatus.global==2) txt->SetTextColor(kRed); ptime->Draw(); psFile = fHtmlDirectory + "/Time.eps"; gifFile = fHtmlDirectory + "/Time.gif"; ctime->Print(psFile); sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); // global status if(fStatus.global==0) inFile = TString(mon_dir) + "/greenball.gif"; if(fStatus.global==1) inFile = TString(mon_dir) + "/yelball.gif"; if(fStatus.global==2) inFile = TString(mon_dir) + "/redball.gif"; outFile = fHtmlDirectory + "/Status.gif"; gSystem->CopyFile(inFile.Data(), outFile.Data(), kTRUE); // network rates status if(fStatus.netw==0) inFile = TString(mon_dir) + "/greenball.gif"; if(fStatus.netw==1) inFile = TString(mon_dir) + "/yelball.gif"; if(fStatus.netw==2) inFile = TString(mon_dir) + "/redball.gif"; outFile = fHtmlDirectory + "/NetwStatus.gif"; gSystem->CopyFile(inFile.Data(), outFile.Data(), kTRUE); // transfer rates status if(fStatus.transf==0) inFile = TString(mon_dir) + "/greenball.gif"; if(fStatus.transf==1) inFile = TString(mon_dir) + "/yelball.gif"; if(fStatus.transf==2) inFile = TString(mon_dir) + "/redball.gif"; outFile = fHtmlDirectory + "/TransfStatus.gif"; gSystem->CopyFile(inFile.Data(), outFile.Data(), kTRUE); // drive rates status if(fStatus.drive==0) inFile = TString(mon_dir) + "/greenball.gif"; if(fStatus.drive==1) inFile = TString(mon_dir) + "/yelball.gif"; if(fStatus.drive==2) inFile = TString(mon_dir) + "/redball.gif"; outFile = fHtmlDirectory + "/DriveStatus.gif"; gSystem->CopyFile(inFile.Data(), outFile.Data(), kTRUE); // disk rates status if(fStatus.disk==0) inFile = TString(mon_dir) + "/greenball.gif"; if(fStatus.disk==1) inFile = TString(mon_dir) + "/yelball.gif"; if(fStatus.disk==2) inFile = TString(mon_dir) + "/redball.gif"; outFile = fHtmlDirectory + "/DiskStatus.gif"; gSystem->CopyFile(inFile.Data(), outFile.Data(), kTRUE); // overall rates status if(fStatus.overall==0) inFile = TString(mon_dir) + "/greenball.gif"; if(fStatus.overall==1) inFile = TString(mon_dir) + "/yelball.gif"; if(fStatus.overall==2) inFile = TString(mon_dir) + "/redball.gif"; outFile = fHtmlDirectory + "/OverallStatus.gif"; gSystem->CopyFile(inFile.Data(), outFile.Data(), kTRUE); // movers status if(fStatus.movers==0) inFile = TString(mon_dir) + "/greenball.gif"; if(fStatus.movers==1) inFile = TString(mon_dir) + "/yelball.gif"; if(fStatus.movers==2) inFile = TString(mon_dir) + "/redball.gif"; outFile = fHtmlDirectory + "/MoversStatus.gif"; gSystem->CopyFile(inFile.Data(), outFile.Data(), kTRUE); TString htmlFile; // first we fill each single page // movers status htmlFile = fHtmlDirectory + "/MoverStatus.html"; page = fopen(htmlFile,"w"); fprintf(page,"\n"); fprintf(page,"\n", wwwBase); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
Enstore monitorMover status Help
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); if(fStatus.movers==0) fprintf(page,"\n"); if(fStatus.movers==1) fprintf(page,"\n"); if(fStatus.movers==2) fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
 
greenball.gif Mover Statusyelball.gif Mover Statusredball.gif Mover Status
 
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
\n"); fprintf(page," Fig. 1: Mover status - Last 24 hours - ((gif), (eps)) \n"); fprintf(page,"\n"); fprintf(page,"Mover\n"); fprintf(page,"
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"

Additional plots

Fig. 2: Mover status - Last 7 days (top) - Last 31 days (bottom) - ((gif), (eps)) \n"); fprintf(page,"
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
redball.gif Bad statusyelball.gif Abnormal statusgreenball.gif Normal status
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"

\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n", time.AsSQLString()); fprintf(page,"
Legal Notices
Brought To You By: Enstore Monitoring
Last updated: %s
\n"); fprintf(page,"\n"); fclose(page); // movers popup htmlFile = fHtmlDirectory + "/MoverPop.html"; page = fopen(htmlFile,"w"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"Movers status\n"); fprintf(page,"

\n"); fprintf(page,"The status of the Movers depends on how many dead or idle drivers are present in the last 24 hours.\n"); fprintf(page,"\n"); fprintf(page,"Since there are (at present) 21 drivers, if more than 3 are dead the situation is flagged as 'bad' (red ball). If 1 or 2 are dead the situation is flagged 'abnormal' (yellow ball). If no dead drivers are present the situation is flagged as 'normal' (green ball)\n"); fprintf(page,"

\n"); fclose(page); // delete page; // network rates htmlFile = fHtmlDirectory + "/NetwRates.html"; page = fopen(htmlFile,"w"); fprintf(page,"\n"); fprintf(page,"\n", wwwBase); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
Enstore monitorNetwork rate Help
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); if(fStatus.netw==0) fprintf(page,"\n"); if(fStatus.netw==1) fprintf(page,"\n"); if(fStatus.netw==2) fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
 
greenball.gif Network Rate Monitoryelball.gif Network Rate Monitorredball.gif Network Rate Monitor
 
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"

rates in MB/s
(top) sam; (middle) stager; (bottom) root.

\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
\n"); fprintf(page," Fig. 1: Rates - Last 24 hours -.((gif), (eps)) \n"); fprintf(page,"\n"); fprintf(page,"Network\n"); fprintf(page,"
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page," \n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"

Additional plots

Fig. 2: Rates vs Time (LAST 24 hours).((gif), (eps)) \n"); fprintf(page,"
\n"); fprintf(page," Fig. 3: Rates vs Time(LAST 7 DAYS).((gif), (eps)) \n"); fprintf(page,"
\n"); fprintf(page," Fig. 4: Rates vs Time (LAST 31 days).((gif), (eps)) \n"); fprintf(page,"
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
 

\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
redball.gif Rates extremely lowyelball.gif Rates lowgreenball.gif rates are OK
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"

\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n", time.AsSQLString()); fprintf(page,"
Legal Notices
Brought To You By: Enstore Monitoring
Last updated: %s
\n"); fprintf(page,"\n"); fclose(page); // network popup htmlFile = fHtmlDirectory + "/NetPop.html"; page = fopen(htmlFile,"w"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"Network rates\n"); fprintf(page,"

\n"); fprintf(page,"The status of the Network rates depends on how many occurences of low/extra low rates happened in the last 24 hours.\n"); fprintf(page,"\n"); fprintf(page,"If for more than a fixed fraction of entries the rates happen to be extra low, the situation is flagged as 'bad' (red ball). If for such a fraction the rates happen to be low, the situation is flagged 'abnormal' (yellow ball). If the rates are good for a good fraction of the times, the situation is flagged as 'normal' (green ball)\n"); fprintf(page,"

\n"); fclose(page); // delete page; // // transfer rates htmlFile = fHtmlDirectory + "/TransfRates.html"; page = fopen(htmlFile,"w"); fprintf(page,"\n"); fprintf(page,"\n", wwwBase); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
Enstore monitorTransfer rate Help
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); if(fStatus.transf==0) fprintf(page,"\n"); if(fStatus.transf==1) fprintf(page,"\n"); if(fStatus.transf==2) fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
 
greenball.gif Transfer Rate Monitoryelball.gif Transfer Rate Monitorredball.gif Transfer Rate Monitor
 
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"

rates in MB/s
(top) sam; (middle) stager; (bottom) root.

\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
\n"); fprintf(page," Fig. 1: Rates - Last 24 hours -.((gif), (eps)) \n"); fprintf(page,"\n"); fprintf(page,"Transfer\n"); fprintf(page,"
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page," \n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"

Additional plots

Fig. 2: Rates vs Time (LAST 24 hours).((gif), (eps)) \n"); fprintf(page,"
\n"); fprintf(page," Fig. 3: Rates vs Time(LAST 7 DAYS).((gif), (eps)) \n"); fprintf(page,"
\n"); fprintf(page," Fig. 4: Rates vs Time (LAST 31 days).((gif), (eps)) \n"); fprintf(page,"
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
 

\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
redball.gif Rates extremely lowyelball.gif Rates lowgreenball.gif rates are OK
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"

\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n", time.AsSQLString()); fprintf(page,"
Legal Notices
Brought To You By: Enstore Monitoring
Last updated: %s
\n"); fprintf(page,"\n"); fclose(page); // transfer popup htmlFile = fHtmlDirectory + "/TranPop.html"; page = fopen(htmlFile,"w"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"Transfer rates\n"); fprintf(page,"

\n"); fprintf(page,"The status of the Transfer rates depends on how many occurences of low/extra low rates happened in the last 24 hours.\n"); fprintf(page,"\n"); fprintf(page,"If for more than a fixed fraction of entries the rates happen to be extra low, the situation is flagged as 'bad' (red ball). If for such a fraction the rates happen to be low, the situation is flagged 'abnormal' (yellow ball). If the rates are good for a good fraction of the times, the situation is flagged as 'normal' (green ball)\n"); fprintf(page,"

\n"); fclose(page); // delete page; // drive rates htmlFile = fHtmlDirectory + "/DriveRates.html"; page = fopen(htmlFile,"w"); fprintf(page,"\n"); fprintf(page,"\n", wwwBase); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
Enstore monitorDrive rate Help
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); if(fStatus.drive==0) fprintf(page,"\n"); if(fStatus.drive==1) fprintf(page,"\n"); if(fStatus.drive==2) fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
 
greenball.gif Drive Rate Monitoryelball.gif Drive Rate Monitorredball.gif Drive Rate Monitor
 
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"

rates in (MB/s); time in min.
(top) sam; (middle) stager; (bottom) root.

\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
\n"); fprintf(page," Fig. 1: Rates - Last 24 hours -.((gif), (eps)) \n"); fprintf(page,"\n"); fprintf(page,"Drive\n"); fprintf(page,"
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page," \n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"

Additional plots

Fig. 2: Rates vs Time (LAST 24 hours).((gif), (eps)) \n"); fprintf(page,"
\n"); fprintf(page," Fig. 3: Rates vs Time(LAST 7 DAYS).((gif), (eps)) \n"); fprintf(page,"
\n"); fprintf(page," Fig. 4: Rates vs Time (LAST 31 days).((gif), (eps)) \n"); fprintf(page,"
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
 

\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
redball.gif Rates extremely lowyelball.gif Rates lowgreenball.gif rates are OK
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"

\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n", time.AsSQLString()); fprintf(page,"
Legal Notices
Brought To You By: Enstore Monitoring
Last updated: %s
\n"); fprintf(page,"\n"); fclose(page); // drive popup htmlFile = fHtmlDirectory + "/DrivePop.html"; page = fopen(htmlFile,"w"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"Driver rates\n"); fprintf(page,"

\n"); fprintf(page,"The status of the Driver rates depends on how many occurences of low/extra low rates happened in the last 24 hours.\n"); fprintf(page,"\n"); fprintf(page,"If for more than a fixed fraction of entries the rates happen to be extra low, the situation is flagged as 'bad' (red ball). If for such a fraction the rates happen to be low, the situation is flagged 'abnormal' (yellow ball). If the rates are good for a good fraction of the times, the situation is flagged as 'normal' (green ball)\n"); fprintf(page,"

\n"); fclose(page); // delete page; // disk rates htmlFile = fHtmlDirectory + "/DiskRates.html"; page = fopen(htmlFile,"w"); fprintf(page,"\n"); fprintf(page,"\n", wwwBase); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
Enstore monitorDisk rate Help
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); if(fStatus.disk==0) fprintf(page,"\n"); if(fStatus.disk==1) fprintf(page,"\n"); if(fStatus.disk==2) fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
 
greenball.gif Disk Rate Monitoryelball.gif Disk Rate Monitorredball.gif Disk Rate Monitor
 
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"

rates in (MB/s); time in min.
(top) sam; (middle) stager; (bottom) root.

\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
\n"); fprintf(page," Fig. 1: Rates - Last 24 hours -.((gif), (eps)) \n"); fprintf(page,"\n"); fprintf(page,"Disk\n"); fprintf(page,"
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page," \n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"

Additional plots

Fig. 2: Rates vs Time (LAST 24 hours).((gif), (eps)) \n"); fprintf(page,"
\n"); fprintf(page," Fig. 3: Rates vs Time(LAST 7 DAYS).((gif), (eps)) \n"); fprintf(page,"
\n"); fprintf(page," Fig. 4: Rates vs Time (LAST 31 days).((gif), (eps)) \n"); fprintf(page,"
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
 

\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
redball.gif Rates extremely lowyelball.gif Rates lowgreenball.gif rates are OK
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"

\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n", time.AsSQLString()); fprintf(page,"
Legal Notices
Brought To You By: Enstore Monitoring
Last updated: %s
\n"); fprintf(page,"\n"); fclose(page); // disk popup htmlFile = fHtmlDirectory + "/DiskPop.html"; page = fopen(htmlFile,"w"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"Disk rates\n"); fprintf(page,"

\n"); fprintf(page,"The status of the Disk rates depends on how many occurences of low/extra low rates happened in the last 24 hours.\n"); fprintf(page,"\n"); fprintf(page,"If for more than a fixed fraction of entries the rates happen to be extra low, the situation is flagged as 'bad' (red ball). If for such a fraction the rates happen to be low, the situation is flagged 'abnormal' (yellow ball). If the rates are good for a good fraction of the times, the situation is flagged as 'normal' (green ball)\n"); fprintf(page,"

\n"); fclose(page); // delete page; // overall rates htmlFile = fHtmlDirectory + "/OverallRates.html"; page = fopen(htmlFile,"w"); fprintf(page,"\n"); fprintf(page,"\n", wwwBase); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
Enstore monitorOverall rate Help
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); if(fStatus.overall==0) fprintf(page,"\n"); if(fStatus.overall==1) fprintf(page,"\n"); if(fStatus.overall==2) fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
 
greenball.gif Overall Rate Monitoryelball.gif Overall Rate Monitorredball.gif Overall Rate Monitor
 
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"

rates in (MB/s); time in min.
(top) sam; (middle) stager; (bottom) root.

\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
\n"); fprintf(page," Fig. 1: Rates - Last 24 hours -.((gif), (eps)) \n"); fprintf(page,"\n"); fprintf(page,"Overall\n"); fprintf(page,"
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page," \n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"

Additional plots

Fig. 2: Rates vs Time (LAST 24 hours).((gif), (eps)) \n"); fprintf(page,"
\n"); fprintf(page," Fig. 3: Rates vs Time(LAST 7 DAYS).((gif), (eps)) \n"); fprintf(page,"
\n"); fprintf(page," Fig. 4: Rates vs Time (LAST 31 days).((gif), (eps)) \n"); fprintf(page,"
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
 

\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
 

\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
redball.gif Rates extremely lowyelball.gif Rates lowgreenball.gif rates are OK
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"

\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n", time.AsSQLString()); fprintf(page,"
Legal Notices
Brought To You By: Enstore Monitoring
Last updated: %s
\n"); fprintf(page,"\n"); fclose(page); // overall popup htmlFile = fHtmlDirectory + "/OverPop.html"; page = fopen(htmlFile,"w"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"Overall rates\n"); fprintf(page,"

\n"); fprintf(page,"The status of the Overall rates depends on how many occurences of low/extra low rates happened in the last 24 hours.\n"); fprintf(page,"\n"); fprintf(page,"If for more than a fixed fraction of entries the rates happen to be extra low, the situation is flagged as 'bad' (red ball). If for such a fraction the rates happen to be low, the situation is flagged 'abnormal' (yellow ball). If the rates are good for a good fraction of the times, the situation is flagged as 'normal' (green ball)\n"); fprintf(page,"

\n"); fclose(page); // delete page; // now Enstore Status page htmlFile = fHtmlDirectory + "/Status.html"; page = fopen(htmlFile,"w"); fprintf(page,"\n"); fprintf(page,"\n", wwwBase); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); // 1 fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
Global monitorEnstore Help
\n"); fprintf(page,"
\n"); // 2 fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
 
Enstore Monitor
 
\n"); fprintf(page,"
\n"); // 3 fprintf(page,"\n"); // fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
 

\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page,"\n"); if(fStatus.movers==0) fprintf(page,"\n"); if(fStatus.movers==1) fprintf(page,"\n"); if(fStatus.movers==2) fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
 
greenball.gif Movers Status yelball.gif Movers Status redball.gif Movers Status
 
\n"); fprintf(page,"
\n"); // 3 fprintf(page,"\n"); // fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
 

\n"); fprintf(page,"
\n"); // 3 if(fStatus.movers==0) fprintf(page,"\n"); if(fStatus.movers==1) fprintf(page,"
greenball.gif Enstore Rates
\n"); if(fStatus.movers==2) fprintf(page,"
yelball.gif Enstore Rates
\n"); fprintf(page,"\n"); // network status if(fStatus.netw==0) fprintf(page,"\n"); if(fStatus.netw==1) fprintf(page,"\n"); if(fStatus.netw==2) fprintf(page,"\n"); if(fStatus.netw==3) fprintf(page,"\n"); if(fStatus.netw==4) fprintf(page,"\n"); // transfer status if(fStatus.transf==0) fprintf(page,"\n"); if(fStatus.transf==1) fprintf(page,"\n"); if(fStatus.transf==2) fprintf(page,"\n"); if(fStatus.transf==3) fprintf(page,"\n"); if(fStatus.transf==4) fprintf(page,"\n"); // drive status if(fStatus.drive==0) fprintf(page,"\n"); if(fStatus.drive==1) fprintf(page,"\n"); if(fStatus.drive==2) fprintf(page,"\n"); if(fStatus.drive==3) fprintf(page,"\n"); if(fStatus.drive==4) fprintf(page,"\n"); fprintf(page,"
redball.gif Enstore Rates
 
greenball.gif Network yelball.gif Network redball.gif Network checkmark.gifNetwork down.gif Network greenball.gif Transfer yelball.gif Transfer redball.gif Transfer checkmark.gif Transfer down.gif Transfer greenball.gif Drive yelball.gif Drive redball.gif Drive checkmark.gif Drive down.gif Drive
\n"); fprintf(page,"
\n"); fprintf(page,"\n"); fprintf(page," \n"); // disk status if(fStatus.disk==0) fprintf(page,"\n"); if(fStatus.disk==1) fprintf(page,"\n"); if(fStatus.disk==2) fprintf(page,"\n"); if(fStatus.disk==3) fprintf(page,"\n"); if(fStatus.disk==4) fprintf(page,"\n"); // overall status if(fStatus.overall==0) fprintf(page,"\n"); if(fStatus.overall==1) fprintf(page,"\n"); if(fStatus.overall==2) fprintf(page,"\n"); if(fStatus.overall==3) fprintf(page,"\n"); if(fStatus.overall==4) fprintf(page,"\n"); fprintf(page,"
 
greenball.gif Disk yelball.gif Disk redball.gif Disk checkmark.gif Disk down.gif Disk greenball.gif Overallyelball.gif Overallredball.gif Overallcheckmark.gif Overalldown.gif Overall
\n"); fprintf(page,"
\n"); // 4 fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
 

\n"); fprintf(page,"
\n"); // 5 fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
redball.gif Major Problemyelball.gif Minor problem
greenball.gif All systems are operationalstar.gif Situation under investigation
checkmark.gif Scheduled outagedown.gif Known down
\n"); fprintf(page,"
\n"); // 6 fprintf(page,"\n"); // fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"
 

\n"); fprintf(page,"
\n"); // 7 fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"\n", time.AsSQLString()); fprintf(page,"
Legal Notices
Brought To You By: Enstore Monitoring
Last updated: %s
\n"); fprintf(page,"\n"); fclose(page); // rates popup htmlFile = fHtmlDirectory + "/RatesPop.html"; page = fopen(htmlFile,"w"); fprintf(page,"\n"); fprintf(page,"\n"); fprintf(page,"Overall rates\n"); fprintf(page,"

\n"); fprintf(page,"The status of Enstore rates depends is the 'OR' of the status of the various subsystems: if any of them is 'bad', the situation is is flagged as 'bad' (red ball); if any one is 'abnormal', the situation is flagged 'abnormal' (yellow ball). Otherwise the situation is flagged as 'normal' (green ball)\n"); fprintf(page,"

\n"); fclose(page); // delete page; return 0; }