CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SMWebPageHelper.cc
Go to the documentation of this file.
1 // $Id: SMWebPageHelper.cc,v 1.8 2012/04/23 08:37:24 mommsen Exp $
3 
4 #include <iomanip>
5 #include <iostream>
6 #include <sstream>
7 #include <stdio.h>
8 
9 #include "boost/lexical_cast.hpp"
10 
22 #include "EventFilter/StorageManager/src/ConsumerWebPageHelper.icc"
23 
24 #include "toolbox/net/Utils.h"
25 
26 
27 namespace stor
28 {
29 
31  (
32  xdaq::ApplicationDescriptor* appDesc,
33  SharedResourcesPtr sharedResources
34  ) :
35  WebPageHelper<SMWebPageHelper>(appDesc, "$Name: CMSSW_6_2_0 $", this, &stor::SMWebPageHelper::addDOMforHyperLinks),
36  sharedResources_(sharedResources),
37  consumerWebPageHelper_(appDesc, "$Name: CMSSW_6_2_0 $", this, &stor::SMWebPageHelper::addDOMforHyperLinks)
38  {}
39 
40 
42  {
43  XHTMLMonitor theMonitor;
45 
46  StatisticsReporterPtr statReporter = sharedResources_->statisticsReporter_;
47 
48  // Create the body with the standard header
49  XHTMLMaker::Node* body = createWebPageBody(maker, "Main",
50  statReporter->getStateMachineMonitorCollection());
51 
52  // Run and event summary
53  addDOMforRunMonitor(maker, body, statReporter->getRunMonitorCollection());
54 
55  // Resource usage
56  addDOMforResourceUsage(maker, body,
57  statReporter->getResourceMonitorCollection(),
58  statReporter->getThroughputMonitorCollection());
59 
60  // Summary
61  addDOMforSummaryInformation(maker, body,
62  statReporter->getDataSenderMonitorCollection(),
63  statReporter->getStreamsMonitorCollection(),
64  statReporter->getEventConsumerMonitorCollection(),
65  statReporter->getDQMEventMonitorCollection(),
66  sharedResources_->registrationCollection_);
67 
68  addDOMforHyperLinks(maker, body);
69 
70  // Dump the webpage to the output stream
71  maker.out(*out);
72  }
73 
74 
76  {
77  XHTMLMonitor theMonitor;
79 
80  StatisticsReporterPtr statReporter = sharedResources_->statisticsReporter_;
81 
82  // Create the body with the standard header
83  XHTMLMaker::Node* body = createWebPageBody(maker, "Input",
84  statReporter->getStateMachineMonitorCollection());
85 
86  // Add the received data statistics table
87  addDOMforFragmentMonitor(maker, body,
88  statReporter->getFragmentMonitorCollection());
89 
90  addDOMforHyperLinks(maker, body);
91 
92  // Dump the webpage to the output stream
93  maker.out(*out);
94  }
95 
96 
98  {
99  XHTMLMonitor theMonitor;
101 
102  StatisticsReporterPtr statReporter = sharedResources_->statisticsReporter_;
103 
104  // Create the body with the standard header
105  XHTMLMaker::Node* body = createWebPageBody(maker, "Stored Data",
106  statReporter->getStateMachineMonitorCollection());
107 
108  addDOMforStoredData(maker, body, statReporter->getStreamsMonitorCollection());
109 
110  maker.addNode("hr", body);
111 
112  addDOMforConfigString(maker, body, sharedResources_->configuration_->getDiskWritingParams());
113 
114  addDOMforHyperLinks(maker, body);
115 
116  // Dump the webpage to the output stream
117  maker.out(*out);
118  }
119 
120 
122  {
123  XHTMLMonitor theMonitor;
125 
126  StatisticsReporterPtr statReporter = sharedResources_->statisticsReporter_;
127 
128  // Create the body with the standard header
129  XHTMLMaker::Node* body = createWebPageBody(maker, "Files",
130  statReporter->getStateMachineMonitorCollection());
131 
132  addDOMforFiles(maker, body, statReporter->getFilesMonitorCollection());
133 
134  addDOMforHyperLinks(maker, body);
135 
136  // Dump the webpage to the output stream
137  maker.out(*out);
138  }
139 
140 
142  {
143  const StateMachineMonitorCollection& stateMachineMonitorCollection =
144  sharedResources_->statisticsReporter_->getStateMachineMonitorCollection();
145 
146  std::string errorMsg;
147  stateMachineMonitorCollection.statusMessage(errorMsg);
148 
150  stateMachineMonitorCollection.externallyVisibleState(),
151  stateMachineMonitorCollection.innerStateName(),
152  errorMsg,
153  sharedResources_->statisticsReporter_,
154  sharedResources_->registrationCollection_,
155  sharedResources_->eventQueueCollection_,
156  sharedResources_->dqmEventQueueCollection_
157  );
158  }
159 
160 
162  {
163  XHTMLMonitor theMonitor;
165 
166  StatisticsReporterPtr statReporter = sharedResources_->statisticsReporter_;
167 
168  // Create the body with the standard header
169  XHTMLMaker::Node* body = createWebPageBody(maker, "Resource Broker Overview",
170  statReporter->getStateMachineMonitorCollection());
171 
172  addOutputModuleTables(maker, body,
173  statReporter->getDataSenderMonitorCollection());
174 
175  maker.addNode("hr", body);
176 
177  addResourceBrokerList(maker, body,
178  statReporter->getDataSenderMonitorCollection());
179 
180  addDOMforHyperLinks(maker, body);
181 
182  // Dump the webpage to the output stream
183  maker.out(*out);
184  }
185 
186 
188  (
189  xgi::Output *out,
190  const long long& uniqueRBID
191  ) const
192  {
193  XHTMLMonitor theMonitor;
195 
196  StatisticsReporterPtr statReporter = sharedResources_->statisticsReporter_;
197 
198  // Create the body with the standard header
199  std::ostringstream pageTitle;
200  pageTitle << "Resource Broker " << uniqueRBID << " Detail";
201  XHTMLMaker::Node* body = createWebPageBody(maker, pageTitle.str(),
202  statReporter->getStateMachineMonitorCollection());
203 
204  addResourceBrokerDetails(maker, body, uniqueRBID,
205  statReporter->getDataSenderMonitorCollection());
206 
207  addOutputModuleStatistics(maker, body, uniqueRBID,
208  statReporter->getDataSenderMonitorCollection());
209 
210  addFilterUnitList(maker, body, uniqueRBID,
211  statReporter->getDataSenderMonitorCollection());
212 
213  addDOMforHyperLinks(maker, body);
214 
215  // Dump the webpage to the output stream
216  maker.out(*out);
217  }
218 
219 
221  {
222  XHTMLMonitor theMonitor;
224 
225  StatisticsReporterPtr statReporter = sharedResources_->statisticsReporter_;
226 
227  // Create the body with the standard header
228  XHTMLMaker::Node* body = createWebPageBody(maker, "DQM Event Processor",
229  statReporter->getStateMachineMonitorCollection());
230 
231  addDOMforProcessedDQMEvents(maker, body, statReporter->getDQMEventMonitorCollection());
232  addDOMforDQMEventStatistics(maker, body, statReporter->getDQMEventMonitorCollection());
233 
234  addDOMforHyperLinks(maker, body);
235 
236  // Dump the webpage to the output stream
237  maker.out(*out);
238  }
239 
240 
242  {
243  XHTMLMonitor theMonitor;
245 
246  StatisticsReporterPtr statReporter = sharedResources_->statisticsReporter_;
247 
248  // Create the body with the standard header
249  XHTMLMaker::Node* body = createWebPageBody(maker, "Throughput",
250  statReporter->getStateMachineMonitorCollection());
251 
252  addDOMforThroughputStatistics(maker, body, statReporter->getThroughputMonitorCollection());
253 
254  addDOMforHyperLinks(maker, body);
255 
256  // Dump the webpage to the output stream
257  maker.out(*out);
258  }
259 
260 
262  (
263  XHTMLMaker& maker,
264  const std::string& pageTitle,
265  const StateMachineMonitorCollection& stateMachineMonitorCollection
266  ) const
267  {
268  std::string errorMsg;
269  stateMachineMonitorCollection.statusMessage(errorMsg);
270 
272  maker,
273  pageTitle,
274  stateMachineMonitorCollection.externallyVisibleState(),
275  stateMachineMonitorCollection.innerStateName(),
276  errorMsg
277  );
278  }
279 
280 
282  (
283  XHTMLMaker& maker,
285  ) const
286  {
287  std::string url = appDescriptor_->getContextDescriptor()->getURL()
288  + "/" + appDescriptor_->getURN();
289 
290  XHTMLMaker::AttrMap linkAttr;
292 
293  maker.addNode("hr", parent);
294 
295  linkAttr[ "href" ] = url;
296  link = maker.addNode("a", parent, linkAttr);
297  maker.addText(link, "Main web page");
298 
299  maker.addNode("hr", parent);
300 
301  linkAttr[ "href" ] = url + "/input";
302  link = maker.addNode("a", parent, linkAttr);
303  maker.addText(link, "I2O input web page");
304 
305  maker.addNode("hr", parent);
306 
307  linkAttr[ "href" ] = url + "/storedData";
308  link = maker.addNode("a", parent, linkAttr);
309  maker.addText(link, "Stored data web page");
310 
311  maker.addNode("hr", parent);
312 
313  linkAttr[ "href" ] = url + "/rbsenderlist";
314  link = maker.addNode("a", parent, linkAttr);
315  maker.addText(link, "RB Sender list web page");
316 
317  maker.addNode("hr", parent);
318 
319  linkAttr[ "href" ] = url + "/fileStatistics";
320  link = maker.addNode("a", parent, linkAttr);
321  maker.addText(link, "File Statistics web page");
322 
323  maker.addNode("hr", parent);
324 
325  linkAttr[ "href" ] = url + "/consumerStatistics";
326  link = maker.addNode("a", parent, linkAttr);
327  maker.addText(link, "Consumer Statistics");
328 
329  maker.addNode("hr", parent);
330 
331  linkAttr[ "href" ] = url + "/dqmEventStatistics";
332  link = maker.addNode("a", parent, linkAttr);
333  maker.addText(link, "DQM event processor statistics");
334 
335  maker.addNode("hr", parent);
336 
337  linkAttr[ "href" ] = url + "/throughputStatistics";
338  link = maker.addNode("a", parent, linkAttr);
339  maker.addText(link, "Throughput statistics");
340 
341  maker.addNode("hr", parent);
342  }
343 
344 
346  (
347  XHTMLMaker& maker,
348  XHTMLMaker::Node *parent,
349  ResourceMonitorCollection const& rmc,
350  ThroughputMonitorCollection const& tmc
351  ) const
352  {
354  rmc.getStats(rmcStats);
355 
357  tmc.getStats(tmcStats,10);
358 
359  XHTMLMaker::AttrMap halfWidthAttr;
360  halfWidthAttr[ "width" ] = "50%";
361 
362  XHTMLMaker::Node* table = maker.addNode("table", parent, tableAttr_);
363 
364  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
365 
366  XHTMLMaker::Node* tableDiv = maker.addNode("td", tableRow, halfWidthAttr);
367  addTableForResourceUsages(maker, tableDiv, tmcStats, rmcStats);
368 
369  tableDiv = maker.addNode("td", tableRow, halfWidthAttr);
370  addTableForDiskUsages(maker, tableDiv, rmcStats);
371  }
372 
373 
375  (
376  XHTMLMaker& maker,
377  XHTMLMaker::Node *parent,
378  ThroughputMonitorCollection::Stats const& tmcStats,
379  ResourceMonitorCollection::Stats const& rmcStats
380  ) const
381  {
382  XHTMLMaker::AttrMap colspanAttr;
383  colspanAttr[ "colspan" ] = "2";
384 
385  XHTMLMaker::Node* table = maker.addNode("table", parent, tableAttr_);
386  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
387  XHTMLMaker::Node* tableDiv = maker.addNode("th", tableRow, colspanAttr);
388  maker.addText(tableDiv, "Resource Usage");
389 
390  addRowsForThroughputUsage(maker, table, tmcStats);
391  addRowsForWorkers(maker, table, rmcStats);
392  addRowsForSataBeast(maker, table, rmcStats);
393  }
394 
395 
397  (
398  XHTMLMaker& maker,
401  ) const
402  {
403  XHTMLMaker::AttrMap tableLabelAttr = tableLabelAttr_;
404  tableLabelAttr[ "width" ] = "54%";
405 
406  XHTMLMaker::AttrMap tableValueAttr = tableValueAttr_;
407  tableValueAttr[ "width" ] = "46%";
408 
409  // Memory pool usage
410  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
411  XHTMLMaker::Node* tableDiv = maker.addNode("td", tableRow);
412  maker.addText(tableDiv, "Memory pool used (kB)");
413  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
414  maker.addDouble( tableDiv, stats.average.poolUsage / (double)0x400, 0 );
415 
416  // Input thread
417  tableRow = maker.addNode("tr", table, rowAttr_);
418  tableDiv = maker.addNode("td", tableRow);
419  maker.addText(tableDiv, "Input thread busy (%)");
420  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
421  maker.addDouble( tableDiv, stats.average.fragmentProcessorBusy, 0 );
422 
423  // Disk writing thread
424  tableRow = maker.addNode("tr", table, rowAttr_);
425  tableDiv = maker.addNode("td", tableRow);
426  maker.addText(tableDiv, "Disk writing thread busy (%)");
427  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
428  maker.addDouble( tableDiv, stats.average.diskWriterBusy, 0 );
429 
430  // DQM summing thread
431  tableRow = maker.addNode("tr", table, rowAttr_);
432  tableDiv = maker.addNode("td", tableRow);
433  maker.addText(tableDiv, "DQM summing thread busy (%)");
434  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
435  maker.addDouble( tableDiv, stats.average.dqmEventProcessorBusy, 0 );
436  }
437 
438 
440  (
441  XHTMLMaker& maker,
442  XHTMLMaker::Node *table,
444  ) const
445  {
446  XHTMLMaker::AttrMap tableValueAttr = tableValueAttr_;
447  tableValueAttr[ "width" ] = "46%";
448 
449  // # copy worker
450  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
451  XHTMLMaker::Node* tableDiv = maker.addNode("td", tableRow);
452  maker.addText(tableDiv, "# CopyWorker");
453  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
454  maker.addInt( tableDiv, stats.numberOfCopyWorkers );
455 
456  // # inject worker
457  tableRow = maker.addNode("tr", table, rowAttr_);
458  tableDiv = maker.addNode("td", tableRow);
459  maker.addText(tableDiv, "# InjectWorker");
460  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
461  maker.addInt( tableDiv, stats.numberOfInjectWorkers );
462  }
463 
464 
466  (
467  XHTMLMaker& maker,
468  XHTMLMaker::Node *table,
470  ) const
471  {
472  XHTMLMaker::AttrMap tableValueAttr = tableValueAttr_;
473  tableValueAttr[ "width" ] = "46%";
474 
475  XHTMLMaker::Node *tableRow, *tableDiv;
476 
477  XHTMLMaker::AttrMap warningAttr = rowAttr_;
478 
479  if (stats.sataBeastStatus < 0 )
480  {
481  warningAttr[ "bgcolor" ] = alarmColors_.find(AlarmHandler::WARNING)->second;
482 
483  XHTMLMaker::AttrMap colspanAttr = tableLabelAttr_;
484  colspanAttr[ "colspan" ] = "2";
485 
486  tableRow = maker.addNode("tr", table, warningAttr);
487  tableDiv = maker.addNode("td", tableRow, colspanAttr);
488  maker.addText(tableDiv, "No SATA disks found");
489  }
490  else
491  {
492  if ( stats.sataBeastStatus > 0 )
493  warningAttr[ "bgcolor" ] = alarmColors_.find(AlarmHandler::ERROR)->second;
494  tableRow = maker.addNode("tr", table, warningAttr);
495  tableDiv = maker.addNode("td", tableRow);
496  maker.addText(tableDiv, "SATA beast status");
497  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
498  maker.addInt( tableDiv, stats.sataBeastStatus );
499  }
500  }
501 
502 
504  (
505  XHTMLMaker& maker,
506  XHTMLMaker::Node *parent,
508  ) const
509  {
510  XHTMLMaker::AttrMap colspanAttr;
511  colspanAttr[ "colspan" ] = "2";
512 
513  XHTMLMaker::AttrMap tableLabelAttr = tableLabelAttr_;
514  tableLabelAttr[ "width" ] = "54%";
515 
516  XHTMLMaker::AttrMap tableValueAttr = tableValueAttr_;
517  tableValueAttr[ "width" ] = "46%";
518 
519  XHTMLMaker::AttrMap warningAttr = rowAttr_;
520 
521  XHTMLMaker::Node* table = maker.addNode("table", parent, tableAttr_);
522  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
523  XHTMLMaker::Node* tableDiv = maker.addNode("th", tableRow, colspanAttr);
524  maker.addText(tableDiv, "Disk Space Usage");
525 
526 
527  for (ResourceMonitorCollection::DiskUsageStatsPtrList::const_iterator
528  it = stats.diskUsageStatsList.begin(),
529  itEnd = stats.diskUsageStatsList.end();
530  it != itEnd;
531  ++it)
532  {
533  warningAttr[ "bgcolor" ] = alarmColors_.find( (*it)->alarmState )->second;
534  tableRow = maker.addNode("tr", table, warningAttr);
535  tableDiv = maker.addNode("td", tableRow);
536  maker.addText(tableDiv, (*it)->pathName);
537  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
538  if ( (*it)->diskSize > 0 )
539  {
540  std::ostringstream tmpString;
541  tmpString << std::fixed << std::setprecision(0) <<
542  (*it)->relDiskUsage << "% (" <<
543  (*it)->absDiskUsage << " of " <<
544  (*it)->diskSize << " GB)";
545  maker.addText(tableDiv, tmpString.str());
546  }
547  else
548  {
549  maker.addText(tableDiv, "not mounted");
550  }
551  }
552  }
553 
554 
556  (
557  XHTMLMaker& maker,
558  XHTMLMaker::Node *parent,
559  DataSenderMonitorCollection const& dsmc,
560  StreamsMonitorCollection const& smc,
561  EventConsumerMonitorCollection const& ecmc,
562  DQMEventMonitorCollection const& dmc,
563  RegistrationCollectionPtr registrationCollection
564  ) const
565  {
568 
570  smc.getStreamRecords(streamRecords);
571 
572  XHTMLMaker::AttrMap colspanAttr;
573  colspanAttr[ "colspan" ] = "6";
574 
575  XHTMLMaker::AttrMap bandwidthColspanAttr;
576  bandwidthColspanAttr[ "colspan" ] = "3";
577 
578  XHTMLMaker::AttrMap tableValueWidthAttr;
579  tableValueWidthAttr[ "width" ] = "15%";
580 
581  XHTMLMaker::AttrMap rowspanAttr = tableValueWidthAttr;
582  rowspanAttr[ "rowspan" ] = "2";
583  rowspanAttr[ "valign" ] = "top";
584 
585  XHTMLMaker::Node* table = maker.addNode("table", parent, tableAttr_);
586 
587  // Summary header
588  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
589  XHTMLMaker::Node* tableDiv = maker.addNode("th", tableRow, colspanAttr);
590  maker.addText(tableDiv, "Data Flow Summary");
591 
592  // Parameter/Value header
593  tableRow = maker.addNode("tr", table, rowAttr_);
594  tableDiv = maker.addNode("th", tableRow, rowspanAttr);
595  maker.addText(tableDiv, "Output Module");
596  tableDiv = maker.addNode("th", tableRow, rowspanAttr);
597  maker.addText(tableDiv, "Event size (kB)");
598  tableDiv = maker.addNode("th", tableRow, rowspanAttr);
599  maker.addText(tableDiv, "Rate (Hz)");
600  tableDiv = maker.addNode("th", tableRow, bandwidthColspanAttr);
601  maker.addText(tableDiv, "Bandwidth (MB/s)");
602 
603  tableRow = maker.addNode("tr", table, rowAttr_);
604  tableDiv = maker.addNode("th", tableRow, tableValueWidthAttr);
605  maker.addText(tableDiv, "Input");
606  tableDiv = maker.addNode("th", tableRow, tableValueWidthAttr);
607  maker.addText(tableDiv, "To disk");
608  tableDiv = maker.addNode("th", tableRow, tableValueWidthAttr);
609  maker.addText(tableDiv, "To consumers");
610 
611 
612  if (resultsList.empty())
613  {
614  XHTMLMaker::AttrMap messageAttr = colspanAttr;
615  messageAttr[ "align" ] = "center";
616 
617  tableRow = maker.addNode("tr", table, rowAttr_);
618  tableDiv = maker.addNode("td", tableRow, messageAttr);
619  maker.addText(tableDiv, "No output modules are available yet.");
620  return;
621  }
622  else
623  {
624  double totalInputBandwidth = 0;
625  double totalDiskBandwidth = 0;
626  double totalConsumerBandwidth = 0;
627 
628  for (
629  DataSenderMonitorCollection::OutputModuleResultsList::const_iterator
630  it = resultsList.begin(), itEnd = resultsList.end();
631  it != itEnd; ++it
632  )
633  {
634  const std::string outputModuleLabel = (*it)->name;
635 
636  const double inputBandwidth =
637  (*it)->eventStats.getValueRate(MonitoredQuantity::RECENT)/(double)0x100000;
638  totalInputBandwidth += inputBandwidth;
639 
641  double diskBandwidth = 0;
642  if ( smc.getStreamRecordsForOutputModuleLabel(outputModuleLabel, streamRecords) )
643  {
644  for (
645  StreamsMonitorCollection::StreamRecordList::const_iterator
646  it = streamRecords.begin(), itEnd = streamRecords.end();
647  it != itEnd; ++it
648  )
649  {
650  MonitoredQuantity::Stats streamBandwidthStats;
651  (*it)->bandwidth.getStats(streamBandwidthStats);
652  diskBandwidth += streamBandwidthStats.getValueRate(MonitoredQuantity::RECENT);
653  }
654  totalDiskBandwidth += diskBandwidth;
655  }
656  else
657  {
658  diskBandwidth = -1;
659  }
660 
661  const double consumerBandwidth =
662  getServedConsumerBandwidth(outputModuleLabel,
663  registrationCollection, ecmc);
664  totalConsumerBandwidth += consumerBandwidth;
665 
666  tableRow = maker.addNode("tr", table, rowAttr_);
667 
668  // Output module label
669  tableDiv = maker.addNode("td", tableRow);
670  maker.addText(tableDiv, outputModuleLabel);
671 
672  // event size
673  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
674  maker.addDouble( tableDiv,
675  (*it)->eventStats.getValueAverage(MonitoredQuantity::RECENT)/(double)0x400, 1 );
676 
677  // rate
678  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
679  maker.addDouble( tableDiv,
680  (*it)->eventStats.getSampleRate(MonitoredQuantity::RECENT), 1 );
681 
682  // input b/w
683  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
684  maker.addDouble( tableDiv, inputBandwidth, 1 );
685 
686  // b/w to disk
687  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
688  if ( diskBandwidth < 0 )
689  maker.addText( tableDiv, "not written" );
690  else
691  maker.addDouble( tableDiv, diskBandwidth, 1 );
692 
693  // b/w to consumers
694  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
695  maker.addDouble( tableDiv, consumerBandwidth, 1 );
696  }
697 
698  // DQM
700  dmc.getStats(dqmStats);
701 
702  tableRow = maker.addNode("tr", table, rowAttr_);
703  tableDiv = maker.addNode("td", tableRow);
704  maker.addText(tableDiv, "DQM histograms");
705 
706  // DQM event size
707  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
708  maker.addDouble( tableDiv,
709  dqmStats.dqmEventSizeStats.getValueAverage(MonitoredQuantity::RECENT)/(double)0x400, 1 );
710 
711  // DQM rate
712  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
713  maker.addDouble( tableDiv,
715 
716  // DQM input b/w
717  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
718  const double dqmInputBandwidth = dqmStats.dqmEventSizeStats.getValueRate(MonitoredQuantity::RECENT);
719  totalInputBandwidth += dqmInputBandwidth;
720  maker.addDouble( tableDiv, dqmInputBandwidth, 1 );
721 
722  // DQM b/w to disk
723  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
724  maker.addText( tableDiv, "not written" );
725  // const double dqmDiskBandwidth = dqmStats.writtenDQMEventSizeStats.getValueRate(MonitoredQuantity::RECENT);
726  // totalDiskBandwidth += dqmDiskBandwidth;
727  // maker.addDouble( tableDiv, dqmDiskBandwidth, 1 );
728 
729  // DQM b/w to consumers
730  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
731  const double dqmConsumerBandwidth = dqmStats.servedDQMEventSizeStats.getValueRate(MonitoredQuantity::RECENT);
732  totalConsumerBandwidth += dqmConsumerBandwidth;
733  maker.addDouble( tableDiv, dqmConsumerBandwidth, 1 );
734 
735 
736  // Totals
737  tableRow = maker.addNode("tr", table, specialRowAttr_);
738  tableDiv = maker.addNode("td", tableRow);
739  maker.addText(tableDiv, "Total");
740  tableDiv = maker.addNode("td", tableRow);
741  tableDiv = maker.addNode("td", tableRow);
742  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
743  maker.addDouble( tableDiv, totalInputBandwidth, 1 );
744  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
745  maker.addDouble( tableDiv, totalDiskBandwidth, 1 );
746  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
747  maker.addDouble( tableDiv, totalConsumerBandwidth, 1 );
748  }
749  }
750 
751 
753  (
754  const std::string& label,
755  RegistrationCollectionPtr registrationCollection,
756  const EventConsumerMonitorCollection& eventConsumerCollection
757  ) const
758  {
759  double bandwidth = 0;
760 
762  registrationCollection->getEventConsumers(consumers);
763 
764  for( RegistrationCollection::ConsumerRegistrations::const_iterator
765  it = consumers.begin(), itEnd = consumers.end();
766  it != itEnd; ++it )
767  {
768  if ( (*it)->outputModuleLabel() == label )
769  {
770  // Events served:
771  MonitoredQuantity::Stats servedStats;
772  if ( eventConsumerCollection.getServed( (*it)->queueId(), servedStats ) )
773  {
774  bandwidth += servedStats.getValueRate(MonitoredQuantity::RECENT);
775  }
776  }
777  }
778 
779  return ( bandwidth/(double)0x100000 );
780  }
781 
782 
784  (
785  XHTMLMaker& maker,
786  XHTMLMaker::Node *parent,
788  ) const
789  {
791  fmc.getStats(stats);
792 
793  XHTMLMaker::AttrMap colspanAttr;
794  colspanAttr[ "colspan" ] = "4";
795 
796  XHTMLMaker::Node* table = maker.addNode("table", parent, tableAttr_);
797 
798  // Received Data Statistics header
799  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
800  XHTMLMaker::Node* tableDiv = maker.addNode("th", tableRow, colspanAttr);
801  maker.addText(tableDiv, "Received I2O Frames");
802 
803  // Parameter/Value header
804  tableRow = maker.addNode("tr", table, rowAttr_);
805  tableDiv = maker.addNode("th", tableRow);
806  maker.addText(tableDiv, "Parameter");
807  tableDiv = maker.addNode("th", tableRow);
808  maker.addText(tableDiv, "Total");
809  tableDiv = maker.addNode("th", tableRow);
810  maker.addText(tableDiv, "Events");
811  tableDiv = maker.addNode("th", tableRow);
812  maker.addText(tableDiv, "DQM histos");
813 
814  addFragmentStats(maker, table, stats, MonitoredQuantity::FULL);
815 
816  addFragmentStats(maker, table, stats, MonitoredQuantity::RECENT);
817  }
818 
820  (
821  XHTMLMaker& maker,
822  XHTMLMaker::Node *table,
824  const MonitoredQuantity::DataSetType dataSet
825  ) const
826  {
827  // Mean performance header
828  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
829  XHTMLMaker::Node* tableDiv = maker.addNode("th", tableRow);
830  if ( dataSet == MonitoredQuantity::FULL )
831  maker.addText(tableDiv, "Performance for full run");
832  else
833  maker.addText(tableDiv, "Recent performance for last");
834 
835  addDurationToTableHead(maker, tableRow,
836  stats.allFragmentSizeStats.getDuration(dataSet));
837  addDurationToTableHead(maker, tableRow,
838  stats.eventFragmentSizeStats.getDuration(dataSet));
839  addDurationToTableHead(maker, tableRow,
840  stats.dqmEventFragmentSizeStats.getDuration(dataSet));
841 
842  addRowForFramesReceived(maker, table, stats, dataSet);
843  addRowForBandwidth(maker, table, stats, dataSet);
844  addRowForRate(maker, table, stats, dataSet);
845  addRowForLatency(maker, table, stats, dataSet);
846  if ( dataSet == MonitoredQuantity::FULL )
847  {
848  addRowForTotalVolume(maker, table, stats, dataSet);
849  }
850  else
851  {
852  addRowForMaxBandwidth(maker, table, stats, dataSet);
853  addRowForMinBandwidth(maker, table, stats, dataSet);
854  }
855  }
856 
857 
859  (
860  XHTMLMaker& maker,
861  XHTMLMaker::Node *table,
863  const MonitoredQuantity::DataSetType dataSet
864  ) const
865  {
866  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
867  XHTMLMaker::Node* tableDiv = maker.addNode("td", tableRow);
868  maker.addText(tableDiv, "Frames Received");
869  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
870  maker.addInt( tableDiv, stats.allFragmentSizeStats.getSampleCount(dataSet) );
871  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
872  maker.addInt( tableDiv, stats.eventFragmentSizeStats.getSampleCount(dataSet) );
873  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
874  maker.addInt( tableDiv, stats.dqmEventFragmentSizeStats.getSampleCount(dataSet) );
875  }
876 
877 
879  (
880  XHTMLMaker& maker,
881  XHTMLMaker::Node *table,
883  const MonitoredQuantity::DataSetType dataSet
884  ) const
885  {
886  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
887  XHTMLMaker::Node* tableDiv = maker.addNode("td", tableRow);
888  maker.addText(tableDiv, "Bandwidth (MB/s)");
889  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
890  maker.addDouble( tableDiv, stats.allFragmentSizeStats.getValueRate(dataSet) );
891  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
892  maker.addDouble( tableDiv, stats.eventFragmentSizeStats.getValueRate(dataSet) );
893  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
894  maker.addDouble( tableDiv, stats.dqmEventFragmentSizeStats.getValueRate(dataSet) );
895  }
896 
897 
899  (
900  XHTMLMaker& maker,
901  XHTMLMaker::Node *table,
903  const MonitoredQuantity::DataSetType dataSet
904  ) const
905  {
906  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
907  XHTMLMaker::Node* tableDiv = maker.addNode("td", tableRow);
908  maker.addText(tableDiv, "Rate (frames/s)");
909  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
910  maker.addDouble( tableDiv, stats.allFragmentSizeStats.getSampleRate(dataSet) );
911  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
912  maker.addDouble( tableDiv, stats.eventFragmentSizeStats.getSampleRate(dataSet) );
913  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
914  maker.addDouble( tableDiv, stats.dqmEventFragmentSizeStats.getSampleRate(dataSet) );
915  }
916 
917 
919  (
920  XHTMLMaker& maker,
921  XHTMLMaker::Node *table,
923  const MonitoredQuantity::DataSetType dataSet
924  ) const
925  {
926  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
927  XHTMLMaker::Node* tableDiv = maker.addNode("td", tableRow);
928  maker.addText(tableDiv, "Latency (us/frame)");
929  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
930  maker.addDouble( tableDiv, stats.allFragmentSizeStats.getSampleLatency(dataSet) );
931  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
932  maker.addDouble( tableDiv, stats.eventFragmentSizeStats.getSampleLatency(dataSet) );
933  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
934  maker.addDouble( tableDiv, stats.dqmEventFragmentSizeStats.getSampleLatency(dataSet) );
935  }
936 
937 
939  (
940  XHTMLMaker& maker,
941  XHTMLMaker::Node *table,
943  const MonitoredQuantity::DataSetType dataSet
944  ) const
945  {
946  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
947  XHTMLMaker::Node* tableDiv = maker.addNode("td", tableRow);
948  maker.addText(tableDiv, "Total volume received (MB)");
949  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
950  maker.addDouble( tableDiv, stats.allFragmentSizeStats.getValueSum(dataSet), 3 );
951  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
952  maker.addDouble( tableDiv, stats.eventFragmentSizeStats.getValueSum(dataSet), 3 );
953  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
954  maker.addDouble( tableDiv, stats.dqmEventFragmentSizeStats.getValueSum(dataSet), 3 );
955  }
956 
957 
959  (
960  XHTMLMaker& maker,
961  XHTMLMaker::Node *table,
963  const MonitoredQuantity::DataSetType dataSet
964  ) const
965  {
966  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
967  XHTMLMaker::Node* tableDiv = maker.addNode("td", tableRow);
968  maker.addText(tableDiv, "Maximum Bandwidth (MB/s)");
969  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
970  maker.addDouble( tableDiv, stats.allFragmentBandwidthStats.getValueMax(dataSet) );
971  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
972  maker.addDouble( tableDiv, stats.eventFragmentBandwidthStats.getValueMax(dataSet) );
973  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
974  maker.addDouble( tableDiv, stats.dqmEventFragmentBandwidthStats.getValueMax(dataSet) );
975  }
976 
977 
979  (
980  XHTMLMaker& maker,
981  XHTMLMaker::Node *table,
983  const MonitoredQuantity::DataSetType dataSet
984  ) const
985  {
986  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
987  XHTMLMaker::Node* tableDiv = maker.addNode("td", tableRow);
988  maker.addText(tableDiv, "Minimum Bandwidth (MB/s)");
989  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
990  maker.addDouble( tableDiv, stats.allFragmentBandwidthStats.getValueMin(dataSet) );
991  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
992  maker.addDouble( tableDiv, stats.eventFragmentBandwidthStats.getValueMin(dataSet) );
993  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
994  maker.addDouble( tableDiv, stats.dqmEventFragmentBandwidthStats.getValueMin(dataSet) );
995  }
996 
997 
999  (
1000  XHTMLMaker& maker,
1001  XHTMLMaker::Node *parent,
1002  RunMonitorCollection const& rmc
1003  ) const
1004  {
1005  MonitoredQuantity::Stats eventIDsReceivedStats;
1006  rmc.getEventIDsReceivedMQ().getStats(eventIDsReceivedStats);
1007  MonitoredQuantity::Stats errorEventIDsReceivedStats;
1008  rmc.getErrorEventIDsReceivedMQ().getStats(errorEventIDsReceivedStats);
1009  MonitoredQuantity::Stats unwantedEventIDsReceivedStats;
1010  rmc.getUnwantedEventIDsReceivedMQ().getStats(unwantedEventIDsReceivedStats);
1011  MonitoredQuantity::Stats runNumbersSeenStats;
1012  rmc.getRunNumbersSeenMQ().getStats(runNumbersSeenStats);
1013  MonitoredQuantity::Stats lumiSectionsSeenStats;
1014  rmc.getLumiSectionsSeenMQ().getStats(lumiSectionsSeenStats);
1015  MonitoredQuantity::Stats eolsSeenStats;
1016  rmc.getEoLSSeenMQ().getStats(eolsSeenStats);
1017 
1018  XHTMLMaker::AttrMap colspanAttr;
1019  colspanAttr[ "colspan" ] = "6";
1020 
1021  XHTMLMaker::AttrMap tableValueAttr = tableValueAttr_;
1022  tableValueAttr[ "width" ] = "16%";
1023 
1024  XHTMLMaker::Node* table = maker.addNode("table", parent, tableAttr_);
1025 
1026  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
1027  XHTMLMaker::Node* tableDiv = maker.addNode("th", tableRow, colspanAttr);
1028  maker.addText(tableDiv, "Storage Manager Statistics");
1029 
1030  // Run number and lumi section
1031  tableRow = maker.addNode("tr", table, rowAttr_);
1032  tableDiv = maker.addNode("td", tableRow);
1033  maker.addText(tableDiv, "Run number");
1034  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1035  maker.addDouble( tableDiv, runNumbersSeenStats.getLastSampleValue(), 0 );
1036  tableDiv = maker.addNode("td", tableRow);
1037  maker.addText(tableDiv, "Current lumi section");
1038  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1039  maker.addDouble( tableDiv, lumiSectionsSeenStats.getLastSampleValue(), 0 );
1040  tableDiv = maker.addNode("td", tableRow);
1041  maker.addText(tableDiv, "Last EoLS");
1042  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1043  maker.addDouble( tableDiv, eolsSeenStats.getLastSampleValue(), 0 );
1044 
1045  // Total events received
1046  tableRow = maker.addNode("tr", table, specialRowAttr_);
1047  tableDiv = maker.addNode("td", tableRow);
1048  maker.addText(tableDiv, "Events received (non-unique)");
1049  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1050  maker.addInt( tableDiv, eventIDsReceivedStats.getSampleCount() );
1051  tableDiv = maker.addNode("td", tableRow);
1052  maker.addText(tableDiv, "Error events received");
1053  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1054  maker.addInt( tableDiv, errorEventIDsReceivedStats.getSampleCount() );
1055  tableDiv = maker.addNode("td", tableRow);
1056  maker.addText(tableDiv, "Unwanted events received");
1057  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1058  maker.addInt( tableDiv, unwantedEventIDsReceivedStats.getSampleCount() );
1059 
1060  // Last event IDs
1061  tableRow = maker.addNode("tr", table, rowAttr_);
1062  tableDiv = maker.addNode("td", tableRow);
1063  maker.addText(tableDiv, "Last event ID");
1064  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1065  maker.addDouble( tableDiv, eventIDsReceivedStats.getLastSampleValue(), 0 );
1066  tableDiv = maker.addNode("td", tableRow);
1067  maker.addText(tableDiv, "Last error event ID");
1068  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1069  maker.addDouble( tableDiv, errorEventIDsReceivedStats.getLastSampleValue(), 0 );
1070  tableDiv = maker.addNode("td", tableRow);
1071  maker.addText(tableDiv, "Last unwanted event ID");
1072  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1073  maker.addDouble( tableDiv, unwantedEventIDsReceivedStats.getLastSampleValue(), 0 );
1074  }
1075 
1076 
1078  (
1079  XHTMLMaker& maker,
1080  XHTMLMaker::Node *parent,
1081  StreamsMonitorCollection const& smc
1082  ) const
1083  {
1084  MonitoredQuantity::Stats allStreamsVolumeStats;
1085  smc.getAllStreamsVolumeMQ().getStats(allStreamsVolumeStats);
1086 
1087  XHTMLMaker::AttrMap tableValueWidthAttr;
1088  tableValueWidthAttr[ "width" ] = "11%";
1089 
1090  XHTMLMaker::AttrMap rowspanAttr = tableValueWidthAttr;
1091  rowspanAttr[ "rowspan" ] = "2";
1092  rowspanAttr[ "valign" ] = "top";
1093 
1094  XHTMLMaker::AttrMap colspanAttr;
1095  colspanAttr[ "colspan" ] = "9";
1096 
1097  XHTMLMaker::AttrMap bandwidthColspanAttr;
1098  bandwidthColspanAttr[ "colspan" ] = "4";
1099 
1100  XHTMLMaker::Node* table = maker.addNode("table", parent, tableAttr_);
1101 
1102  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
1103  XHTMLMaker::Node* tableDiv = maker.addNode("th", tableRow, colspanAttr);
1104  maker.addText(tableDiv, "Stored Data Statistics");
1105 
1106  // Header
1107  tableRow = maker.addNode("tr", table, specialRowAttr_);
1108  tableDiv = maker.addNode("th", tableRow, rowspanAttr);
1109  maker.addText(tableDiv, "Stream");
1110  tableDiv = maker.addNode("th", tableRow, rowspanAttr);
1111  maker.addText(tableDiv, "Fraction to disk");
1112  tableDiv = maker.addNode("th", tableRow, rowspanAttr);
1113  maker.addText(tableDiv, "Files");
1114  tableDiv = maker.addNode("th", tableRow, rowspanAttr);
1115  maker.addText(tableDiv, "Events");
1116  tableDiv = maker.addNode("th", tableRow, rowspanAttr);
1117  maker.addText(tableDiv, "Events/s");
1118  tableDiv = maker.addNode("th", tableRow, rowspanAttr);
1119  maker.addText(tableDiv, "Volume (MB)");
1120  tableDiv = maker.addNode("th", tableRow, bandwidthColspanAttr);
1121  maker.addText(tableDiv, "Bandwidth (MB/s)");
1122 
1123  tableRow = maker.addNode("tr", table, specialRowAttr_);
1124  tableDiv = maker.addNode("th", tableRow, tableValueWidthAttr);
1125  maker.addText(tableDiv, "average");
1126  tableDiv = maker.addNode("th", tableRow, tableValueWidthAttr);
1127  maker.addText(tableDiv, "min");
1128  tableDiv = maker.addNode("th", tableRow, tableValueWidthAttr);
1129  maker.addText(tableDiv, "max");
1130 
1131  if (! smc.streamRecordsExist())
1132  {
1133  tableRow = maker.addNode("tr", table, rowAttr_);
1134  tableDiv = maker.addNode("td", tableRow, colspanAttr);
1135  maker.addText(tableDiv, "no streams available yet");
1136  return;
1137  }
1138  // Mean performance
1139  tableRow = maker.addNode("tr", table, rowAttr_);
1140  tableDiv = maker.addNode("th", tableRow, colspanAttr);
1141  {
1142  std::ostringstream tmpString;
1143  tmpString << "Mean performance for " <<
1144  allStreamsVolumeStats.getDuration().total_seconds() << " s";
1145  maker.addText(tableDiv, tmpString.str());
1146  }
1147  listStreamRecordsStats(maker, table, smc, MonitoredQuantity::FULL);
1148 
1149 
1150  // Recent performance
1151  tableRow = maker.addNode("tr", table, rowAttr_);
1152  tableDiv = maker.addNode("th", tableRow, colspanAttr);
1153  {
1154  std::ostringstream tmpString;
1155  tmpString << "Recent performance for the last " <<
1156  allStreamsVolumeStats.getDuration(MonitoredQuantity::RECENT).total_seconds() << " s";
1157  maker.addText(tableDiv, tmpString.str());
1158  }
1159  listStreamRecordsStats(maker, table, smc, MonitoredQuantity::RECENT);
1160  }
1161 
1162 
1164  (
1165  XHTMLMaker& maker,
1166  XHTMLMaker::Node *parent,
1167  DiskWritingParams const& dwParams
1168  ) const
1169  {
1170  XHTMLMaker::Node* table = maker.addNode("table", parent);
1171  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, specialRowAttr_);
1172  XHTMLMaker::Node* tableDiv = maker.addNode("th", tableRow);
1173  maker.addText(tableDiv, "SM Configuration");
1174  tableRow = maker.addNode("tr", table, rowAttr_);
1175  tableDiv = maker.addNode("td", tableRow);
1176  XHTMLMaker::AttrMap textareaAttr;
1177  textareaAttr[ "rows" ] = "10";
1178  textareaAttr[ "cols" ] = "100";
1179  textareaAttr[ "scroll" ] = "yes";
1180  textareaAttr[ "readonly" ];
1181  textareaAttr[ "title" ] = "SM config";
1182  XHTMLMaker::Node* textarea = maker.addNode("textarea", tableDiv, textareaAttr);
1183  maker.addText(textarea, dwParams.streamConfiguration_);
1184  }
1185 
1186 
1188  (
1189  XHTMLMaker& maker,
1190  XHTMLMaker::Node *table,
1191  StreamsMonitorCollection const& smc,
1192  const MonitoredQuantity::DataSetType dataSet
1193  ) const
1194  {
1196  smc.getStreamRecords(streamRecords);
1197  MonitoredQuantity::Stats allStreamsFileCountStats;
1198  smc.getAllStreamsFileCountMQ().getStats(allStreamsFileCountStats);
1199  MonitoredQuantity::Stats allStreamsVolumeStats;
1200  smc.getAllStreamsVolumeMQ().getStats(allStreamsVolumeStats);
1201  MonitoredQuantity::Stats allStreamsBandwidthStats;
1202  smc.getAllStreamsBandwidthMQ().getStats(allStreamsBandwidthStats);
1203 
1204  XHTMLMaker::Node *tableRow, *tableDiv;
1205 
1206  XHTMLMaker::AttrMap tableValueAttr = tableValueAttr_;
1207  tableValueAttr[ "width" ] = "11%";
1208 
1209 
1210  for (
1211  StreamsMonitorCollection::StreamRecordList::const_iterator
1212  it = streamRecords.begin(), itEnd = streamRecords.end();
1213  it != itEnd;
1214  ++it
1215  )
1216  {
1217  MonitoredQuantity::Stats streamFileCountStats;
1218  (*it)->fileCount.getStats(streamFileCountStats);
1219  MonitoredQuantity::Stats streamVolumeStats;
1220  (*it)->volume.getStats(streamVolumeStats);
1221  MonitoredQuantity::Stats streamBandwidthStats;
1222  (*it)->bandwidth.getStats(streamBandwidthStats);
1223 
1224 
1225  tableRow = maker.addNode("tr", table, rowAttr_);
1226  tableDiv = maker.addNode("td", tableRow);
1227  maker.addText(tableDiv, (*it)->streamName);
1228  tableDiv = maker.addNode("td", tableRow);
1229  maker.addDouble(tableDiv, (*it)->fractionToDisk, 2);
1230  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1231  maker.addInt( tableDiv, streamFileCountStats.getSampleCount(dataSet) );
1232  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1233  maker.addInt( tableDiv, streamVolumeStats.getSampleCount(dataSet) );
1234  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1235  maker.addDouble( tableDiv, streamVolumeStats.getSampleRate(dataSet), 1 );
1236  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1237  maker.addDouble( tableDiv, streamVolumeStats.getValueSum(dataSet), 1 );
1238  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1239  maker.addDouble( tableDiv, streamBandwidthStats.getValueRate(dataSet) );
1240  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1241  maker.addDouble( tableDiv, streamBandwidthStats.getValueMin(dataSet) );
1242  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1243  maker.addDouble( tableDiv, streamBandwidthStats.getValueMax(dataSet) );
1244  }
1245 
1246  tableRow = maker.addNode("tr", table, specialRowAttr_);
1247  tableDiv = maker.addNode("td", tableRow);
1248  maker.addText(tableDiv, "Total");
1249  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1250  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1251  maker.addInt( tableDiv, allStreamsFileCountStats.getSampleCount(dataSet) );
1252  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1253  maker.addInt( tableDiv, allStreamsVolumeStats.getSampleCount(dataSet) );
1254  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1255  maker.addDouble( tableDiv, allStreamsVolumeStats.getSampleRate(dataSet), 1 );
1256  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1257  maker.addDouble( tableDiv, allStreamsVolumeStats.getValueSum(dataSet), 1 );
1258  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1259  maker.addDouble( tableDiv, allStreamsBandwidthStats.getValueRate(dataSet) );
1260  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1261  maker.addDouble( tableDiv, allStreamsBandwidthStats.getValueMin(dataSet) );
1262  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1263  maker.addDouble( tableDiv, allStreamsBandwidthStats.getValueMax(dataSet) );
1264  }
1265 
1266 
1268  (
1269  XHTMLMaker& maker,
1270  XHTMLMaker::Node *parent,
1271  FilesMonitorCollection const& fmc
1272  ) const
1273  {
1275  fmc.getFileRecords(fileRecords);
1276 
1277  XHTMLMaker::AttrMap colspanAttr;
1278  colspanAttr[ "colspan" ] = "6";
1279 
1280  XHTMLMaker::AttrMap tableLabelAttr = tableLabelAttr_;
1281  tableLabelAttr[ "align" ] = "center";
1282 
1283  XHTMLMaker::AttrMap tableValueWidthAttr;
1284  tableValueWidthAttr[ "width" ] = "11%";
1285 
1286  XHTMLMaker::AttrMap tableCounterWidthAttr;
1287  tableCounterWidthAttr[ "width" ] = "5%";
1288 
1289  XHTMLMaker::Node* table = maker.addNode("table", parent, tableAttr_);
1290 
1291  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
1292  XHTMLMaker::Node* tableDiv = maker.addNode("th", tableRow, colspanAttr);
1293  maker.addText(tableDiv, "File Statistics (most recent first)");
1294 
1295  // Header
1296  tableRow = maker.addNode("tr", table, specialRowAttr_);
1297  tableDiv = maker.addNode("th", tableRow, tableCounterWidthAttr);
1298  maker.addText(tableDiv, "#");
1299  tableDiv = maker.addNode("th", tableRow);
1300  maker.addText(tableDiv, "Pathname");
1301  tableDiv = maker.addNode("th", tableRow, tableValueWidthAttr);
1302  maker.addText(tableDiv, "Events");
1303  tableDiv = maker.addNode("th", tableRow, tableValueWidthAttr);
1304  maker.addText(tableDiv, "Size (Bytes)");
1305  tableDiv = maker.addNode("th", tableRow, tableValueWidthAttr);
1306  maker.addText(tableDiv, "Closing reason");
1307  tableDiv = maker.addNode("th", tableRow, tableValueWidthAttr);
1308  maker.addText(tableDiv, "Adler32");
1309 
1310  // File list
1311  if (fileRecords.empty())
1312  {
1313  tableRow = maker.addNode("tr", table, rowAttr_);
1314  tableDiv = maker.addNode("td", tableRow, colspanAttr);
1315  maker.addText(tableDiv, "no files available yet");
1316  return;
1317  }
1318 
1319  for (
1320  FilesMonitorCollection::FileRecordList::const_reverse_iterator
1321  it = fileRecords.rbegin(), itEnd = fileRecords.rend();
1322  it != itEnd;
1323  ++it
1324  )
1325  {
1326  tableRow = maker.addNode("tr", table, rowAttr_);
1327  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1328  maker.addInt( tableDiv, (*it)->entryCounter );
1329  tableDiv = maker.addNode("td", tableRow);
1330  maker.addText(tableDiv, (*it)->completeFileName());
1331  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1332  maker.addInt( tableDiv, (*it)->eventCount );
1333  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1334  maker.addInt( tableDiv, (*it)->fileSize );
1335  tableDiv = maker.addNode("td", tableRow, tableLabelAttr);
1336  maker.addText(tableDiv, (*it)->closingReason());
1337  tableDiv = maker.addNode("td", tableRow, tableLabelAttr);
1338  maker.addHex(tableDiv, (*it)->adler32);
1339  }
1340  }
1341 
1342 
1344  (
1345  XHTMLMaker& maker,
1346  XHTMLMaker::Node *parent,
1347  ThroughputMonitorCollection const& tmc
1348  ) const
1349  {
1350  XHTMLMaker::AttrMap colspanAttr;
1351  colspanAttr[ "colspan" ] = "21";
1352 
1353  XHTMLMaker::Node* table = maker.addNode("table", parent, tableAttr_);
1354 
1355  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
1356  XHTMLMaker::Node* tableDiv = maker.addNode("th", tableRow, colspanAttr);
1357  maker.addText(tableDiv, "Throughput Statistics");
1358 
1359  // Header
1360  tableRow = maker.addNode("tr", table, specialRowAttr_);
1361  tableDiv = maker.addNode("th", tableRow);
1362  maker.addText(tableDiv, "Time (UTC)");
1363  tableDiv = maker.addNode("th", tableRow);
1364  maker.addText(tableDiv, "Memory pool usage (bytes)");
1365  tableDiv = maker.addNode("th", tableRow);
1366  maker.addText(tableDiv, "Instantaneous Number of Fragments in Fragment Queue");
1367  tableDiv = maker.addNode("th", tableRow);
1368  maker.addText(tableDiv, "Memory used in Fragment Queue (MB)");
1369  tableDiv = maker.addNode("th", tableRow);
1370  maker.addText(tableDiv, "Number of Fragments Popped from Fragment Queue (Hz)");
1371  tableDiv = maker.addNode("th", tableRow);
1372  maker.addText(tableDiv, "Data Rate Popped from Fragment Queue (MB/sec)");
1373  tableDiv = maker.addNode("th", tableRow);
1374  maker.addText(tableDiv, "Fragment Processor Thread Busy Percentage");
1375  tableDiv = maker.addNode("th", tableRow);
1376  maker.addText(tableDiv, "Instantaneous Number of Events in Fragment Store");
1377  tableDiv = maker.addNode("th", tableRow);
1378  maker.addText(tableDiv, "Memory used in Fragment Store (MB)");
1379  tableDiv = maker.addNode("th", tableRow);
1380  maker.addText(tableDiv, "Instantaneous Number of Events in Stream Queue");
1381  tableDiv = maker.addNode("th", tableRow);
1382  maker.addText(tableDiv, "Memory used in Stream Queue (MB)");
1383  tableDiv = maker.addNode("th", tableRow);
1384  maker.addText(tableDiv, "Number of Events Popped from Stream Queue (Hz)");
1385  tableDiv = maker.addNode("th", tableRow);
1386  maker.addText(tableDiv, "Data Rate Popped from Stream Queue (MB/sec)");
1387  tableDiv = maker.addNode("th", tableRow);
1388  maker.addText(tableDiv, "Disk Writer Thread Busy Percentage");
1389  tableDiv = maker.addNode("th", tableRow);
1390  maker.addText(tableDiv, "Number of Events Written to Disk (Hz)");
1391  tableDiv = maker.addNode("th", tableRow);
1392  maker.addText(tableDiv, "Data Rate to Disk (MB/sec)");
1393  tableDiv = maker.addNode("th", tableRow);
1394  maker.addText(tableDiv, "Instantaneous Number of DQMEvents in DQMEvent Queue");
1395  tableDiv = maker.addNode("th", tableRow);
1396  maker.addText(tableDiv, "Memory used in DQMEvent Queue (MB)");
1397  tableDiv = maker.addNode("th", tableRow);
1398  maker.addText(tableDiv, "Number of DQMEvents Popped from DQMEvent Queue (Hz)");
1399  tableDiv = maker.addNode("th", tableRow);
1400  maker.addText(tableDiv, "Data Rate Popped from DQMEvent Queue (MB/sec)");
1401  tableDiv = maker.addNode("th", tableRow);
1402  maker.addText(tableDiv, "DQMEvent Processor Thread Busy Percentage");
1403 
1405  tmc.getStats(stats);
1406 
1407  addRowForThroughputStatistics(maker, table, stats.average, true);
1408 
1409  for (ThroughputMonitorCollection::Stats::Snapshots::const_iterator
1410  it = stats.snapshots.begin(),
1411  itEnd = stats.snapshots.end();
1412  it != itEnd;
1413  ++it)
1414  {
1415  addRowForThroughputStatistics(maker, table, (*it));
1416  }
1417 
1418  addRowForThroughputStatistics(maker, table, stats.average, true);
1419  }
1420 
1421 
1423  (
1424  XHTMLMaker& maker,
1425  XHTMLMaker::Node* table,
1427  const bool isAverage
1428  ) const
1429  {
1430  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
1431  XHTMLMaker::Node* tableDiv;
1432  XHTMLMaker::AttrMap tableValueAttr = tableValueAttr_;
1433 
1434  if (isAverage)
1435  {
1436  tableValueAttr[ "style" ] = "background-color: yellow;";
1437  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1438  std::ostringstream avg;
1439  avg << "<" << snapshot.duration.total_seconds() << "s>";
1440  maker.addText(tableDiv, avg.str());
1441  }
1442  else
1443  {
1444  tableDiv = maker.addNode("td", tableRow, tableLabelAttr_);
1445  maker.addText( tableDiv, utils::timeStampUTC(snapshot.absoluteTime) );
1446  }
1447 
1448  // memory pool usage
1449  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1450  maker.addDouble( tableDiv, snapshot.poolUsage, 0 );
1451 
1452  // number of fragments in fragment queue
1453  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1454  maker.addDouble( tableDiv, snapshot.entriesInFragmentQueue, 0 );
1455 
1456  // memory used in fragment queue
1457  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1458  maker.addDouble( tableDiv, snapshot.memoryUsedInFragmentQueue, 1 );
1459 
1460  // number of fragments popped from fragment queue
1461  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1462  maker.addDouble( tableDiv, snapshot.fragmentQueueRate, 0 );
1463 
1464  // data rate popped from fragment queue
1465  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1466  maker.addDouble( tableDiv, snapshot.fragmentQueueBandwidth, 1 );
1467 
1468  // fragment processor thread busy percentage
1469  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1470  maker.addDouble( tableDiv, snapshot.fragmentProcessorBusy, 1 );
1471 
1472  // number of events in fragment store
1473  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1474  maker.addDouble( tableDiv, snapshot.fragmentStoreSize, 0 );
1475 
1476  // memory used in fragment store
1477  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1478  maker.addDouble( tableDiv, snapshot.fragmentStoreMemoryUsed, 1 );
1479 
1480  // number of events in stream queue
1481  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1482  maker.addDouble( tableDiv, snapshot.entriesInStreamQueue, 0 );
1483 
1484  // memory used in stream queue
1485  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1486  maker.addDouble( tableDiv, snapshot.memoryUsedInStreamQueue, 1 );
1487 
1488  // number of events popped from stream queue
1489  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1490  maker.addDouble( tableDiv, snapshot.streamQueueRate, 0 );
1491 
1492  // data rate popped from stream queue
1493  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1494  maker.addDouble( tableDiv, snapshot.streamQueueBandwidth, 1 );
1495 
1496  // disk writer thread busy percentage
1497  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1498  maker.addDouble( tableDiv, snapshot.diskWriterBusy, 1 );
1499 
1500  // number of events written to disk
1501  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1502  maker.addDouble( tableDiv, snapshot.writtenEventsRate, 0 );
1503 
1504  // date rate written to disk
1505  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1506  maker.addDouble( tableDiv, snapshot.writtenEventsBandwidth, 1 );
1507 
1508  // number of dqm events in DQMEvent queue
1509  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1510  maker.addDouble( tableDiv, snapshot.entriesInDQMQueue, 0 );
1511 
1512  // memory used in DQMEvent queue
1513  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1514  maker.addDouble( tableDiv, snapshot.memoryUsedInDQMQueue, 1 );
1515 
1516  // number of dqm events popped from DQMEvent queue
1517  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1518  maker.addDouble( tableDiv, snapshot.dqmQueueRate, 0 );
1519 
1520  // data rate popped from DQMEvent queue
1521  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1522  maker.addDouble( tableDiv, snapshot.dqmQueueBandwidth, 1 );
1523 
1524  // DQMEvent processor thread busy percentage
1525  tableDiv = maker.addNode("td", tableRow, tableValueAttr);
1526  maker.addDouble( tableDiv, snapshot.dqmEventProcessorBusy, 1 );
1527  }
1528 
1529 
1531  (
1532  XHTMLMaker& maker,
1533  XHTMLMaker::Node *parent,
1534  DataSenderMonitorCollection const& dsmc
1535  ) const
1536  {
1539 
1540  addOutputModuleSummary(maker, parent, resultsList);
1541  addOutputModuleStatistics(maker, parent, resultsList);
1542  }
1543 
1544 
1546  (
1547  XHTMLMaker& maker,
1548  XHTMLMaker::Node *parent,
1549  long long uniqueRBID,
1550  DataSenderMonitorCollection const& dsmc
1551  ) const
1552  {
1554  dsmc.getOutputModuleResultsForRB(uniqueRBID);
1555 
1556  addOutputModuleStatistics(maker, parent, resultsList);
1557  }
1558 
1559 
1561  (
1562  XHTMLMaker& maker,
1563  XHTMLMaker::Node *parent,
1565  ) const
1566  {
1567  XHTMLMaker::AttrMap colspanAttr;
1568  colspanAttr[ "colspan" ] = "7";
1569 
1570  XHTMLMaker::Node* table = maker.addNode("table", parent, tableAttr_);
1571 
1572  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
1573  XHTMLMaker::Node* tableDiv = maker.addNode("th", tableRow, colspanAttr);
1574  maker.addText(tableDiv, "Received Data Statistics (by output module)");
1575 
1576  // Header
1577  tableRow = maker.addNode("tr", table, specialRowAttr_);
1578  tableDiv = maker.addNode("th", tableRow);
1579  maker.addText(tableDiv, "Output Module");
1580  tableDiv = maker.addNode("th", tableRow);
1581  maker.addText(tableDiv, "Events");
1582  tableDiv = maker.addNode("th", tableRow);
1583  maker.addText(tableDiv, "Size (MB)");
1584  tableDiv = maker.addNode("th", tableRow);
1585  maker.addText(tableDiv, "Size/Evt (KB)");
1586  tableDiv = maker.addNode("th", tableRow);
1587  maker.addText(tableDiv, "RMS (KB)");
1588  tableDiv = maker.addNode("th", tableRow);
1589  maker.addText(tableDiv, "Min (KB)");
1590  tableDiv = maker.addNode("th", tableRow);
1591  maker.addText(tableDiv, "Max (KB)");
1592 
1593  if (resultsList.empty())
1594  {
1595  XHTMLMaker::AttrMap messageAttr = colspanAttr;
1596  messageAttr[ "align" ] = "center";
1597 
1598  tableRow = maker.addNode("tr", table, rowAttr_);
1599  tableDiv = maker.addNode("td", tableRow, messageAttr);
1600  maker.addText(tableDiv, "No output modules are available yet.");
1601  return;
1602  }
1603  else
1604  {
1605  for (unsigned int idx = 0; idx < resultsList.size(); ++idx)
1606  {
1607  std::string outputModuleLabel = resultsList[idx]->name;
1608 
1609  tableRow = maker.addNode("tr", table, rowAttr_);
1610  tableDiv = maker.addNode("td", tableRow);
1611  maker.addText(tableDiv, outputModuleLabel);
1612  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1613  maker.addInt( tableDiv, resultsList[idx]->eventStats.getSampleCount() );
1614  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1615  maker.addDouble( tableDiv,
1616  resultsList[idx]->eventStats.getValueSum()/(double)0x100000 );
1617  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1618  maker.addDouble( tableDiv,
1619  resultsList[idx]->eventStats.getValueAverage()/(double)0x400 );
1620  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1621  maker.addDouble( tableDiv,
1622  resultsList[idx]->eventStats.getValueRMS()/(double)0x400 );
1623  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1624  maker.addDouble( tableDiv,
1625  resultsList[idx]->eventStats.getValueMin()/(double)0x400 );
1626  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1627  maker.addDouble( tableDiv,
1628  resultsList[idx]->eventStats.getValueMax()/(double)0x400 );
1629  }
1630  }
1631  }
1632 
1633 
1635  (
1636  XHTMLMaker& maker,
1637  XHTMLMaker::Node *parent,
1639  ) const
1640  {
1641  XHTMLMaker::AttrMap colspanAttr;
1642  colspanAttr[ "colspan" ] = "3";
1643 
1644  XHTMLMaker::Node* table = maker.addNode("table", parent, tableAttr_);
1645 
1646  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
1647  XHTMLMaker::Node* tableDiv = maker.addNode("th", tableRow, colspanAttr);
1648  maker.addText(tableDiv, "Output Module Summary");
1649 
1650  // Header
1651  tableRow = maker.addNode("tr", table, specialRowAttr_);
1652  tableDiv = maker.addNode("th", tableRow);
1653  maker.addText(tableDiv, "Name");
1654  tableDiv = maker.addNode("th", tableRow);
1655  maker.addText(tableDiv, "ID");
1656  tableDiv = maker.addNode("th", tableRow);
1657  maker.addText(tableDiv, "Header Size (bytes)");
1658 
1659  if (resultsList.empty())
1660  {
1661  XHTMLMaker::AttrMap messageAttr = colspanAttr;
1662  messageAttr[ "align" ] = "center";
1663 
1664  tableRow = maker.addNode("tr", table, rowAttr_);
1665  tableDiv = maker.addNode("td", tableRow, messageAttr);
1666  maker.addText(tableDiv, "No output modules are available yet.");
1667  return;
1668  }
1669  else
1670  {
1671  for (unsigned int idx = 0; idx < resultsList.size(); ++idx)
1672  {
1673  tableRow = maker.addNode("tr", table, rowAttr_);
1674  tableDiv = maker.addNode("td", tableRow);
1675  maker.addText(tableDiv, resultsList[idx]->name);
1676  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1677  maker.addInt( tableDiv, resultsList[idx]->id );
1678  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1679  maker.addInt( tableDiv, resultsList[idx]->initMsgSize );
1680  }
1681  }
1682  }
1683 
1684 
1686  (
1687  XHTMLMaker& maker,
1688  XHTMLMaker::Node *parent,
1689  DataSenderMonitorCollection const& dsmc
1690  ) const
1691  {
1694  std::sort(rbResultsList.begin(), rbResultsList.end(), compareRBResultPtrValues);
1695 
1696  XHTMLMaker::AttrMap colspanAttr;
1697  colspanAttr[ "colspan" ] = "15";
1698 
1699  XHTMLMaker::AttrMap tableSuspiciousValueAttr = tableValueAttr_;
1700  tableSuspiciousValueAttr[ "style" ] = "background-color: yellow;";
1701 
1702  XHTMLMaker::Node* table = maker.addNode("table", parent, tableAttr_);
1703 
1704  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
1705  XHTMLMaker::Node* tableDiv = maker.addNode("th", tableRow, colspanAttr);
1706  maker.addText(tableDiv, "Data Sender Overview");
1707 
1708  // Header
1709  tableRow = maker.addNode("tr", table, specialRowAttr_);
1710  tableDiv = maker.addNode("th", tableRow);
1711  maker.addText(tableDiv, "Resource Broker URL");
1712  tableDiv = maker.addNode("th", tableRow);
1713  maker.addText(tableDiv, "RB instance");
1714  tableDiv = maker.addNode("th", tableRow);
1715  maker.addText(tableDiv, "RB TID");
1716  tableDiv = maker.addNode("th", tableRow);
1717  maker.addText(tableDiv, "# of EPs");
1718  tableDiv = maker.addNode("th", tableRow);
1719  maker.addText(tableDiv, "# of INIT messages");
1720  tableDiv = maker.addNode("th", tableRow);
1721  maker.addText(tableDiv, "# of events");
1722  tableDiv = maker.addNode("th", tableRow);
1723  maker.addText(tableDiv, "# of error events");
1724  tableDiv = maker.addNode("th", tableRow);
1725  maker.addText(tableDiv, "# of faulty events");
1726  tableDiv = maker.addNode("th", tableRow);
1727  maker.addText(tableDiv, "# of outstanding data discards");
1728  tableDiv = maker.addNode("th", tableRow);
1729  maker.addText(tableDiv, "# of DQM events");
1730  tableDiv = maker.addNode("th", tableRow);
1731  maker.addText(tableDiv, "# of faulty DQM events");
1732  tableDiv = maker.addNode("th", tableRow);
1733  maker.addText(tableDiv, "# of outstanding DQM discards");
1734  tableDiv = maker.addNode("th", tableRow);
1735  maker.addText(tableDiv, "# of ignored discards");
1736  tableDiv = maker.addNode("th", tableRow);
1737  maker.addText(tableDiv, "Recent event rate (Hz)");
1738  tableDiv = maker.addNode("th", tableRow);
1739  maker.addText(tableDiv, "Last event number received");
1740 
1741  if (rbResultsList.empty())
1742  {
1743  XHTMLMaker::AttrMap messageAttr = colspanAttr;
1744  messageAttr[ "align" ] = "center";
1745 
1746  tableRow = maker.addNode("tr", table, rowAttr_);
1747  tableDiv = maker.addNode("td", tableRow, messageAttr);
1748  maker.addText(tableDiv, "No data senders have registered yet.");
1749  return;
1750  }
1751  else
1752  {
1753  for (unsigned int idx = 0; idx < rbResultsList.size(); ++idx)
1754  {
1755  tableRow = maker.addNode("tr", table, rowAttr_);
1756 
1757  tableDiv = maker.addNode("td", tableRow);
1758  XHTMLMaker::AttrMap linkAttr;
1759  linkAttr[ "href" ] = baseURL() + "/rbsenderdetail?id=" +
1760  boost::lexical_cast<std::string>(rbResultsList[idx]->uniqueRBID);
1761  XHTMLMaker::Node* link = maker.addNode("a", tableDiv, linkAttr);
1762  maker.addText(link, rbResultsList[idx]->key.hltURL);
1763 
1764  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1765  maker.addInt( tableDiv, rbResultsList[idx]->key.hltInstance );
1766  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1767  maker.addInt( tableDiv, rbResultsList[idx]->key.hltTid );
1768  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1769  maker.addInt( tableDiv, rbResultsList[idx]->filterUnitCount );
1770  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1771  maker.addInt(tableDiv, rbResultsList[idx]->initMsgCount );
1772  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1773  maker.addInt( tableDiv, rbResultsList[idx]->eventStats.getSampleCount() );
1774  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1775  maker.addInt( tableDiv, rbResultsList[idx]->errorEventStats.getSampleCount() );
1776 
1777  if (rbResultsList[idx]->faultyEventStats.getSampleCount() != 0)
1778  {
1779  tableDiv = maker.addNode("td", tableRow, tableSuspiciousValueAttr);
1780  }
1781  else
1782  {
1783  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1784  }
1785  maker.addInt( tableDiv, rbResultsList[idx]->faultyEventStats.getSampleCount() );
1786 
1787  if (rbResultsList[idx]->outstandingDataDiscardCount != 0)
1788  {
1789  tableDiv = maker.addNode("td", tableRow, tableSuspiciousValueAttr);
1790  }
1791  else
1792  {
1793  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1794  }
1795  maker.addInt( tableDiv, rbResultsList[idx]->outstandingDataDiscardCount );
1796 
1797  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1798  maker.addInt( tableDiv, rbResultsList[idx]->dqmEventStats.getSampleCount() );
1799 
1800  if (rbResultsList[idx]->faultyDQMEventStats.getSampleCount() != 0)
1801  {
1802  tableDiv = maker.addNode("td", tableRow, tableSuspiciousValueAttr);
1803  }
1804  else
1805  {
1806  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1807  }
1808  maker.addInt( tableDiv, rbResultsList[idx]->faultyDQMEventStats.getSampleCount() );
1809 
1810  if (rbResultsList[idx]->outstandingDQMDiscardCount != 0)
1811  {
1812  tableDiv = maker.addNode("td", tableRow, tableSuspiciousValueAttr);
1813  }
1814  else
1815  {
1816  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1817  }
1818  maker.addInt( tableDiv, rbResultsList[idx]->outstandingDQMDiscardCount );
1819 
1820  const int skippedDiscards = rbResultsList[idx]->skippedDiscardStats.getSampleCount();
1821  if (skippedDiscards != 0)
1822  {
1823  tableDiv = maker.addNode("td", tableRow, tableSuspiciousValueAttr);
1824  }
1825  else
1826  {
1827  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1828  }
1829  maker.addInt( tableDiv, skippedDiscards );
1830 
1831  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1832  maker.addDouble( tableDiv, rbResultsList[idx]->eventStats.
1833  getSampleRate(MonitoredQuantity::RECENT) );
1834  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1835  maker.addInt( tableDiv, rbResultsList[idx]->lastEventNumber );
1836  }
1837  }
1838  }
1839 
1840 
1842  (
1843  XHTMLMaker& maker,
1844  XHTMLMaker::Node *parent,
1845  long long uniqueRBID,
1846  DataSenderMonitorCollection const& dsmc
1847  ) const
1848  {
1850  dsmc.getOneResourceBrokerResult(uniqueRBID);
1851 
1852  if (rbResultPtr.get() == 0)
1853  {
1854  maker.addText(parent, "The requested resource broker page is not currently available.");
1855  return;
1856  }
1857 
1858  int tmpDuration;
1859  std::string tmpText;
1860 
1861  XHTMLMaker::AttrMap colspanAttr;
1862  colspanAttr[ "colspan" ] = "2";
1863 
1864  XHTMLMaker::AttrMap tableAttr = tableAttr_;
1865  tableAttr[ "width" ] = "";
1866 
1867  XHTMLMaker::Node* table = maker.addNode("table", parent, tableAttr);
1868 
1869  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
1870  XHTMLMaker::Node* tableDiv = maker.addNode("th", tableRow, colspanAttr);
1871  maker.addText(tableDiv, "Resource Broker Details");
1872 
1873  // Header
1874  tableRow = maker.addNode("tr", table, specialRowAttr_);
1875  tableDiv = maker.addNode("th", tableRow);
1876  maker.addText(tableDiv, "Parameter");
1877  tableDiv = maker.addNode("th", tableRow);
1878  maker.addText(tableDiv, "Value");
1879 
1880  tableRow = maker.addNode("tr", table, rowAttr_);
1881  tableDiv = maker.addNode("td", tableRow, tableLabelAttr_);
1882  maker.addText(tableDiv, "URL");
1883  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1884  XHTMLMaker::AttrMap linkAttr;
1885  linkAttr[ "href" ] = rbResultPtr->key.hltURL + "/urn:xdaq-application:lid=" +
1886  boost::lexical_cast<std::string>(rbResultPtr->key.hltLocalId);
1887  XHTMLMaker::Node* link = maker.addNode("a", tableDiv, linkAttr);
1888  maker.addText(link, rbResultPtr->key.hltURL);
1889 
1890  tableRow = maker.addNode("tr", table, rowAttr_);
1891  tableDiv = maker.addNode("td", tableRow, tableLabelAttr_);
1892  maker.addText(tableDiv, "Class Name");
1893  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1894  maker.addText(tableDiv, rbResultPtr->key.hltClassName);
1895 
1896  tableRow = maker.addNode("tr", table, rowAttr_);
1897  tableDiv = maker.addNode("td", tableRow, tableLabelAttr_);
1898  maker.addText(tableDiv, "Instance");
1899  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1900  maker.addInt( tableDiv, rbResultPtr->key.hltInstance );
1901 
1902  tableRow = maker.addNode("tr", table, rowAttr_);
1903  tableDiv = maker.addNode("td", tableRow, tableLabelAttr_);
1904  maker.addText(tableDiv, "Local ID");
1905  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1906  maker.addInt( tableDiv, rbResultPtr->key.hltLocalId );
1907 
1908  tableRow = maker.addNode("tr", table, rowAttr_);
1909  tableDiv = maker.addNode("td", tableRow, tableLabelAttr_);
1910  maker.addText(tableDiv, "Tid");
1911  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1912  maker.addInt( tableDiv, rbResultPtr->key.hltTid );
1913 
1914  tableRow = maker.addNode("tr", table, rowAttr_);
1915  tableDiv = maker.addNode("td", tableRow, tableLabelAttr_);
1916  maker.addText(tableDiv, "INIT Message Count");
1917  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1918  maker.addInt( tableDiv, rbResultPtr->initMsgCount );
1919 
1920  tableRow = maker.addNode("tr", table, rowAttr_);
1921  tableDiv = maker.addNode("td", tableRow, tableLabelAttr_);
1922  maker.addText(tableDiv, "Event Count");
1923  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1924  maker.addInt( tableDiv, rbResultPtr->eventStats.getSampleCount() );
1925 
1926  tableRow = maker.addNode("tr", table, rowAttr_);
1927  tableDiv = maker.addNode("td", tableRow, tableLabelAttr_);
1928  maker.addText(tableDiv, "Error Event Count");
1929  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1930  maker.addInt( tableDiv, rbResultPtr->errorEventStats.getSampleCount() );
1931 
1932  tableRow = maker.addNode("tr", table, rowAttr_);
1933  tableDiv = maker.addNode("td", tableRow, tableLabelAttr_);
1934  maker.addText(tableDiv, "Faulty Event Count");
1935  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1936  maker.addInt( tableDiv, rbResultPtr->faultyEventStats.getSampleCount() );
1937 
1938  tableRow = maker.addNode("tr", table, rowAttr_);
1939  tableDiv = maker.addNode("td", tableRow, tableLabelAttr_);
1940  maker.addText(tableDiv, "Data Discard Count");
1941  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1942  maker.addInt( tableDiv, rbResultPtr->dataDiscardStats.getSampleCount() );
1943 
1944  tableRow = maker.addNode("tr", table, rowAttr_);
1945  tableDiv = maker.addNode("td", tableRow, tableLabelAttr_);
1946  maker.addText(tableDiv, "DQM Event Count");
1947  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1948  maker.addInt( tableDiv, rbResultPtr->dqmEventStats.getSampleCount() );
1949 
1950  tableRow = maker.addNode("tr", table, rowAttr_);
1951  tableDiv = maker.addNode("td", tableRow, tableLabelAttr_);
1952  maker.addText(tableDiv, "Faulty DQM Event Count");
1953  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1954  maker.addInt( tableDiv, rbResultPtr->faultyDQMEventStats.getSampleCount() );
1955 
1956  tableRow = maker.addNode("tr", table, rowAttr_);
1957  tableDiv = maker.addNode("td", tableRow, tableLabelAttr_);
1958  maker.addText(tableDiv, "DQM Discard Count");
1959  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1960  maker.addInt( tableDiv, rbResultPtr->dqmDiscardStats.getSampleCount() );
1961 
1962  tableRow = maker.addNode("tr", table, rowAttr_);
1963  tableDiv = maker.addNode("td", tableRow, tableLabelAttr_);
1964  maker.addText(tableDiv, "Ignored Discards Count");
1965  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1966  maker.addInt( tableDiv, rbResultPtr->skippedDiscardStats.getSampleCount() );
1967 
1968  tableRow = maker.addNode("tr", table, rowAttr_);
1969  tableDiv = maker.addNode("td", tableRow, tableLabelAttr_);
1970  maker.addText(tableDiv, "Last Event Number Received");
1971  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1972  maker.addInt( tableDiv, rbResultPtr->lastEventNumber );
1973 
1974  tableRow = maker.addNode("tr", table, rowAttr_);
1975  tableDiv = maker.addNode("td", tableRow, tableLabelAttr_);
1976  maker.addText(tableDiv, "Last Run Number Received");
1977  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1978  maker.addInt( tableDiv, rbResultPtr->lastRunNumber );
1979 
1980  tableRow = maker.addNode("tr", table, rowAttr_);
1981  tableDiv = maker.addNode("td", tableRow, tableLabelAttr_);
1982  tmpDuration = rbResultPtr->eventStats.recentDuration.total_seconds();
1983  tmpText = "Recent (" + boost::lexical_cast<std::string>(tmpDuration) +
1984  " sec) Event Rate (Hz)";
1985  maker.addText(tableDiv, tmpText);
1986  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1987  maker.addDouble( tableDiv, rbResultPtr->eventStats.recentSampleRate );
1988 
1989  tableRow = maker.addNode("tr", table, rowAttr_);
1990  tableDiv = maker.addNode("td", tableRow, tableLabelAttr_);
1991  tmpDuration = rbResultPtr->eventStats.fullDuration.total_seconds();
1992  tmpText = "Full (" + boost::lexical_cast<std::string>(tmpDuration) +
1993  " sec) Event Rate (Hz)";
1994  maker.addText(tableDiv, tmpText);
1995  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
1996  maker.addDouble( tableDiv, rbResultPtr->eventStats.fullSampleRate );
1997  }
1998 
1999 
2001  (
2002  XHTMLMaker& maker,
2003  XHTMLMaker::Node *parent,
2004  long long uniqueRBID,
2005  DataSenderMonitorCollection const& dsmc
2006  ) const
2007  {
2009  dsmc.getFilterUnitResultsForRB(uniqueRBID);
2010 
2011  XHTMLMaker::AttrMap colspanAttr;
2012  colspanAttr[ "colspan" ] = "13";
2013 
2014  XHTMLMaker::AttrMap tableSuspiciousValueAttr = tableValueAttr_;
2015  tableSuspiciousValueAttr[ "style" ] = "background-color: yellow;";
2016 
2017  XHTMLMaker::Node* table = maker.addNode("table", parent, tableAttr_);
2018 
2019  XHTMLMaker::Node* tableRow = maker.addNode("tr", table, rowAttr_);
2020  XHTMLMaker::Node* tableDiv = maker.addNode("th", tableRow, colspanAttr);
2021  maker.addText(tableDiv, "Filter Units");
2022 
2023  // Header
2024  tableRow = maker.addNode("tr", table, specialRowAttr_);
2025  tableDiv = maker.addNode("th", tableRow);
2026  maker.addText(tableDiv, "Process ID");
2027  tableDiv = maker.addNode("th", tableRow);
2028  maker.addText(tableDiv, "# of INIT messages");
2029  tableDiv = maker.addNode("th", tableRow);
2030  maker.addText(tableDiv, "# of events");
2031  tableDiv = maker.addNode("th", tableRow);
2032  maker.addText(tableDiv, "# of error events");
2033  tableDiv = maker.addNode("th", tableRow);
2034  maker.addText(tableDiv, "# of faulty events");
2035  tableDiv = maker.addNode("th", tableRow);
2036  maker.addText(tableDiv, "# of outstanding data discards");
2037  tableDiv = maker.addNode("th", tableRow);
2038  maker.addText(tableDiv, "# of DQM events");
2039  tableDiv = maker.addNode("th", tableRow);
2040  maker.addText(tableDiv, "# of faulty DQM events");
2041  tableDiv = maker.addNode("th", tableRow);
2042  maker.addText(tableDiv, "# of outstanding DQM discards");
2043  tableDiv = maker.addNode("th", tableRow);
2044  maker.addText(tableDiv, "# of ignored discards");
2045  tableDiv = maker.addNode("th", tableRow);
2046  maker.addText(tableDiv, "Recent event rate (Hz)");
2047  tableDiv = maker.addNode("th", tableRow);
2048  maker.addText(tableDiv, "Last event number received");
2049  tableDiv = maker.addNode("th", tableRow);
2050  maker.addText(tableDiv, "Last run number received");
2051 
2052  if (fuResultsList.empty())
2053  {
2054  XHTMLMaker::AttrMap messageAttr = colspanAttr;
2055  messageAttr[ "align" ] = "center";
2056 
2057  tableRow = maker.addNode("tr", table, rowAttr_);
2058  tableDiv = maker.addNode("td", tableRow, messageAttr);
2059  maker.addText(tableDiv, "No filter units have registered yet.");
2060  return;
2061  }
2062  else
2063  {
2064  for (unsigned int idx = 0; idx < fuResultsList.size(); ++idx)
2065  {
2066  tableRow = maker.addNode("tr", table, rowAttr_);
2067 
2068  tableDiv = maker.addNode("td", tableRow);
2069  maker.addInt( tableDiv, fuResultsList[idx]->key.fuProcessId );
2070  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
2071  maker.addInt( tableDiv, fuResultsList[idx]->initMsgCount );
2072  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
2073  maker.addInt( tableDiv, fuResultsList[idx]->shortIntervalEventStats.getSampleCount() );
2074  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
2075  maker.addInt( tableDiv, fuResultsList[idx]->errorEventStats.getSampleCount() );
2076 
2077  if (fuResultsList[idx]->faultyEventStats.getSampleCount() != 0)
2078  {
2079  tableDiv = maker.addNode("td", tableRow, tableSuspiciousValueAttr);
2080  }
2081  else
2082  {
2083  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
2084  }
2085  maker.addInt( tableDiv, fuResultsList[idx]->faultyEventStats.getSampleCount() );
2086 
2087  if (fuResultsList[idx]->outstandingDataDiscardCount != 0)
2088  {
2089  tableDiv = maker.addNode("td", tableRow, tableSuspiciousValueAttr);
2090  }
2091  else
2092  {
2093  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
2094  }
2095  maker.addInt( tableDiv, fuResultsList[idx]->outstandingDataDiscardCount );
2096 
2097  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
2098  maker.addInt( tableDiv, fuResultsList[idx]->dqmEventStats.getSampleCount() );
2099 
2100  if (fuResultsList[idx]->faultyDQMEventStats.getSampleCount() != 0)
2101  {
2102  tableDiv = maker.addNode("td", tableRow, tableSuspiciousValueAttr);
2103  }
2104  else
2105  {
2106  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
2107  }
2108  maker.addInt( tableDiv, fuResultsList[idx]->faultyDQMEventStats.getSampleCount() );
2109 
2110  if (fuResultsList[idx]->outstandingDQMDiscardCount != 0)
2111  {
2112  tableDiv = maker.addNode("td", tableRow, tableSuspiciousValueAttr);
2113  }
2114  else
2115  {
2116  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
2117  }
2118  maker.addInt( tableDiv, fuResultsList[idx]->outstandingDQMDiscardCount );
2119 
2120  const int skippedDiscards = fuResultsList[idx]->skippedDiscardStats.getSampleCount();
2121  if (skippedDiscards != 0)
2122  {
2123  tableDiv = maker.addNode("td", tableRow, tableSuspiciousValueAttr);
2124  }
2125  else
2126  {
2127  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
2128  }
2129  maker.addInt( tableDiv, skippedDiscards );
2130 
2131  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
2132  maker.addDouble( tableDiv, fuResultsList[idx]->shortIntervalEventStats.
2133  getSampleRate(MonitoredQuantity::RECENT) );
2134  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
2135  maker.addInt( tableDiv, fuResultsList[idx]->lastEventNumber );
2136  tableDiv = maker.addNode("td", tableRow, tableValueAttr_);
2137  maker.addInt( tableDiv, fuResultsList[idx]->lastRunNumber );
2138  }
2139  }
2140  }
2141 
2142 } // namespace stor
2143 
2144 
double getValueRate(DataSetType t=FULL) const
list table
Definition: asciidump.py:386
void addOutputModuleTables(XHTMLMaker &maker, XHTMLMaker::Node *parent, DataSenderMonitorCollection const &) const
Node * addNode(const std::string &name, Node *parent, const AttrMap &attrs)
Definition: XHTMLMaker.cc:146
void addDOMforDQMEventStatistics(XHTMLMaker &maker, XHTMLMaker::Node *parent, DQMEventMonitorCollection const &) const
void addDouble(Node *parent, const double &value, const unsigned int &precision=2)
Definition: XHTMLMaker.cc:254
void addOutputModuleSummary(XHTMLMaker &maker, XHTMLMaker::Node *parent, DataSenderMonitorCollection::OutputModuleResultsList const &) const
const MonitoredQuantity & getLumiSectionsSeenMQ() const
std::vector< EventConsRegPtr > ConsumerRegistrations
void dqmEventWebPage(xgi::Output *) const
OutputModuleResultsList getTopLevelOutputModuleResults() const
bool getServed(const QueueID &qid, MonitoredQuantity::Stats &result) const
list parent
Definition: dbtoconf.py:74
void throughputWebPage(xgi::Output *) const
ConsumerWebPageHelper_t consumerWebPageHelper_
RBResultPtr getOneResourceBrokerResult(UniqueResourceBrokerID_t) const
void addText(Node *parent, const std::string &)
Definition: XHTMLMaker.cc:173
void resourceBrokerOverview(xgi::Output *) const
std::string timeStampUTC(TimePoint_t)
Definition: Utils.cc:38
const MonitoredQuantity & getUnwantedEventIDsReceivedMQ() const
void addRowForFramesReceived(XHTMLMaker &maker, XHTMLMaker::Node *table, FragmentMonitorCollection::FragmentStats const &, const MonitoredQuantity::DataSetType) const
bool getStreamRecordsForOutputModuleLabel(const std::string &, StreamRecordList &) const
uint64_t getSampleCount(DataSetType t=FULL) const
void addOutputModuleStatistics(XHTMLMaker &maker, XHTMLMaker::Node *parent, long long uniqueRBID, DataSenderMonitorCollection const &) const
void addRowForLatency(XHTMLMaker &maker, XHTMLMaker::Node *table, FragmentMonitorCollection::FragmentStats const &, const MonitoredQuantity::DataSetType) const
void addRowForThroughputStatistics(XHTMLMaker &maker, XHTMLMaker::Node *table, const ThroughputMonitorCollection::Stats::Snapshot &, bool const isAverage=false) const
const MonitoredQuantity & getErrorEventIDsReceivedMQ() const
void addRowsForWorkers(XHTMLMaker &maker, XHTMLMaker::Node *table, ResourceMonitorCollection::Stats const &) const
boost::shared_ptr< SharedResources > SharedResourcesPtr
void getStats(Stats &stats) const
double getValueMin(DataSetType t=FULL) const
XHTMLMaker::Node * createWebPageBody(XHTMLMaker &, const std::string &pageTitle, const StateMachineMonitorCollection &) const
boost::shared_ptr< StatisticsReporter > StatisticsReporterPtr
void addDOMforHyperLinks(XHTMLMaker &, XHTMLMaker::Node *parent) const
void addDOMforFiles(XHTMLMaker &maker, XHTMLMaker::Node *parent, FilesMonitorCollection const &) const
void inputWebPage(xgi::Output *) const
boost::shared_ptr< RegistrationCollection > RegistrationCollectionPtr
const MonitoredQuantity & getAllStreamsBandwidthMQ() const
std::string link(std::string &nm, std::string &ns)
Definition: hierarchy.cc:24
SMWebPageHelper(xdaq::ApplicationDescriptor *, SharedResourcesPtr)
FilterUnitResultsList getFilterUnitResultsForRB(UniqueResourceBrokerID_t uniqueRBID) const
void addDOMforSummaryInformation(XHTMLMaker &, XHTMLMaker::Node *parent, DataSenderMonitorCollection const &, StreamsMonitorCollection const &, EventConsumerMonitorCollection const &, DQMEventMonitorCollection const &, RegistrationCollectionPtr) const
utils::Duration_t getDuration(DataSetType t=FULL) const
std::vector< StreamRecordPtr > StreamRecordList
void addRowForMinBandwidth(XHTMLMaker &maker, XHTMLMaker::Node *table, FragmentMonitorCollection::FragmentStats const &, const MonitoredQuantity::DataSetType) const
void addHex(Node *parent, const unsigned long &)
Definition: XHTMLMaker.cc:244
void getStats(FragmentStats &stats) const
edm::serviceregistry::AllArgsMaker< DTDataMonitorInterface, DTDataIntegrityTask > maker
Definition: plugins.cc:73
void addFilterUnitList(XHTMLMaker &maker, XHTMLMaker::Node *parent, long long uniqueRBID, DataSenderMonitorCollection const &) const
void getFileRecords(FileRecordList &) const
std::map< std::string, std::string > AttrMap
Definition: XHTMLMaker.h:36
const MonitoredQuantity & getAllStreamsVolumeMQ() const
void addDOMforFragmentMonitor(XHTMLMaker &maker, XHTMLMaker::Node *parent, FragmentMonitorCollection const &) const
void resourceBrokerDetail(xgi::Output *, const long long &uniqueRBID) const
void addDOMforStoredData(XHTMLMaker &maker, XHTMLMaker::Node *parent, StreamsMonitorCollection const &) const
void addInt(Node *parent, const int &)
Definition: XHTMLMaker.cc:184
double getSampleRate(DataSetType t=FULL) const
double getValueAverage(DataSetType t=FULL) const
const MonitoredQuantity & getEoLSSeenMQ() const
void storedDataWebPage(xgi::Output *) const
void addDOMforProcessedDQMEvents(XHTMLMaker &maker, XHTMLMaker::Node *parent, DQMEventMonitorCollection const &) const
void addDOMforResourceUsage(XHTMLMaker &, XHTMLMaker::Node *parent, ResourceMonitorCollection const &, ThroughputMonitorCollection const &) const
const std::string & externallyVisibleState() const
void addRowForTotalVolume(XHTMLMaker &maker, XHTMLMaker::Node *table, FragmentMonitorCollection::FragmentStats const &, const MonitoredQuantity::DataSetType) const
void addTableForDiskUsages(XHTMLMaker &maker, XHTMLMaker::Node *parent, ResourceMonitorCollection::Stats const &) const
tuple out
Definition: dbtoconf.py:99
std::vector< boost::shared_ptr< OutputModuleResult > > OutputModuleResultsList
void addDOMforThroughputStatistics(XHTMLMaker &maker, XHTMLMaker::Node *parent, ThroughputMonitorCollection const &) const
const MonitoredQuantity & getEventIDsReceivedMQ() const
void getStats(DQMEventStats &stats) const
std::vector< RBResultPtr > ResourceBrokerResultsList
double getValueMax(DataSetType t=FULL) const
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
void addResourceBrokerDetails(XHTMLMaker &maker, XHTMLMaker::Node *parent, long long uniqueRBID, DataSenderMonitorCollection const &) const
void addRowsForSataBeast(XHTMLMaker &maker, XHTMLMaker::Node *table, ResourceMonitorCollection::Stats const &) const
void addTableForResourceUsages(XHTMLMaker &maker, XHTMLMaker::Node *parent, ThroughputMonitorCollection::Stats const &, ResourceMonitorCollection::Stats const &) const
SharedResourcesPtr sharedResources_
void addRowForBandwidth(XHTMLMaker &maker, XHTMLMaker::Node *table, FragmentMonitorCollection::FragmentStats const &, const MonitoredQuantity::DataSetType) const
boost::shared_ptr< ResourceBrokerResult > RBResultPtr
void listStreamRecordsStats(XHTMLMaker &maker, XHTMLMaker::Node *table, StreamsMonitorCollection const &, const MonitoredQuantity::DataSetType) const
double getServedConsumerBandwidth(const std::string &label, RegistrationCollectionPtr, const EventConsumerMonitorCollection &eventConsumerCollection) const
void addRowsForThroughputUsage(XHTMLMaker &maker, XHTMLMaker::Node *table, ThroughputMonitorCollection::Stats const &) const
void addRowForRate(XHTMLMaker &maker, XHTMLMaker::Node *table, FragmentMonitorCollection::FragmentStats const &, const MonitoredQuantity::DataSetType) const
void filesWebPage(xgi::Output *) const
list key
Definition: combine.py:13
void addResourceBrokerList(XHTMLMaker &maker, XHTMLMaker::Node *parent, DataSenderMonitorCollection const &) const
#define Output(cl)
Definition: vmac.h:193
void getStreamRecords(StreamRecordList &) const
void consumerStatistics(xgi::Output *, const std::string &externallyVisibleState, const std::string &innerStateName, const std::string &errorMsg, boost::shared_ptr< StatisticsReporter_t >, RegistrationCollectionPtr, boost::shared_ptr< EventQueueCollection_t >, DQMEventQueueCollectionPtr) const
void addFragmentStats(XHTMLMaker &maker, XHTMLMaker::Node *table, FragmentMonitorCollection::FragmentStats const &, const MonitoredQuantity::DataSetType) const
bool compareRBResultPtrValues(DataSenderMonitorCollection::RBResultPtr firstValue, DataSenderMonitorCollection::RBResultPtr secondValue)
void addDOMforConfigString(XHTMLMaker &maker, XHTMLMaker::Node *parent, DiskWritingParams const &) const
ResourceBrokerResultsList getAllResourceBrokerResults() const
boost::circular_buffer< FileRecordPtr > FileRecordList
xercesc::DOMElement Node
Definition: XHTMLMaker.h:35
void addRowForMaxBandwidth(XHTMLMaker &maker, XHTMLMaker::Node *table, FragmentMonitorCollection::FragmentStats const &, const MonitoredQuantity::DataSetType) const
const MonitoredQuantity & getAllStreamsFileCountMQ() const
OutputModuleResultsList getOutputModuleResultsForRB(UniqueResourceBrokerID_t uniqueRBID) const
void consumerStatistics(xgi::Output *) const
XHTMLMaker::Node * createWebPageBody(XHTMLMaker &, const std::string &pageTitle, const std::string &externallyVisibleState, const std::string &innerStateName, const std::string &errorMsg) const
std::string streamConfiguration_
Definition: Configuration.h:32
double getValueSum(DataSetType t=FULL) const
std::vector< FUResultPtr > FilterUnitResultsList
double getSampleLatency(DataSetType t=FULL) const
const MonitoredQuantity & getRunNumbersSeenMQ() const
cc *****************************************************cc the common blocks pinput and cwdidth are for input parameters cc these parameters needed to be interfaced to other program common pinput fmc
Definition: inclcon.h:4
void defaultWebPage(xgi::Output *) const
void addDOMforRunMonitor(XHTMLMaker &maker, XHTMLMaker::Node *parent, RunMonitorCollection const &) const