CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
iDie.h
Go to the documentation of this file.
1 #ifndef EVENTFILTER_GOODIES_IDIE_H
2 #define EVENTFILTER_GOODIES_IDIE_H
3 
4 //XDAQ
5 #include "xdaq/Application.h"
6 
7 #include "xdata/String.h"
8 #include "xdata/Double.h"
9 #include "xdata/Float.h"
10 #include "xdata/UnsignedInteger32.h"
11 #include "xdata/Boolean.h"
12 #include "xdata/TimeVal.h"
13 #include "xdata/ActionListener.h"
14 
15 #include "xoap/MessageReference.h"
16 #include "xoap/MessageFactory.h"
17 #include "xoap/Method.h"
18 
19 #include "xgi/Utils.h"
20 #include "xgi/Input.h"
21 #include "xgi/Output.h"
22 #include "xgi/Method.h"
23 
24 #include "toolbox/net/URN.h"
25 #include "toolbox/fsm/exception/Exception.h"
26 #include "toolbox/task/TimerListener.h"
27 
28 //C++2011
29 #include <atomic>
30 
31 //C++
32 #include <list>
33 #include <vector>
34 #include <deque>
35 
36 //C
37 #include <sys/time.h>
38 #include <math.h>
39 
40 //ROOT
41 #include "TFile.h"
42 #include "TTree.h"
43 
44 //framework
50 
51 //CMSSW EventFilter
54 
55 #define MODNAMES 25
56 
57 namespace evf {
58 
59  int modlistSortFunction( const void *a, const void *b);
60 
61  namespace internal{
62  struct fu{
63  time_t tstamp;
64  unsigned int ccount;
65  std::vector<pid_t> cpids;
66  std::vector<std::string> signals;
67  std::vector<std::string> stacktraces;
68  };
69  struct rate{
70  int nproc;
71  int nsub;
72  int nrep;
73  int npath;
74  int nendpath;
87  };
88 
89  }
90  typedef std::map<std::string,internal::fu> fmap;
91  typedef fmap::iterator ifmap;
92 
93  class iDie :
94  public xdaq::Application,
95  public xdata::ActionListener,
96  public toolbox::task::TimerListener
97  {
98  public:
99  //
100  // xdaq instantiator macro
101  //
103 
104  //
105  // construction/destruction
106  //
107  iDie(xdaq::ApplicationStub *s);
108  virtual ~iDie();
109  //UI
112  void summaryTable(xgi::Input *in,xgi::Output *out)
114  void detailsTable(xgi::Input *in,xgi::Output *out)
116  void dumpTable(xgi::Input *in,xgi::Output *out)
118  void updater(xgi::Input *in,xgi::Output *out)
120  void iChoke(xgi::Input *in,xgi::Output *out)
124  void spotlight(xgi::Input *in,xgi::Output *out)
126  //AI
127  void postEntry(xgi::Input*in,xgi::Output*out)
131 
132  // *fake* fsm soap command callback
133  xoap::MessageReference fsmCallback(xoap::MessageReference msg)
135 
136  // xdata:ActionListener interface
137  void actionPerformed(xdata::Event& e);
138 
139  //toolbox::Task::TimerListener interface
140  void timeExpired(toolbox::task::TimerEvent& e);
141 
142  private:
143 
145  sorted_indices(const std::vector<int> &arr) : arr_(arr)
146  {
147  ind_.resize(arr_.size(),0);
148  unsigned int i = 0;
149  while(i<ind_.size()) {ind_[i] = i; i++;}
150  std::sort(ind_.rbegin(),ind_.rend(),*this);
151  }
152  int operator[](size_t ind) const {return arr_[ind_[ind]];}
153 
154  bool operator()(const size_t a, const size_t b) const
155  {
156  return arr_[a]<arr_[b];
157  }
158  int ii(size_t ind){return ind_[ind];}
159  std::vector<int> ind_;
160  const std::vector<int> &arr_;
161  };
162  //
163  // private member functions
164  //
165  class lsStat;
166  class commonLsStat;
167 
168  void reset();
170  void parseModuleHisto(const char *, unsigned int);
173  void parsePathHisto(const unsigned char *, unsigned int);
174  void initFramework();
175  void deleteFramework();
176  void initMonitorElements();
179  void fillDQMStatHist(unsigned int nbsIdx, unsigned int lsid);
180  void fillDQMModFractionHist(unsigned int nbsIdx, unsigned int lsid, unsigned int nonIdle,
181  const std::vector<std::pair<unsigned int, unsigned int>>& offenders);
182 
183  void updateRollingHistos(unsigned int nbsIdx, unsigned int lsid, lsStat * lst, commonLsStat * clst, bool roll);
184  void updateStreamHistos(unsigned int forls, commonLsStat *clst, commonLsStat *prevclst);
185  void updateDatasetHistos(unsigned int forls, commonLsStat *clst, commonLsStat *prevclst);
186  void doFlush();
187  void perLumiFileSaver(unsigned int lsid);
188  void perTimeFileSaver();
189  void initDQMEventInfo();
190  void setRunStartTimeStamp();
191 
192  //
193  // member data
194  //
195 
196  // message logger
197  Logger log_;
199  // monitored parameters
200  xdata::String url_;
201  xdata::String class_;
202  xdata::UnsignedInteger32 instance_;
203  xdata::String hostname_;
204 
205  xdata::UnsignedInteger32 runNumber_;
206  unsigned int lastRunNumberSet_;
208 
209  xdata::UnsignedInteger32 flashRunNumber_;
210 
211  //CPU load flashlist
212  std::list<std::string> monNames_;
213  xdata::InfoSpace *cpuInfoSpace_;
214  xdata::UnsignedInteger32 flashLoadLs_;
215  std::atomic<unsigned int> cpuLoadLastLs_;
216  std::atomic<unsigned int> cpuLoadSentLs_;
217 
218  float cpuLoad_[4000];
219  float cpuLoadPS_[4000];
220 
221  float cpuLoadTime7_[4000];
222  float cpuLoadTime8_[4000];
223  float cpuLoadTime12_[4000];
224  float cpuLoadTime16_[4000];
225  float cpuLoadTime24_[4000];
226  float cpuLoadTime32_[4000];
227 
228  float cpuLoadRate_[4000];
229 
230  float cpuLoadRate7_[4000];
231  float cpuLoadRate8_[4000];
232  float cpuLoadRate12_[4000];
233  float cpuLoadRate16_[4000];
234  float cpuLoadRate24_[4000];
235  float cpuLoadRate32_[4000];
236 
237  float cpuLoadUc7_[4000];
238  float cpuLoadUc8_[4000];
239  float cpuLoadUc12_[4000];
240  float cpuLoadUc16_[4000];
241  float cpuLoadUc24_[4000];
242  float cpuLoadUc32_[4000];
243 
244  unsigned int cpuLoadReports7_[4000];
245  unsigned int cpuLoadReports8_[4000];
246  unsigned int cpuLoadReports12_[4000];
247  unsigned int cpuLoadReports16_[4000];
248  unsigned int cpuLoadReports24_[4000];
249  unsigned int cpuLoadReports32_[4000];
250 
251  xdata::Float flashLoad_;
252  xdata::Float flashLoadPS_;
253 
254  xdata::Float flashLoadTime7_;
255  xdata::Float flashLoadTime8_;
256  xdata::Float flashLoadTime12_;
257  xdata::Float flashLoadTime16_;
258  xdata::Float flashLoadTime24_;
259  xdata::Float flashLoadTime32_;
260 
261  xdata::Float flashLoadRate_;
262 
263  xdata::Float flashLoadRate7_;
264  xdata::Float flashLoadRate8_;
265  xdata::Float flashLoadRate12_;
266  xdata::Float flashLoadRate16_;
267  xdata::Float flashLoadRate24_;
268  xdata::Float flashLoadRate32_;
269 
270  xdata::Float flashLoadUc7_;
271  xdata::Float flashLoadUc8_;
272  xdata::Float flashLoadUc12_;
273  xdata::Float flashLoadUc16_;
274  xdata::Float flashLoadUc24_;
275  xdata::Float flashLoadUc32_;
276 
277  xdata::UnsignedInteger32 flashReports7_;
278  xdata::UnsignedInteger32 flashReports8_;
279  xdata::UnsignedInteger32 flashReports12_;
280  xdata::UnsignedInteger32 flashReports16_;
281  xdata::UnsignedInteger32 flashReports24_;
282  xdata::UnsignedInteger32 flashReports32_;
283 
284  //EventInfo
290 
302 
303  float runTS_;
304  float latencyTS_;
305 
306  xdata::String dqmCollectorHost_;
307  xdata::String dqmCollectorPort_;
309 
310  unsigned int totalCores_;
311  unsigned int nstates_;
312  std::vector<int> cpuentries_;
313  std::vector<std::vector<int> > cpustat_;
314  std::vector<std::string> mapmod_;
315  unsigned int last_ls_;
316  std::vector<TriggerReportStatic>trp_;
317  std::vector<int> trpentries_;
318  std::vector<std::string> mappath_;
319  //root stuff
320  TFile *f_;
321  TTree *t_;
322  TBranch *b_;
323  TBranch *b1_;
324  TBranch *b2_;
325  TBranch *b3_;
326  TBranch *b4_;
327  int *datap_;
330 
331  //message statistics
341 
345 
346  //DQM histogram statistics
347  std::vector<unsigned int> epInstances;
348  std::vector<unsigned int> epMax;
349  std::vector<float> HTscaling;
350  std::vector<unsigned int> nbMachines;
351  std::vector<float> machineWeight;
352  std::vector<float> machineWeightInst;
353 
354  std::vector<std::string > endPathNames_;
355  std::vector<std::string > datasetNames_;
356 
357  class commonLsStat {
358 
359  public:
360  unsigned int ls_;
361  std::vector<float> rateVec_;
362  std::vector<float> busyVec_;
363  std::vector<float> busyCPUVec_;
364  std::vector<float> busyVecTheor_;
365  std::vector<float> busyCPUVecTheor_;
366  std::vector<unsigned int> nbMachines;
367  std::vector<unsigned int> endPathCounts_;
368  std::vector<unsigned int> datasetCounts_;
369  commonLsStat(unsigned int lsid,unsigned int classes) {
370  for (size_t i=0;i<classes;i++) {
371  rateVec_.push_back(0.);
372  busyVec_.push_back(0.);
373  busyCPUVec_.push_back(0.);
374  busyVecTheor_.push_back(0.);
375  busyCPUVecTheor_.push_back(0.);
376  nbMachines.push_back(0);
377  }
378  ls_=lsid;
379  }
380 
381  void setBusyForClass(unsigned int classIdx,float rate,float busy,float busyTheor, float busyCPU, float busyCPUTheor, unsigned int nMachineReports) {
382  rateVec_[classIdx]=rate;
383  busyVec_[classIdx]=busy;
384  busyCPUVec_[classIdx]=busyCPU;
385  busyVecTheor_[classIdx]=busyTheor;
386  busyCPUVecTheor_[classIdx]=busyCPUTheor;
387  nbMachines[classIdx]=nMachineReports;
388  }
389 
390  float getTotalRate() {
391  float totRate=0;
392  for (size_t i=0;i<rateVec_.size();i++) totRate+=rateVec_[i];
393  return totRate;
394  }
395 
396  float getBusyTotalFrac(bool procstat,std::vector<float> & machineWeightInst) {
397  double sum=0;
398  double sumMachines=0;
399  for (size_t i=0;i<busyVec_.size();i++) {
400  if (!procstat)
401  sum+=machineWeightInst[i]*nbMachines.at(i)*busyVec_[i];
402  else
403  sum+=machineWeightInst[i]*nbMachines.at(i)*busyCPUVec_[i];
404  sumMachines+=machineWeightInst[i]*nbMachines.at(i);
405  }
406  if (sumMachines>0)
407  return float(sum/sumMachines);
408  else return 0.;
409  }
410 
411  float getBusyTotalFracTheor(bool procstat,std::vector<float> & machineWeight) {
412  float sum=0;
413  float sumMachines=0;
414  for (size_t i=0;i<busyVecTheor_.size() && i<nbMachines.size();i++) {
415  if (!procstat)
416  sum+=machineWeight[i]*nbMachines[i]*busyVecTheor_[i];
417  else
418  sum+=machineWeight[i]*nbMachines[i]*busyCPUVecTheor_[i];
419  sumMachines+=machineWeight[i]*nbMachines[i];
420  }
421  if (sumMachines>0)
422  return sum/sumMachines;
423  else return 0.;
424  }
425 
426  unsigned int getNReports() {
427  unsigned int sum=0;
428  for (size_t i=0;i<nbMachines.size();i++) sum+=nbMachines[i];
429  return sum;
430  }
431 
433  std::ostringstream info;
434  for (size_t i=0;i<rateVec_.size();i++) {
435  info << i << "/r:" << rateVec_[i] <<"/b:"<<busyVec_[i]<<"/n:"<<nbMachines[i]<<"; ";
436  }
437  return info.str();
438  }
439  };
440 
441  class lsStat {
442  public:
443  unsigned int ls_;
444  bool updated_;
445  unsigned int nbSubs_;
446  unsigned int nSampledNonIdle_;
447  unsigned int nSampledNonIdle2_;
448  unsigned int nSampledIdle_;
449  unsigned int nSampledIdle2_;
450  unsigned int nProc_;
451  unsigned int nProc2_;
452  unsigned int nCPUBusy_;
453  unsigned int nReports_;
454  unsigned int nMaxReports_;
455  double rateAvg;
456  double rateErr;
457  double evtTimeAvg;
458  double evtTimeErr;
460  double fracCPUBusy_;
461  unsigned int nmodulenames_;
462  unsigned int sumDeltaTms_;
463  float avgDeltaT_;
464  float avgDeltaT2_;
465  std::pair<unsigned int,unsigned int> *moduleSamplingSums;
466 
467  lsStat(unsigned int ls, unsigned int nbSubs,unsigned int maxreps,unsigned int nmodulenames):
468  ls_(ls),updated_(true),nbSubs_(nbSubs),
470  nProc_(0),nProc2_(0),nCPUBusy_(0),nReports_(0),nMaxReports_(maxreps),nmodulenames_(nmodulenames),
472  {
473  moduleSamplingSums = new std::pair<unsigned int,unsigned int>[nmodulenames_];
474  for (unsigned int i=0;i<nmodulenames_;i++) {
475  moduleSamplingSums[i].first=i;
476  moduleSamplingSums[i].second=0;
477  }
478  }
479 
481  delete moduleSamplingSums;
482  }
483 
484  void update(unsigned int nSampledNonIdle,unsigned int nSampledIdle,
485  unsigned int nProc,unsigned int ncpubusy, unsigned int deltaTms)
486  {
487  nReports_++;
488  nSampledNonIdle_+=nSampledNonIdle;
489  nSampledNonIdle2_+=pow(nSampledNonIdle,2);
490  nSampledIdle_+=nSampledIdle;
491  nSampledIdle2_+=pow(nSampledIdle,2);
492  nProc_+=nProc;
493  nProc2_+=pow(nProc,2);
494  nCPUBusy_+=ncpubusy;
495  sumDeltaTms_+=deltaTms;
496  updated_=true;
497  }
498 
499  std::pair<unsigned int,unsigned int> * getModuleSamplingPtr() {
500  return moduleSamplingSums;
501  }
502 
504  delete moduleSamplingSums;
505  moduleSamplingSums=nullptr;
506  nmodulenames_=0;
507  }
508 
509  void calcStat()
510  {
511  if (!updated_) return;
512  if (nReports_) {
513  float tinv = 0.001/nReports_;
514  fracCPUBusy_=nCPUBusy_*tinv;
516  if (avgDeltaT_==0.) {
517  avgDeltaT_=23.;//default value
518  avgDeltaT2_=0;
519  }
521  rateErr=sqrt(fabs(nProc2_ - pow(nProc_,2)))/avgDeltaT_;
522  }
523  else {
524  fracCPUBusy_=0.;
525  rateAvg=0.;
526  rateErr=0.;
527  avgDeltaT_=23.;
528  }
529 
531  unsigned int sampled = nSampledNonIdle_+nSampledIdle_;
532  if (rateAvg!=0. && sampled) {
533  float nAllInv = 1./sampled;
534  fracWaitingAvg= nSampledIdle_*nAllInv;
535  double nSampledIdleErr2=fabs(nSampledIdle2_ - pow(nSampledIdle_,2));
536  double nSampledNonIdleErr2=fabs(nSampledNonIdle2_ - pow(nSampledNonIdle_,2));
537  double fracWaitingAvgErr= sqrt(
538  (pow(nSampledIdle_,2)*nSampledNonIdleErr2
539  + pow(nSampledNonIdle_,2)*nSampledIdleErr2))*pow(nAllInv,2);
540  float rateAvgInv=1./rateAvg;
541  evtTimeAvg=nbSubs_ * nReports_ * (1.-fracWaitingAvg)*rateAvgInv;
542  evtTimeErr = nbSubs_ * nReports_ * sqrt(pow(fracWaitingAvg*rateErr*pow(rateAvgInv,2),2) + pow(fracWaitingAvgErr*rateAvgInv,2));
543  }
544  updated_=false;
545  }
546 
547  float getRate() {
548  if (updated_) calcStat();
549  return rateAvg;
550  }
551 
552  float getRateErr() {
553  if (updated_) calcStat();
554  return rateErr;
555  }
556 
558  if (updated_) calcStat();
559  if (nReports_)
560  return rateAvg/(1.*nReports_);
561  return 0.;
562  }
563 
565  if (updated_) calcStat();
566  if (nReports_)
567  return rateErr/(1.*nReports_);
568  return 0.;
569  }
570 
571  float getEvtTime() {
572  if (updated_) calcStat();
573  return evtTimeAvg;
574  }
575 
576  float getEvtTimeErr() {
577  if (updated_) calcStat();
578  return evtTimeErr;
579  }
580 
581  unsigned int getNSampledNonIdle() {
582  if (updated_) calcStat();
583  return nSampledNonIdle_;
584  }
585 
586  float getFracBusy() {
587  if (updated_) calcStat();
588  return 1.-fracWaitingAvg;
589  }
590 
591  float getFracCPUBusy() {
592  if (updated_) calcStat();
593  return fracCPUBusy_;
594  }
595 
596  unsigned int getReports() {
597  return nReports_;
598  }
599 
600  float getDt() {
601  if (updated_) calcStat();
602  return avgDeltaT2_;
603  }
604 
605  std::vector<std::pair<unsigned int, unsigned int>> getOffendersVector() {
606  std::vector<std::pair<unsigned int, unsigned int>> ret;
607  if (updated_) calcStat();
608  if (moduleSamplingSums) {
609  //make a copy for sorting
610  std::pair<unsigned int,unsigned int> *moduleSumsCopy = new std::pair<unsigned int,unsigned int>[nmodulenames_];
611  memcpy(moduleSumsCopy,moduleSamplingSums,nmodulenames_*sizeof(std::pair<unsigned int,unsigned int>));
612 
613  std::qsort((void *)moduleSumsCopy, nmodulenames_,
614  sizeof(std::pair<unsigned int,unsigned int>), modlistSortFunction);
615 
616  unsigned int count=0;
617  unsigned int saveidx=0;
618  while (saveidx < MODNAMES && count<nmodulenames_)
619  {
620  if (moduleSumsCopy[count].first==2) {count++;continue;}
621  ret.push_back(moduleSumsCopy[count]);
622  saveidx++;
623  count++;
624  }
625  delete moduleSumsCopy;
626  }
627  return ret;
628  }
629 
630  float getOffenderFracAt(unsigned int x) {
631  if (x<nmodulenames_) {
632  if (updated_) calcStat();
634  if (total>0.) {
635  for (size_t i=0;i<nmodulenames_;i++) {
636  if (moduleSamplingSums[i].first==x)
637  return moduleSamplingSums[i].second/total;
638  }
639  }
640  }
641  return 0.;
642  }
643  };
644 
645 
646  //DQM
647  boost::shared_ptr<std::vector<edm::ParameterSet> > pServiceSets_;
656  xdata::Boolean dqmEnabled_;
657  xdata::Boolean debugMode_;
658 
659  std::map<unsigned int,int> nbSubsList;
660  std::map<int,unsigned int> nbSubsListInv;
661  unsigned int nbSubsClasses;
662  std::vector<MonitorElement*> meVecRate_;
663  std::vector<MonitorElement*> meVecTime_;
664  std::vector<MonitorElement*> meVecCPU_;
665  std::vector<MonitorElement*> meVecOffenders_;
678  unsigned int summaryLastLs_;
679  std::vector<std::map<unsigned int, unsigned int> > occupancyNameMap;
680  //1 queue per number of subProcesses (and one common)
681  std::deque<commonLsStat*> commonLsHistory;
682  std::deque<lsStat*> * lsHistory;
683 
684  //endpath statistics
685  std::vector<MonitorElement *> endPathRates_;
686 
687  //dataset statistics
688  std::vector<MonitorElement *> datasetRates_;
689 
690  std::vector<unsigned int> currentLs_;
691 
692  xdata::UnsignedInteger32 saveLsInterval_;
693  unsigned int ilumiprev_;
694  std::list<std::string> pastSavedFiles_;
695  xdata::String dqmSaveDir_;
696  xdata::Boolean dqmFilesWritable_;
697  xdata::String topLevelFolder_;
698  unsigned int savedForLs_;
701 
702  timeval * reportingStart_;
703  unsigned int lastSavedForTime_;
704 
705  unsigned int dsMismatch;
706  }; // class iDie
707 
708  int modlistSortFunction( const void *a, const void *b)
709  {
710  std::pair<unsigned int,unsigned int> intOne = *((std::pair<unsigned int,unsigned int>*)a);
711  std::pair<unsigned int,unsigned int> intTwo = *((std::pair<unsigned int,unsigned int>*)b);
712  if (intOne.second > intTwo.second)
713  return -1;
714  if (intOne.second == intTwo.second)
715  return 0;
716  return 1;
717  }
718 
719  float fround(float val, float mod) {
720  return val - fmod(val,mod);
721  }
722 
723 } // namespace evf
724 
725 
726 #endif
xdata::Boolean debugMode_
Definition: iDie.h:657
unsigned int cpuLoadReports12_[4000]
Definition: iDie.h:246
XDAQ_INSTANTIATOR()
std::string dqmState_
Definition: iDie.h:198
xdata::UnsignedInteger32 flashReports16_
Definition: iDie.h:280
float getRate()
Definition: iDie.h:547
std::vector< std::pair< unsigned int, unsigned int > > getOffendersVector()
Definition: iDie.h:605
MonitorElement * daqTotalRateSummary_
Definition: iDie.h:676
unsigned int cpuLoadReports16_[4000]
Definition: iDie.h:247
void updateDatasetHistos(unsigned int forls, commonLsStat *clst, commonLsStat *prevclst)
Definition: iDie.cc:1659
int i
Definition: DBlmapReader.cc:9
float cpuLoadUc24_[4000]
Definition: iDie.h:241
timeval runStartDetectedTimeStamp_
Definition: iDie.h:338
std::atomic< unsigned int > cpuLoadSentLs_
Definition: iDie.h:216
TFile * f_
Definition: iDie.h:320
xdata::UnsignedInteger32 runNumber_
Definition: iDie.h:205
xdata::Boolean dqmEnabled_
Definition: iDie.h:656
MonitorElement * busySummary2_
Definition: iDie.h:670
std::vector< float > busyCPUVec_
Definition: iDie.h:363
int * datap_
Definition: iDie.h:327
timeval lastModuleLegendaMessageTimeStamp_
Definition: iDie.h:339
MonitorElement * hostNameMe_
Definition: iDie.h:298
void setRunStartTimeStamp()
Definition: iDie.cc:2068
unsigned int summaryLastLs_
Definition: iDie.h:678
#define Input(cl)
Definition: vmac.h:189
std::vector< float > machineWeightInst
Definition: iDie.h:352
float latencyTS_
Definition: iDie.h:304
xdata::Float flashLoadPS_
Definition: iDie.h:252
xdata::UnsignedInteger32 instance_
Definition: iDie.h:202
int operator[](size_t ind) const
Definition: iDie.h:152
void parseDatasetLegenda(std::string)
Definition: iDie.cc:999
std::deque< commonLsStat * > commonLsHistory
Definition: iDie.h:681
unsigned int cpuLoadReports7_[4000]
Definition: iDie.h:244
float cpuLoadTime24_[4000]
Definition: iDie.h:225
MonitorElement * busyModules_
Definition: iDie.h:677
unsigned int nbSubsClasses
Definition: iDie.h:661
int nModuleLegendaMessageWithDataReceived_
Definition: iDie.h:334
iDie(xdaq::ApplicationStub *s)
Definition: iDie.cc:56
void setBusyForClass(unsigned int classIdx, float rate, float busy, float busyTheor, float busyCPU, float busyCPUTheor, unsigned int nMachineReports)
Definition: iDie.h:381
int nPathHistoMessageReceived_
Definition: iDie.h:337
MonitorElement * busySummaryUncorr2_
Definition: iDie.h:672
xdata::UnsignedInteger32 flashLoadLs_
Definition: iDie.h:214
float cpuLoadRate16_[4000]
Definition: iDie.h:233
float cpuLoadPS_[4000]
Definition: iDie.h:219
MonitorElement * processStartTimeStampMe_
Definition: iDie.h:297
xdata::UnsignedInteger32 flashReports32_
Definition: iDie.h:282
float cpuLoadUc32_[4000]
Definition: iDie.h:242
MonitorElement * daqBusySummary_
Definition: iDie.h:674
std::pair< unsigned int, unsigned int > * moduleSamplingSums
Definition: iDie.h:465
std::vector< int > ind_
Definition: iDie.h:159
void updateRollingHistos(unsigned int nbsIdx, unsigned int lsid, lsStat *lst, commonLsStat *clst, bool roll)
Definition: iDie.cc:1478
float getDt()
Definition: iDie.h:600
int ii(size_t ind)
Definition: iDie.h:158
xdata::Float flashLoadTime7_
Definition: iDie.h:254
std::vector< float > rateVec_
Definition: iDie.h:361
unsigned int dsMismatch
Definition: iDie.h:705
void parsePathLegenda(std::string)
Definition: iDie.cc:960
int etimesRun[evf::max_endpaths]
Definition: iDie.h:81
unsigned int nSampledNonIdle_
Definition: iDie.h:446
unsigned int nstates_
Definition: iDie.h:311
MonitorElement * workingDirMe_
Definition: iDie.h:300
MonitorElement * daqBusySummary2_
Definition: iDie.h:675
float cpuLoadRate8_[4000]
Definition: iDie.h:231
xdata::UnsignedInteger32 flashReports24_
Definition: iDie.h:281
xdata::UnsignedInteger32 saveLsInterval_
Definition: iDie.h:692
std::vector< std::map< unsigned int, unsigned int > > occupancyNameMap
Definition: iDie.h:679
void initDQMEventInfo()
Definition: iDie.cc:2031
unsigned int nbSubs_
Definition: iDie.h:445
int ptimesFailed[evf::max_paths]
Definition: iDie.h:79
xdata::String dqmCollectorPort_
Definition: iDie.h:307
xdata::Float flashLoadRate12_
Definition: iDie.h:265
std::vector< float > busyCPUVecTheor_
Definition: iDie.h:365
timeval * reportingStart_
Definition: iDie.h:702
TBranch * b4_
Definition: iDie.h:326
void initMonitorElementsStreams()
Definition: iDie.cc:1414
int ptimesPassedPs[evf::max_paths]
Definition: iDie.h:76
time_t tstamp
Definition: iDie.h:63
void postEntryiChoke(xgi::Input *in, xgi::Output *out)
Definition: iDie.cc:699
void perLumiFileSaver(unsigned int lsid)
Definition: iDie.cc:1859
int nModuleHistoMessageReceived_
Definition: iDie.h:336
float cpuLoadUc16_[4000]
Definition: iDie.h:240
int nDatasetLegendaMessageReceived_
Definition: iDie.h:342
edm::EventProcessor * evtProcessor_
Definition: iDie.h:649
Logger log_
Definition: iDie.h:197
int etimesFailed[evf::max_endpaths]
Definition: iDie.h:85
xdata::Float flashLoadUc32_
Definition: iDie.h:275
double rateAvg
Definition: iDie.h:455
std::vector< MonitorElement * > meVecTime_
Definition: iDie.h:663
double fracCPUBusy_
Definition: iDie.h:460
void iChoke(xgi::Input *in, xgi::Output *out)
Definition: iDie.cc:573
float avgDeltaT_
Definition: iDie.h:463
int lst[30]
void fillDQMStatHist(unsigned int nbsIdx, unsigned int lsid)
Definition: iDie.cc:1447
std::vector< float > busyVecTheor_
Definition: iDie.h:364
MonitorElement * lumisecId_
Definition: iDie.h:286
std::vector< unsigned int > currentLs_
Definition: iDie.h:690
std::vector< MonitorElement * > endPathRates_
Definition: iDie.h:685
std::pair< unsigned int, unsigned int > * getModuleSamplingPtr()
Definition: iDie.h:499
float cpuLoad_[4000]
Definition: iDie.h:218
void parseModuleLegenda(std::string)
Definition: iDie.cc:808
int ptimesExcept[evf::max_paths]
Definition: iDie.h:80
xdata::Float flashLoadUc12_
Definition: iDie.h:272
float cpuLoadUc7_[4000]
Definition: iDie.h:237
float avgDeltaT2_
Definition: iDie.h:464
unsigned int savedForLs_
Definition: iDie.h:698
MonitorElement * eventId_
Definition: iDie.h:287
float getRatePerMachine()
Definition: iDie.h:557
std::vector< MonitorElement * > meVecRate_
Definition: iDie.h:662
std::string fileBaseName_
Definition: iDie.h:699
unsigned int getReports()
Definition: iDie.h:596
float getBusyTotalFrac(bool procstat, std::vector< float > &machineWeightInst)
Definition: iDie.h:396
void perTimeFileSaver()
Definition: iDie.cc:1949
float getOffenderFracAt(unsigned int x)
Definition: iDie.h:630
void updater(xgi::Input *in, xgi::Output *out)
Definition: iDie.cc:460
unsigned int getNSampledNonIdle()
Definition: iDie.h:581
unsigned int nReports_
Definition: iDie.h:453
float getTotalRate()
Definition: iDie.h:390
float cpuLoadTime12_[4000]
Definition: iDie.h:223
void update(unsigned int nSampledNonIdle, unsigned int nSampledIdle, unsigned int nProc, unsigned int ncpubusy, unsigned int deltaTms)
Definition: iDie.h:484
void deleteFramework()
Definition: iDie.cc:1442
TBranch * b2_
Definition: iDie.h:324
double evtTimeErr
Definition: iDie.h:458
xdata::String class_
Definition: iDie.h:201
bool meInitializedStreams_
Definition: iDie.h:651
std::vector< unsigned int > datasetCounts_
Definition: iDie.h:368
unsigned int cpuLoadReports8_[4000]
Definition: iDie.h:245
bool runActive_
Definition: iDie.h:207
std::vector< int > cpuentries_
Definition: iDie.h:312
std::string printInfo()
Definition: iDie.h:432
std::vector< unsigned int > epMax
Definition: iDie.h:348
std::map< std::string, internal::fu > fmap
Definition: iDie.h:90
TTree * t_
Definition: iDie.h:321
MonitorElement * cmsswVerMe_
Definition: iDie.h:301
unsigned int nmodulenames_
Definition: iDie.h:461
float runTS_
Definition: iDie.h:303
unsigned int lastSavedForTime_
Definition: iDie.h:703
std::vector< int > trpentries_
Definition: iDie.h:317
bool meInitialized_
Definition: iDie.h:650
lsStat(unsigned int ls, unsigned int nbSubs, unsigned int maxreps, unsigned int nmodulenames)
Definition: iDie.h:467
int nModuleLegendaMessageReceived_
Definition: iDie.h:332
void fillDQMModFractionHist(unsigned int nbsIdx, unsigned int lsid, unsigned int nonIdle, const std::vector< std::pair< unsigned int, unsigned int >> &offenders)
Definition: iDie.cc:1674
float fround(float val, float mod)
Definition: iDie.h:719
std::vector< TriggerReportStatic > trp_
Definition: iDie.h:316
void spotlight(xgi::Input *in, xgi::Output *out)
Definition: iDie.cc:1120
std::vector< std::vector< int > > cpustat_
Definition: iDie.h:313
xdata::Float flashLoadTime32_
Definition: iDie.h:259
float cpuLoadUc8_[4000]
Definition: iDie.h:238
float cpuLoadUc12_[4000]
Definition: iDie.h:239
xdata::Float flashLoadRate32_
Definition: iDie.h:268
xdata::Float flashLoadUc8_
Definition: iDie.h:271
unsigned int totalCores_
Definition: iDie.h:310
float cpuLoadTime7_[4000]
Definition: iDie.h:221
MonitorElement * processLatencyMe_
Definition: iDie.h:292
MonitorElement * processNameMe_
Definition: iDie.h:299
unsigned int nMaxReports_
Definition: iDie.h:454
void initFramework()
Definition: iDie.cc:1207
xdata::Float flashLoadUc24_
Definition: iDie.h:274
T sqrt(T t)
Definition: SSEVec.h:48
xdata::UnsignedInteger32 flashReports12_
Definition: iDie.h:279
void calcStat()
Definition: iDie.h:509
void updateStreamHistos(unsigned int forls, commonLsStat *clst, commonLsStat *prevclst)
Definition: iDie.cc:1644
unsigned int nProc_
Definition: iDie.h:450
xdata::Float flashLoadTime24_
Definition: iDie.h:258
int etimesPassedL1[evf::max_endpaths]
Definition: iDie.h:83
internal::rate r_
Definition: iDie.h:329
unsigned int nSampledIdle_
Definition: iDie.h:448
xdata::UnsignedInteger32 flashReports8_
Definition: iDie.h:278
MonitorElement * processIdMe_
Definition: iDie.h:296
unsigned int nSampledIdle2_
Definition: iDie.h:449
xoap::MessageReference fsmCallback(xoap::MessageReference msg)
Definition: iDie.cc:316
int etimesPassed[evf::max_endpaths]
Definition: iDie.h:84
TBranch * b3_
Definition: iDie.h:325
unsigned int cpuLoadReports32_[4000]
Definition: iDie.h:249
MonitorElement * eventTimeStamp_
Definition: iDie.h:288
std::atomic< unsigned int > cpuLoadLastLs_
Definition: iDie.h:215
DQMStore * dqmStore_
Definition: iDie.h:654
void actionPerformed(xdata::Event &e)
Definition: iDie.cc:291
unsigned int nProc2_
Definition: iDie.h:451
bool first
Definition: L1TdeRCT.cc:94
Definition: iDie.h:93
MonitorElement * timingSummary_
Definition: iDie.h:668
xdata::Float flashLoadUc7_
Definition: iDie.h:270
void detailsTable(xgi::Input *in, xgi::Output *out)
Definition: iDie.cc:474
std::vector< MonitorElement * > meVecCPU_
Definition: iDie.h:664
void timeExpired(toolbox::task::TimerEvent &e)
Definition: iDie.cc:1773
void postEntry(xgi::Input *in, xgi::Output *out)
Definition: iDie.cc:587
bool writeDirectoryPresent_
Definition: iDie.h:700
unsigned int getNReports()
Definition: iDie.h:426
float cpuLoadRate32_[4000]
Definition: iDie.h:235
xdata::Float flashLoadRate16_
Definition: iDie.h:266
int etimesExcept[evf::max_endpaths]
Definition: iDie.h:86
xdata::Float flashLoadTime16_
Definition: iDie.h:257
MonitorElement * rateSummary_
Definition: iDie.h:666
MonitorElement * busySummary_
Definition: iDie.h:669
float cpuLoadRate12_[4000]
Definition: iDie.h:232
tuple out
Definition: dbtoconf.py:99
void doFlush()
Definition: iDie.cc:1768
void parsePathHisto(const unsigned char *, unsigned int)
Definition: iDie.cc:1018
MonitorElement * busySummaryUncorr1_
Definition: iDie.h:671
void deleteModuleSamplingPtr()
Definition: iDie.h:503
int ptimesPassedL1[evf::max_paths]
Definition: iDie.h:77
unsigned int sumDeltaTms_
Definition: iDie.h:462
std::vector< std::string > datasetNames_
Definition: iDie.h:355
void dumpTable(xgi::Input *in, xgi::Output *out)
Definition: iDie.cc:494
std::vector< unsigned int > nbMachines
Definition: iDie.h:366
fmap fus_
Definition: iDie.h:308
void initMonitorElements()
Definition: iDie.cc:1295
timeval lastPathLegendaMessageTimeStamp_
Definition: iDie.h:340
int nDatasetLegendaMessageWithDataReceived_
Definition: iDie.h:343
xdata::InfoSpace * cpuInfoSpace_
Definition: iDie.h:213
std::vector< float > HTscaling
Definition: iDie.h:349
std::vector< float > machineWeight
Definition: iDie.h:351
bool updated_
Definition: iDie.h:444
std::vector< unsigned int > epInstances
Definition: iDie.h:347
std::map< int, unsigned int > nbSubsListInv
Definition: iDie.h:660
float cpuLoadRate_[4000]
Definition: iDie.h:228
xdata::String dqmCollectorHost_
Definition: iDie.h:306
unsigned int ccount
Definition: iDie.h:64
std::vector< MonitorElement * > datasetRates_
Definition: iDie.h:688
void defaultWeb(xgi::Input *in, xgi::Output *out)
Definition: iDie.cc:416
void iChokeMiniInterface(xgi::Input *in, xgi::Output *out)
Definition: iDie.cc:517
unsigned int last_ls_
Definition: iDie.h:315
xdata::UnsignedInteger32 flashReports7_
Definition: iDie.h:277
std::vector< std::string > mappath_
Definition: iDie.h:318
MonitorElement * processTimeStampMe_
Definition: iDie.h:291
double b
Definition: hdecay.h:120
float getFracCPUBusy()
Definition: iDie.h:591
std::vector< std::string > endPathNames_
Definition: iDie.h:354
DQMService * dqmService_
Definition: iDie.h:653
bool operator()(const size_t a, const size_t b) const
Definition: iDie.h:154
xdata::Float flashLoadTime8_
Definition: iDie.h:255
std::vector< std::string > signals
Definition: iDie.h:66
void initMonitorElementsDatasets()
Definition: iDie.cc:1428
int nPathLegendaMessageWithDataReceived_
Definition: iDie.h:335
float cpuLoadRate24_[4000]
Definition: iDie.h:234
TBranch * b1_
Definition: iDie.h:323
MonitorElement * reportPeriodSummary_
Definition: iDie.h:667
static const size_t max_paths
xdata::Float flashLoadRate_
Definition: iDie.h:261
double rate(double x)
Definition: Constants.cc:3
MonitorElement * nUpdatesMe_
Definition: iDie.h:295
xdata::String dqmSaveDir_
Definition: iDie.h:695
std::vector< float > busyVec_
Definition: iDie.h:362
unsigned int ls_
Definition: iDie.h:443
boost::shared_ptr< std::vector< edm::ParameterSet > > pServiceSets_
Definition: iDie.h:647
xdata::String hostname_
Definition: iDie.h:203
float cpuLoadTime32_[4000]
Definition: iDie.h:226
commonLsStat(unsigned int lsid, unsigned int classes)
Definition: iDie.h:369
double fracWaitingAvg
Definition: iDie.h:459
float getRateErrPerMachine()
Definition: iDie.h:564
float getEvtTimeErr()
Definition: iDie.h:576
int nPathLegendaMessageReceived_
Definition: iDie.h:333
edm::ServiceToken serviceToken_
Definition: iDie.h:648
void parseModuleHisto(const char *, unsigned int)
Definition: iDie.cc:829
#define Output(cl)
Definition: vmac.h:193
std::vector< MonitorElement * > meVecOffenders_
Definition: iDie.h:665
double a
Definition: hdecay.h:121
float cpuLoadTime16_[4000]
Definition: iDie.h:224
MonitorElement * processEventsMe_
Definition: iDie.h:293
TriggerReportStatic * trppriv_
Definition: iDie.h:328
unsigned int nSampledNonIdle2_
Definition: iDie.h:447
void reset()
Definition: iDie.cc:778
void summaryTable(xgi::Input *in, xgi::Output *out)
Definition: iDie.cc:466
virtual ~iDie()
Definition: iDie.cc:286
xdata::String topLevelFolder_
Definition: iDie.h:697
unsigned int ilumiprev_
Definition: iDie.h:693
MonitorElement * fuReportsSummary_
Definition: iDie.h:673
xdata::Float flashLoadRate24_
Definition: iDie.h:267
double rateErr
Definition: iDie.h:456
std::vector< std::string > stacktraces
Definition: iDie.h:67
fmap::iterator ifmap
Definition: iDie.h:91
timeval lastDatasetLegendaMessageTimeStamp_
Definition: iDie.h:344
MonitorElement * processEventRateMe_
Definition: iDie.h:294
xdata::Float flashLoadRate7_
Definition: iDie.h:263
float getFracBusy()
Definition: iDie.h:586
#define MODNAMES
Definition: iDie.h:55
xdata::Float flashLoadUc16_
Definition: iDie.h:273
float cpuLoadRate7_[4000]
Definition: iDie.h:230
unsigned int ls_
Definition: iDie.h:360
float getRateErr()
Definition: iDie.h:552
xdata::Float flashLoad_
Definition: iDie.h:251
const std::vector< int > & arr_
Definition: iDie.h:160
Definition: DDAxes.h:10
std::deque< lsStat * > * lsHistory
Definition: iDie.h:682
bool meInitializedDatasets_
Definition: iDie.h:652
std::vector< unsigned int > nbMachines
Definition: iDie.h:350
MonitorElement * runStartTimeStamp_
Definition: iDie.h:289
TBranch * b_
Definition: iDie.h:322
xdata::Float flashLoadTime12_
Definition: iDie.h:256
xdata::Float flashLoadRate8_
Definition: iDie.h:264
unsigned int lastRunNumberSet_
Definition: iDie.h:206
xdata::Boolean dqmFilesWritable_
Definition: iDie.h:696
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
std::vector< pid_t > cpids
Definition: iDie.h:65
std::map< unsigned int, int > nbSubsList
Definition: iDie.h:659
double evtTimeAvg
Definition: iDie.h:457
unsigned int nCPUBusy_
Definition: iDie.h:452
static const size_t max_endpaths
int ptimesPassed[evf::max_paths]
Definition: iDie.h:78
int modlistSortFunction(const void *a, const void *b)
Definition: iDie.h:708
float cpuLoadTime8_[4000]
Definition: iDie.h:222
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
std::string configString_
Definition: iDie.h:655
std::list< std::string > pastSavedFiles_
Definition: iDie.h:694
int ptimesRun[evf::max_paths]
Definition: iDie.h:75
xdata::String url_
Definition: iDie.h:200
float getEvtTime()
Definition: iDie.h:571
std::list< std::string > monNames_
Definition: iDie.h:212
sorted_indices(const std::vector< int > &arr)
Definition: iDie.h:145
xdata::UnsignedInteger32 flashRunNumber_
Definition: iDie.h:209
float getBusyTotalFracTheor(bool procstat, std::vector< float > &machineWeight)
Definition: iDie.h:411
std::vector< std::string > mapmod_
Definition: iDie.h:314
int etimesPassedPs[evf::max_endpaths]
Definition: iDie.h:82
unsigned int cpuLoadReports24_[4000]
Definition: iDie.h:248
MonitorElement * runId_
Definition: iDie.h:285
std::vector< unsigned int > endPathCounts_
Definition: iDie.h:367