9 #include "boost/lexical_cast.hpp"
22 #include "EventFilter/StorageManager/src/ConsumerWebPageHelper.icc"
24 #include "toolbox/net/Utils.h"
32 xdaq::ApplicationDescriptor* appDesc,
36 sharedResources_(sharedResources),
50 statReporter->getStateMachineMonitorCollection());
57 statReporter->getResourceMonitorCollection(),
58 statReporter->getThroughputMonitorCollection());
62 statReporter->getDataSenderMonitorCollection(),
63 statReporter->getStreamsMonitorCollection(),
64 statReporter->getEventConsumerMonitorCollection(),
65 statReporter->getDQMEventMonitorCollection(),
84 statReporter->getStateMachineMonitorCollection());
88 statReporter->getFragmentMonitorCollection());
106 statReporter->getStateMachineMonitorCollection());
130 statReporter->getStateMachineMonitorCollection());
132 addDOMforFiles(maker, body, statReporter->getFilesMonitorCollection());
170 statReporter->getStateMachineMonitorCollection());
173 statReporter->getDataSenderMonitorCollection());
178 statReporter->getDataSenderMonitorCollection());
190 const long long& uniqueRBID
199 std::ostringstream pageTitle;
200 pageTitle <<
"Resource Broker " << uniqueRBID <<
" Detail";
202 statReporter->getStateMachineMonitorCollection());
204 addResourceBrokerDetails(maker, body, uniqueRBID,
205 statReporter->getDataSenderMonitorCollection());
207 addOutputModuleStatistics(maker, body, uniqueRBID,
208 statReporter->getDataSenderMonitorCollection());
210 addFilterUnitList(maker, body, uniqueRBID,
211 statReporter->getDataSenderMonitorCollection());
213 addDOMforHyperLinks(maker, body);
229 statReporter->getStateMachineMonitorCollection());
250 statReporter->getStateMachineMonitorCollection());
287 std::string url = appDescriptor_->getContextDescriptor()->getURL()
288 +
"/" + appDescriptor_->getURN();
295 linkAttr[
"href" ] =
url;
296 link = maker.
addNode(
"a", parent, linkAttr);
297 maker.
addText(link,
"Main web page");
301 linkAttr[
"href" ] = url +
"/input";
302 link = maker.
addNode(
"a", parent, linkAttr);
303 maker.
addText(link,
"I2O input web page");
307 linkAttr[
"href" ] = url +
"/storedData";
308 link = maker.
addNode(
"a", parent, linkAttr);
309 maker.
addText(link,
"Stored data web page");
313 linkAttr[
"href" ] = url +
"/rbsenderlist";
314 link = maker.
addNode(
"a", parent, linkAttr);
315 maker.
addText(link,
"RB Sender list web page");
319 linkAttr[
"href" ] = url +
"/fileStatistics";
320 link = maker.
addNode(
"a", parent, linkAttr);
321 maker.
addText(link,
"File Statistics web page");
325 linkAttr[
"href" ] = url +
"/consumerStatistics";
326 link = maker.
addNode(
"a", parent, linkAttr);
327 maker.
addText(link,
"Consumer Statistics");
331 linkAttr[
"href" ] = url +
"/dqmEventStatistics";
332 link = maker.
addNode(
"a", parent, linkAttr);
333 maker.
addText(link,
"DQM event processor statistics");
337 linkAttr[
"href" ] = url +
"/throughputStatistics";
338 link = maker.
addNode(
"a", parent, linkAttr);
339 maker.
addText(link,
"Throughput statistics");
360 halfWidthAttr[
"width" ] =
"50%";
367 addTableForResourceUsages(maker, tableDiv, tmcStats, rmcStats);
369 tableDiv = maker.
addNode(
"td", tableRow, halfWidthAttr);
370 addTableForDiskUsages(maker, tableDiv, rmcStats);
383 colspanAttr[
"colspan" ] =
"2";
388 maker.
addText(tableDiv,
"Resource Usage");
390 addRowsForThroughputUsage(maker, table, tmcStats);
391 addRowsForWorkers(maker, table, rmcStats);
392 addRowsForSataBeast(maker, table, rmcStats);
404 tableLabelAttr[
"width" ] =
"54%";
407 tableValueAttr[
"width" ] =
"46%";
412 maker.
addText(tableDiv,
"Memory pool used (kB)");
413 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
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);
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);
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);
447 tableValueAttr[
"width" ] =
"46%";
452 maker.
addText(tableDiv,
"# CopyWorker");
453 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
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);
473 tableValueAttr[
"width" ] =
"46%";
484 colspanAttr[
"colspan" ] =
"2";
486 tableRow = maker.
addNode(
"tr", table, warningAttr);
487 tableDiv = maker.
addNode(
"td", tableRow, colspanAttr);
488 maker.
addText(tableDiv,
"No SATA disks found");
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);
511 colspanAttr[
"colspan" ] =
"2";
514 tableLabelAttr[
"width" ] =
"54%";
517 tableValueAttr[
"width" ] =
"46%";
524 maker.
addText(tableDiv,
"Disk Space Usage");
527 for (ResourceMonitorCollection::DiskUsageStatsPtrList::const_iterator
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 )
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());
549 maker.
addText(tableDiv,
"not mounted");
573 colspanAttr[
"colspan" ] =
"6";
576 bandwidthColspanAttr[
"colspan" ] =
"3";
579 tableValueWidthAttr[
"width" ] =
"15%";
582 rowspanAttr[
"rowspan" ] =
"2";
583 rowspanAttr[
"valign" ] =
"top";
590 maker.
addText(tableDiv,
"Data Flow Summary");
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)");
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");
612 if (resultsList.empty())
615 messageAttr[
"align" ] =
"center";
617 tableRow = maker.
addNode(
"tr", table, rowAttr_);
618 tableDiv = maker.
addNode(
"td", tableRow, messageAttr);
619 maker.
addText(tableDiv,
"No output modules are available yet.");
624 double totalInputBandwidth = 0;
625 double totalDiskBandwidth = 0;
626 double totalConsumerBandwidth = 0;
629 DataSenderMonitorCollection::OutputModuleResultsList::const_iterator
630 it = resultsList.begin(), itEnd = resultsList.end();
636 const double inputBandwidth =
638 totalInputBandwidth += inputBandwidth;
641 double diskBandwidth = 0;
645 StreamsMonitorCollection::StreamRecordList::const_iterator
646 it = streamRecords.begin(), itEnd = streamRecords.end();
651 (*it)->bandwidth.getStats(streamBandwidthStats);
654 totalDiskBandwidth += diskBandwidth;
661 const double consumerBandwidth =
662 getServedConsumerBandwidth(outputModuleLabel,
663 registrationCollection, ecmc);
664 totalConsumerBandwidth += consumerBandwidth;
666 tableRow = maker.
addNode(
"tr", table, rowAttr_);
669 tableDiv = maker.
addNode(
"td", tableRow);
670 maker.
addText(tableDiv, outputModuleLabel);
673 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
678 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
683 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
684 maker.
addDouble( tableDiv, inputBandwidth, 1 );
687 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
688 if ( diskBandwidth < 0 )
689 maker.
addText( tableDiv,
"not written" );
691 maker.
addDouble( tableDiv, diskBandwidth, 1 );
694 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
695 maker.
addDouble( tableDiv, consumerBandwidth, 1 );
702 tableRow = maker.
addNode(
"tr", table, rowAttr_);
703 tableDiv = maker.
addNode(
"td", tableRow);
704 maker.
addText(tableDiv,
"DQM histograms");
707 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
712 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
717 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
719 totalInputBandwidth += dqmInputBandwidth;
720 maker.
addDouble( tableDiv, dqmInputBandwidth, 1 );
723 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
724 maker.
addText( tableDiv,
"not written" );
730 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
732 totalConsumerBandwidth += dqmConsumerBandwidth;
733 maker.
addDouble( tableDiv, dqmConsumerBandwidth, 1 );
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 );
759 double bandwidth = 0;
762 registrationCollection->getEventConsumers(consumers);
764 for( RegistrationCollection::ConsumerRegistrations::const_iterator
765 it = consumers.begin(), itEnd = consumers.end();
768 if ( (*it)->outputModuleLabel() ==
label )
772 if ( eventConsumerCollection.
getServed( (*it)->queueId(), servedStats ) )
779 return ( bandwidth/(
double)0x100000 );
794 colspanAttr[
"colspan" ] =
"4";
801 maker.
addText(tableDiv,
"Received I2O Frames");
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");
831 maker.
addText(tableDiv,
"Performance for full run");
833 maker.
addText(tableDiv,
"Recent performance for last");
835 addDurationToTableHead(maker, tableRow,
837 addDurationToTableHead(maker, tableRow,
839 addDurationToTableHead(maker, tableRow,
842 addRowForFramesReceived(maker, table, stats, dataSet);
843 addRowForBandwidth(maker, table, stats, dataSet);
844 addRowForRate(maker, table, stats, dataSet);
845 addRowForLatency(maker, table, stats, dataSet);
848 addRowForTotalVolume(maker, table, stats, dataSet);
852 addRowForMaxBandwidth(maker, table, stats, dataSet);
853 addRowForMinBandwidth(maker, table, stats, dataSet);
868 maker.
addText(tableDiv,
"Frames Received");
869 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
871 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
873 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
888 maker.
addText(tableDiv,
"Bandwidth (MB/s)");
889 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
891 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
893 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
908 maker.
addText(tableDiv,
"Rate (frames/s)");
909 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
911 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
913 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
928 maker.
addText(tableDiv,
"Latency (us/frame)");
929 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
931 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
933 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
948 maker.
addText(tableDiv,
"Total volume received (MB)");
949 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
951 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
953 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
968 maker.
addText(tableDiv,
"Maximum Bandwidth (MB/s)");
969 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
971 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
973 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
988 maker.
addText(tableDiv,
"Minimum Bandwidth (MB/s)");
989 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
991 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
993 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
1019 colspanAttr[
"colspan" ] =
"6";
1022 tableValueAttr[
"width" ] =
"16%";
1028 maker.
addText(tableDiv,
"Storage Manager Statistics");
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);
1036 tableDiv = maker.
addNode(
"td", tableRow);
1037 maker.
addText(tableDiv,
"Current lumi section");
1038 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
1040 tableDiv = maker.
addNode(
"td", tableRow);
1041 maker.
addText(tableDiv,
"Last EoLS");
1042 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
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);
1051 tableDiv = maker.
addNode(
"td", tableRow);
1052 maker.
addText(tableDiv,
"Error events received");
1053 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
1055 tableDiv = maker.
addNode(
"td", tableRow);
1056 maker.
addText(tableDiv,
"Unwanted events received");
1057 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
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);
1066 tableDiv = maker.
addNode(
"td", tableRow);
1067 maker.
addText(tableDiv,
"Last error event ID");
1068 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
1070 tableDiv = maker.
addNode(
"td", tableRow);
1071 maker.
addText(tableDiv,
"Last unwanted event ID");
1072 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
1088 tableValueWidthAttr[
"width" ] =
"11%";
1091 rowspanAttr[
"rowspan" ] =
"2";
1092 rowspanAttr[
"valign" ] =
"top";
1095 colspanAttr[
"colspan" ] =
"9";
1098 bandwidthColspanAttr[
"colspan" ] =
"4";
1104 maker.
addText(tableDiv,
"Stored Data Statistics");
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)");
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");
1133 tableRow = maker.
addNode(
"tr", table, rowAttr_);
1134 tableDiv = maker.
addNode(
"td", tableRow, colspanAttr);
1135 maker.
addText(tableDiv,
"no streams available yet");
1139 tableRow = maker.
addNode(
"tr", table, rowAttr_);
1140 tableDiv = maker.
addNode(
"th", tableRow, colspanAttr);
1142 std::ostringstream tmpString;
1143 tmpString <<
"Mean performance for " <<
1144 allStreamsVolumeStats.
getDuration().total_seconds() <<
" s";
1145 maker.
addText(tableDiv, tmpString.str());
1151 tableRow = maker.
addNode(
"tr", table, rowAttr_);
1152 tableDiv = maker.
addNode(
"th", tableRow, colspanAttr);
1154 std::ostringstream tmpString;
1155 tmpString <<
"Recent performance for the last " <<
1157 maker.
addText(tableDiv, tmpString.str());
1173 maker.
addText(tableDiv,
"SM Configuration");
1174 tableRow = maker.
addNode(
"tr", table, rowAttr_);
1175 tableDiv = maker.
addNode(
"td", tableRow);
1177 textareaAttr[
"rows" ] =
"10";
1178 textareaAttr[
"cols" ] =
"100";
1179 textareaAttr[
"scroll" ] =
"yes";
1180 textareaAttr[
"readonly" ];
1181 textareaAttr[
"title" ] =
"SM config";
1207 tableValueAttr[
"width" ] =
"11%";
1211 StreamsMonitorCollection::StreamRecordList::const_iterator
1212 it = streamRecords.begin(), itEnd = streamRecords.end();
1218 (*it)->fileCount.getStats(streamFileCountStats);
1220 (*it)->volume.getStats(streamVolumeStats);
1222 (*it)->bandwidth.getStats(streamBandwidthStats);
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_);
1232 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
1234 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
1236 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
1238 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
1240 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
1242 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
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_);
1252 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
1254 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
1256 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
1258 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
1260 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
1262 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
1278 colspanAttr[
"colspan" ] =
"6";
1281 tableLabelAttr[
"align" ] =
"center";
1284 tableValueWidthAttr[
"width" ] =
"11%";
1287 tableCounterWidthAttr[
"width" ] =
"5%";
1293 maker.
addText(tableDiv,
"File Statistics (most recent first)");
1296 tableRow = maker.
addNode(
"tr", table, specialRowAttr_);
1297 tableDiv = maker.
addNode(
"th", tableRow, tableCounterWidthAttr);
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");
1311 if (fileRecords.empty())
1313 tableRow = maker.
addNode(
"tr", table, rowAttr_);
1314 tableDiv = maker.
addNode(
"td", tableRow, colspanAttr);
1315 maker.
addText(tableDiv,
"no files available yet");
1320 FilesMonitorCollection::FileRecordList::const_reverse_iterator
1321 it = fileRecords.rbegin(), itEnd = fileRecords.rend();
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);
1351 colspanAttr[
"colspan" ] =
"21";
1357 maker.
addText(tableDiv,
"Throughput Statistics");
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");
1407 addRowForThroughputStatistics(maker, table, stats.
average,
true);
1409 for (ThroughputMonitorCollection::Stats::Snapshots::const_iterator
1415 addRowForThroughputStatistics(maker, table, (*it));
1418 addRowForThroughputStatistics(maker, table, stats.
average,
true);
1427 const bool isAverage
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());
1444 tableDiv = maker.
addNode(
"td", tableRow, tableLabelAttr_);
1449 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
1453 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
1457 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
1461 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
1465 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
1469 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
1473 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
1477 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
1481 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
1485 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
1489 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
1493 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
1497 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
1501 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
1505 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
1509 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
1513 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
1517 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
1521 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
1525 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr);
1540 addOutputModuleSummary(maker, parent, resultsList);
1541 addOutputModuleStatistics(maker, parent, resultsList);
1549 long long uniqueRBID,
1556 addOutputModuleStatistics(maker, parent, resultsList);
1568 colspanAttr[
"colspan" ] =
"7";
1574 maker.
addText(tableDiv,
"Received Data Statistics (by output module)");
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)");
1593 if (resultsList.empty())
1596 messageAttr[
"align" ] =
"center";
1598 tableRow = maker.
addNode(
"tr", table, rowAttr_);
1599 tableDiv = maker.
addNode(
"td", tableRow, messageAttr);
1600 maker.
addText(tableDiv,
"No output modules are available yet.");
1605 for (
unsigned int idx = 0;
idx < resultsList.size(); ++
idx)
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_);
1616 resultsList[
idx]->eventStats.getValueSum()/(double)0x100000 );
1617 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
1619 resultsList[
idx]->eventStats.getValueAverage()/(double)0x400 );
1620 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
1622 resultsList[
idx]->eventStats.getValueRMS()/(double)0x400 );
1623 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
1625 resultsList[
idx]->eventStats.getValueMin()/(double)0x400 );
1626 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
1628 resultsList[
idx]->eventStats.getValueMax()/(double)0x400 );
1642 colspanAttr[
"colspan" ] =
"3";
1648 maker.
addText(tableDiv,
"Output Module Summary");
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)");
1659 if (resultsList.empty())
1662 messageAttr[
"align" ] =
"center";
1664 tableRow = maker.
addNode(
"tr", table, rowAttr_);
1665 tableDiv = maker.
addNode(
"td", tableRow, messageAttr);
1666 maker.
addText(tableDiv,
"No output modules are available yet.");
1671 for (
unsigned int idx = 0;
idx < resultsList.size(); ++
idx)
1673 tableRow = maker.
addNode(
"tr", table, rowAttr_);
1674 tableDiv = maker.
addNode(
"td", tableRow);
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 );
1697 colspanAttr[
"colspan" ] =
"15";
1700 tableSuspiciousValueAttr[
"style" ] =
"background-color: yellow;";
1706 maker.
addText(tableDiv,
"Data Sender Overview");
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");
1741 if (rbResultsList.empty())
1744 messageAttr[
"align" ] =
"center";
1746 tableRow = maker.
addNode(
"tr", table, rowAttr_);
1747 tableDiv = maker.
addNode(
"td", tableRow, messageAttr);
1748 maker.
addText(tableDiv,
"No data senders have registered yet.");
1753 for (
unsigned int idx = 0;
idx < rbResultsList.size(); ++
idx)
1755 tableRow = maker.
addNode(
"tr", table, rowAttr_);
1757 tableDiv = maker.
addNode(
"td", tableRow);
1759 linkAttr[
"href" ] = baseURL() +
"/rbsenderdetail?id=" +
1760 boost::lexical_cast<
std::string>(rbResultsList[
idx]->uniqueRBID);
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() );
1777 if (rbResultsList[
idx]->faultyEventStats.getSampleCount() != 0)
1779 tableDiv = maker.
addNode(
"td", tableRow, tableSuspiciousValueAttr);
1783 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
1785 maker.
addInt( tableDiv, rbResultsList[
idx]->faultyEventStats.getSampleCount() );
1787 if (rbResultsList[
idx]->outstandingDataDiscardCount != 0)
1789 tableDiv = maker.
addNode(
"td", tableRow, tableSuspiciousValueAttr);
1793 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
1795 maker.
addInt( tableDiv, rbResultsList[
idx]->outstandingDataDiscardCount );
1797 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
1798 maker.
addInt( tableDiv, rbResultsList[
idx]->dqmEventStats.getSampleCount() );
1800 if (rbResultsList[
idx]->faultyDQMEventStats.getSampleCount() != 0)
1802 tableDiv = maker.
addNode(
"td", tableRow, tableSuspiciousValueAttr);
1806 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
1808 maker.
addInt( tableDiv, rbResultsList[
idx]->faultyDQMEventStats.getSampleCount() );
1810 if (rbResultsList[
idx]->outstandingDQMDiscardCount != 0)
1812 tableDiv = maker.
addNode(
"td", tableRow, tableSuspiciousValueAttr);
1816 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
1818 maker.
addInt( tableDiv, rbResultsList[
idx]->outstandingDQMDiscardCount );
1820 const int skippedDiscards = rbResultsList[
idx]->skippedDiscardStats.getSampleCount();
1821 if (skippedDiscards != 0)
1823 tableDiv = maker.
addNode(
"td", tableRow, tableSuspiciousValueAttr);
1827 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
1829 maker.
addInt( tableDiv, skippedDiscards );
1831 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
1832 maker.
addDouble( tableDiv, rbResultsList[
idx]->eventStats.
1834 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
1835 maker.
addInt( tableDiv, rbResultsList[
idx]->lastEventNumber );
1845 long long uniqueRBID,
1852 if (rbResultPtr.get() == 0)
1854 maker.
addText(parent,
"The requested resource broker page is not currently available.");
1862 colspanAttr[
"colspan" ] =
"2";
1865 tableAttr[
"width" ] =
"";
1871 maker.
addText(tableDiv,
"Resource Broker Details");
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");
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_);
1885 linkAttr[
"href" ] = rbResultPtr->key.hltURL +
"/urn:xdaq-application:lid=" +
1886 boost::lexical_cast<
std::string>(rbResultPtr->key.hltLocalId);
1888 maker.
addText(link, rbResultPtr->key.hltURL);
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);
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 );
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 );
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 );
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 );
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() );
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() );
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() );
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() );
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() );
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() );
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() );
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() );
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 );
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 );
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 );
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 );
2004 long long uniqueRBID,
2012 colspanAttr[
"colspan" ] =
"13";
2015 tableSuspiciousValueAttr[
"style" ] =
"background-color: yellow;";
2021 maker.
addText(tableDiv,
"Filter Units");
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");
2052 if (fuResultsList.empty())
2055 messageAttr[
"align" ] =
"center";
2057 tableRow = maker.
addNode(
"tr", table, rowAttr_);
2058 tableDiv = maker.
addNode(
"td", tableRow, messageAttr);
2059 maker.
addText(tableDiv,
"No filter units have registered yet.");
2064 for (
unsigned int idx = 0;
idx < fuResultsList.size(); ++
idx)
2066 tableRow = maker.
addNode(
"tr", table, rowAttr_);
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() );
2077 if (fuResultsList[
idx]->faultyEventStats.getSampleCount() != 0)
2079 tableDiv = maker.
addNode(
"td", tableRow, tableSuspiciousValueAttr);
2083 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
2085 maker.
addInt( tableDiv, fuResultsList[
idx]->faultyEventStats.getSampleCount() );
2087 if (fuResultsList[
idx]->outstandingDataDiscardCount != 0)
2089 tableDiv = maker.
addNode(
"td", tableRow, tableSuspiciousValueAttr);
2093 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
2095 maker.
addInt( tableDiv, fuResultsList[
idx]->outstandingDataDiscardCount );
2097 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
2098 maker.
addInt( tableDiv, fuResultsList[
idx]->dqmEventStats.getSampleCount() );
2100 if (fuResultsList[
idx]->faultyDQMEventStats.getSampleCount() != 0)
2102 tableDiv = maker.
addNode(
"td", tableRow, tableSuspiciousValueAttr);
2106 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
2108 maker.
addInt( tableDiv, fuResultsList[
idx]->faultyDQMEventStats.getSampleCount() );
2110 if (fuResultsList[
idx]->outstandingDQMDiscardCount != 0)
2112 tableDiv = maker.
addNode(
"td", tableRow, tableSuspiciousValueAttr);
2116 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
2118 maker.
addInt( tableDiv, fuResultsList[
idx]->outstandingDQMDiscardCount );
2120 const int skippedDiscards = fuResultsList[
idx]->skippedDiscardStats.getSampleCount();
2121 if (skippedDiscards != 0)
2123 tableDiv = maker.
addNode(
"td", tableRow, tableSuspiciousValueAttr);
2127 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
2129 maker.
addInt( tableDiv, skippedDiscards );
2131 tableDiv = maker.
addNode(
"td", tableRow, tableValueAttr_);
2132 maker.
addDouble( tableDiv, fuResultsList[
idx]->shortIntervalEventStats.
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 );
double getValueRate(DataSetType t=FULL) const
MonitoredQuantity::Stats eventFragmentSizeStats
void addOutputModuleTables(XHTMLMaker &maker, XHTMLMaker::Node *parent, DataSenderMonitorCollection const &) const
Node * addNode(const std::string &name, Node *parent, const AttrMap &attrs)
void addDOMforDQMEventStatistics(XHTMLMaker &maker, XHTMLMaker::Node *parent, DQMEventMonitorCollection const &) const
void addDouble(Node *parent, const double &value, const unsigned int &precision=2)
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
double entriesInStreamQueue
void throughputWebPage(xgi::Output *) const
ConsumerWebPageHelper_t consumerWebPageHelper_
RBResultPtr getOneResourceBrokerResult(UniqueResourceBrokerID_t) const
void addText(Node *parent, const std::string &)
void resourceBrokerOverview(xgi::Output *) const
std::string timeStampUTC(TimePoint_t)
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
double entriesInFragmentQueue
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
double streamQueueBandwidth
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
double getLastSampleValue() const
MonitoredQuantity::Stats numberOfTopLevelFoldersStats
boost::shared_ptr< StatisticsReporter > StatisticsReporterPtr
double fragmentQueueBandwidth
int numberOfInjectWorkers
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
double fragmentStoreMemoryUsed
const MonitoredQuantity & getAllStreamsBandwidthMQ() const
MonitoredQuantity::Stats dqmEventFragmentSizeStats
std::string link(std::string &nm, std::string &ns)
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
double dqmEventProcessorBusy
MonitoredQuantity::Stats dqmEventSizeStats
double fragmentProcessorBusy
void addRowForMinBandwidth(XHTMLMaker &maker, XHTMLMaker::Node *table, FragmentMonitorCollection::FragmentStats const &, const MonitoredQuantity::DataSetType) const
void addHex(Node *parent, const unsigned long &)
void getStats(FragmentStats &stats) const
double writtenEventsBandwidth
DiskUsageStatsPtrList diskUsageStatsList
edm::serviceregistry::AllArgsMaker< DTDataMonitorInterface, DTDataIntegrityTask > maker
MonitoredQuantity::Stats allFragmentSizeStats
void addFilterUnitList(XHTMLMaker &maker, XHTMLMaker::Node *parent, long long uniqueRBID, DataSenderMonitorCollection const &) const
void getFileRecords(FileRecordList &) const
void getStats(Stats &) const
std::map< std::string, std::string > AttrMap
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
utils::Duration_t duration
void addInt(Node *parent, const int &)
double memoryUsedInFragmentQueue
double getSampleRate(DataSetType t=FULL) const
void getStats(Stats &) const
utils::TimePoint_t absoluteTime
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
std::string innerStateName() const
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
double memoryUsedInDQMQueue
std::vector< RBResultPtr > ResourceBrokerResultsList
double getValueMax(DataSetType t=FULL) const
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "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
MonitoredQuantity::Stats eventFragmentBandwidthStats
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
void addResourceBrokerList(XHTMLMaker &maker, XHTMLMaker::Node *parent, DataSenderMonitorCollection const &) const
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 streamRecordsExist() const
bool compareRBResultPtrValues(DataSenderMonitorCollection::RBResultPtr firstValue, DataSenderMonitorCollection::RBResultPtr secondValue)
void addDOMforConfigString(XHTMLMaker &maker, XHTMLMaker::Node *parent, DiskWritingParams const &) const
ResourceBrokerResultsList getAllResourceBrokerResults() const
MonitoredQuantity::Stats dqmEventFragmentBandwidthStats
boost::circular_buffer< FileRecordPtr > FileRecordList
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_
MonitoredQuantity::Stats allFragmentBandwidthStats
double getValueSum(DataSetType t=FULL) const
std::vector< FUResultPtr > FilterUnitResultsList
double getSampleLatency(DataSetType t=FULL) const
double memoryUsedInStreamQueue
const MonitoredQuantity & getRunNumbersSeenMQ() const
MonitoredQuantity::Stats servedDQMEventSizeStats
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
bool statusMessage(std::string &msg) const
void defaultWebPage(xgi::Output *) const
void addDOMforRunMonitor(XHTMLMaker &maker, XHTMLMaker::Node *parent, RunMonitorCollection const &) const