#include <ResourceMonitorCollection.h>
Classes | |
struct | DiskUsage |
struct | DiskUsageStats |
struct | Stats |
Public Types | |
typedef boost::shared_ptr < DiskUsageStats > | DiskUsageStatsPtr |
typedef std::vector < DiskUsageStatsPtr > | DiskUsageStatsPtrList |
Public Types inherited from stor::MonitorCollection | |
typedef std::vector< std::pair < std::string, xdata::Serializable * > > | InfoSpaceItems |
Public Member Functions | |
void | configureAlarms (AlarmParams const &) |
void | configureDisks (DiskWritingParams const &) |
void | configureResources (ResourceMonitorParams const &) |
void | getStats (Stats &) const |
ResourceMonitorCollection (const utils::Duration_t &updateInterval, AlarmHandlerPtr) | |
Public Member Functions inherited from stor::MonitorCollection | |
void | appendInfoSpaceItems (InfoSpaceItems &) |
void | calculateStatistics (const utils::TimePoint_t &now) |
MonitorCollection (const utils::Duration_t &updateInterval) | |
void | reset (const utils::TimePoint_t &now) |
void | updateInfoSpaceItems () |
virtual | ~MonitorCollection () |
Private Types | |
typedef boost::shared_ptr < DiskUsage > | DiskUsagePtr |
typedef std::vector< DiskUsagePtr > | DiskUsagePtrList |
typedef std::set< std::string > | SATABeasts |
Private Attributes | |
AlarmHandlerPtr | alarmHandler_ |
AlarmParams | alarmParams_ |
xdata::UnsignedInteger32 | copyWorkers_ |
xdata::Vector< xdata::String > | diskPaths_ |
DiskUsagePtrList | diskUsageList_ |
boost::mutex | diskUsageListMutex_ |
DiskWritingParams | dwParams_ |
xdata::UnsignedInteger32 | injectWorkers_ |
int | latchedSataBeastStatus_ |
unsigned int | nLogicalDisks_ |
int | numberOfCopyWorkers_ |
xdata::UnsignedInteger32 | numberOfDisks_ |
int | numberOfInjectWorkers_ |
ResourceMonitorParams | rmParams_ |
xdata::Integer32 | sataBeastStatus_ |
xdata::Vector < xdata::UnsignedInteger32 > | totalDiskSpace_ |
const utils::Duration_t | updateInterval_ |
xdata::Vector < xdata::UnsignedInteger32 > | usedDiskSpace_ |
Friends | |
class | testResourceMonitorCollection |
Additional Inherited Members |
A collection of MonitoredQuantities related to resource usages
Definition at line 44 of file ResourceMonitorCollection.h.
|
private |
Definition at line 121 of file ResourceMonitorCollection.h.
|
private |
Definition at line 122 of file ResourceMonitorCollection.h.
typedef boost::shared_ptr<DiskUsageStats> stor::ResourceMonitorCollection::DiskUsageStatsPtr |
Definition at line 59 of file ResourceMonitorCollection.h.
typedef std::vector<DiskUsageStatsPtr> stor::ResourceMonitorCollection::DiskUsageStatsPtrList |
Definition at line 60 of file ResourceMonitorCollection.h.
|
private |
Definition at line 156 of file ResourceMonitorCollection.h.
stor::ResourceMonitorCollection::ResourceMonitorCollection | ( | const utils::Duration_t & | updateInterval, |
AlarmHandlerPtr | ah | ||
) |
Constructor.
Definition at line 30 of file ResourceMonitorCollection.cc.
|
private |
|
private |
Definition at line 72 of file ResourceMonitorCollection.cc.
References diskUsageList_, and retrieveDiskSize().
Referenced by addOtherDisks(), and configureDisks().
|
private |
Definition at line 82 of file ResourceMonitorCollection.cc.
References addDisk(), dwParams_, and stor::DiskWritingParams::otherDiskPaths_.
Referenced by configureDisks().
|
private |
Definition at line 242 of file ResourceMonitorCollection.cc.
References diskUsageList_, diskUsageListMutex_, and retrieveDiskSize().
Referenced by do_calculateStatistics(), and do_updateInfoSpaceItems().
|
private |
Definition at line 370 of file ResourceMonitorCollection.cc.
References alarmParams_, checkNumberOfCopyWorkers(), stor::ResourceMonitorParams::WorkerParams::command_, stor::ResourceMonitorParams::copyWorkers_, stor::ResourceMonitorParams::WorkerParams::expectedCount_, getProcessCount(), stor::AlarmParams::isProductionSystem_, numberOfCopyWorkers_, rmParams_, and stor::ResourceMonitorParams::WorkerParams::user_.
Referenced by do_calculateStatistics().
|
private |
Definition at line 410 of file ResourceMonitorCollection.cc.
References alarmParams_, checkNumberOfInjectWorkers(), stor::ResourceMonitorParams::WorkerParams::command_, stor::ResourceMonitorParams::WorkerParams::expectedCount_, getProcessCount(), stor::ResourceMonitorParams::injectWorkers_, stor::AlarmParams::isProductionSystem_, numberOfInjectWorkers_, rmParams_, and stor::ResourceMonitorParams::WorkerParams::user_.
Referenced by do_calculateStatistics().
|
private |
Definition at line 390 of file ResourceMonitorCollection.cc.
References alarmHandler_, stor::ResourceMonitorParams::copyWorkers_, stor::ResourceMonitorParams::WorkerParams::expectedCount_, lumiQueryAPI::msg, numberOfCopyWorkers_, rmParams_, AlCaHLTBitMon_QueryRunRegistry::string, and stor::AlarmHandler::WARNING.
Referenced by calcNumberOfCopyWorkers().
|
private |
Definition at line 432 of file ResourceMonitorCollection.cc.
References alarmHandler_, stor::ResourceMonitorParams::WorkerParams::expectedCount_, stor::ResourceMonitorParams::injectWorkers_, lumiQueryAPI::msg, numberOfInjectWorkers_, rmParams_, AlCaHLTBitMon_QueryRunRegistry::string, and stor::AlarmHandler::WARNING.
Referenced by calcNumberOfInjectWorkers().
|
private |
Definition at line 503 of file ResourceMonitorCollection.cc.
References alarmHandler_, checkSataDisks(), stor::AlarmHandler::ERROR, and latchedSataBeastStatus_.
Referenced by checkSataBeasts().
|
private |
Definition at line 452 of file ResourceMonitorCollection.cc.
References checkSataBeast(), getSataBeasts(), and latchedSataBeastStatus_.
Referenced by do_calculateStatistics().
|
private |
Definition at line 517 of file ResourceMonitorCollection.cc.
References ws_sso_content_reader::content, stor::CurlInterface::getInterface(), lumiQueryAPI::msg, runEdmFileComparison::returnCode, AlCaHLTBitMon_QueryRunRegistry::string, and stor::AlarmHandler::WARNING.
Referenced by checkSataBeast().
void stor::ResourceMonitorCollection::configureAlarms | ( | AlarmParams const & | alarmParams | ) |
Configures the alarms
Definition at line 105 of file ResourceMonitorCollection.cc.
Referenced by stor::Ready::do_entryActionWork().
void stor::ResourceMonitorCollection::configureDisks | ( | DiskWritingParams const & | dwParams | ) |
Configures the disks used to write events
Definition at line 44 of file ResourceMonitorCollection.cc.
References addDisk(), addOtherDisks(), alarmParams_, stor::DiskWritingParams::dbFilePath_, diskUsageList_, diskUsageListMutex_, dwParams_, stor::DiskWritingParams::filePath_, i, stor::AlarmParams::isProductionSystem_, max(), stor::DiskWritingParams::nLogicalDisk_, nLogicalDisks_, stor::DiskWritingParams::otherDiskPaths_, and EgammaValidation_cff::pathName.
Referenced by stor::Ready::do_entryActionWork().
void stor::ResourceMonitorCollection::configureResources | ( | ResourceMonitorParams const & | rmParams | ) |
Configures the resources to be monitored
Definition at line 96 of file ResourceMonitorCollection.cc.
Referenced by stor::Ready::do_entryActionWork().
|
privatevirtual |
Reimplemented from stor::MonitorCollection.
Definition at line 179 of file ResourceMonitorCollection.cc.
References copyWorkers_, diskPaths_, injectWorkers_, numberOfDisks_, sataBeastStatus_, totalDiskSpace_, and usedDiskSpace_.
|
privatevirtual |
Implements stor::MonitorCollection.
Definition at line 146 of file ResourceMonitorCollection.cc.
References calcDiskUsage(), calcNumberOfCopyWorkers(), calcNumberOfInjectWorkers(), and checkSataBeasts().
|
privatevirtual |
Implements stor::MonitorCollection.
Definition at line 155 of file ResourceMonitorCollection.cc.
References diskUsageList_, diskUsageListMutex_, latchedSataBeastStatus_, numberOfCopyWorkers_, numberOfInjectWorkers_, and stor::AlarmHandler::OKAY.
|
privatevirtual |
Reimplemented from stor::MonitorCollection.
Definition at line 191 of file ResourceMonitorCollection.cc.
References calcDiskUsage(), copyWorkers_, diskPaths_, stor::ResourceMonitorCollection::Stats::diskUsageStatsList, getStats(), injectWorkers_, nLogicalDisks_, stor::ResourceMonitorCollection::Stats::numberOfCopyWorkers, numberOfDisks_, stor::ResourceMonitorCollection::Stats::numberOfInjectWorkers, stor::ResourceMonitorCollection::Stats::sataBeastStatus, sataBeastStatus_, totalDiskSpace_, and usedDiskSpace_.
|
private |
Definition at line 294 of file ResourceMonitorCollection.cc.
References stor::utils::sleep().
Referenced by retrieveDiskSize().
|
private |
Definition at line 309 of file ResourceMonitorCollection.cc.
References alarmHandler_, stor::AlarmHandler::ERROR, stor::AlarmHandler::FATAL, isImportantDisk(), lumiQueryAPI::msg, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by retrieveDiskSize().
|
private |
Definition at line 332 of file ResourceMonitorCollection.cc.
References alarmHandler_, dwParams_, stor::DiskWritingParams::failHighWaterMark_, stor::AlarmHandler::FATAL, isImportantDisk(), and stor::AlarmHandler::WARNING.
Referenced by retrieveDiskSize().
|
private |
Definition at line 124 of file ResourceMonitorCollection.cc.
References diskUsageList_, diskUsageListMutex_, and stor::ResourceMonitorCollection::Stats::diskUsageStatsList.
Referenced by getStats().
|
private |
Definition at line 665 of file ResourceMonitorCollection.cc.
References prof2calltree::count, alcazmumu_cfi::filter, and n.
Referenced by calcNumberOfCopyWorkers(), and calcNumberOfInjectWorkers().
|
private |
Definition at line 474 of file ResourceMonitorCollection.cc.
References alarmParams_, query::host, recoMuon::in, stor::AlarmParams::isProductionSystem_, geometryCSVtoXML::line, pos, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by checkSataBeasts().
void stor::ResourceMonitorCollection::getStats | ( | Stats & | stats | ) | const |
Write all our collected statistics into the given Stats struct.
Definition at line 113 of file ResourceMonitorCollection.cc.
References getDiskStats(), latchedSataBeastStatus_, stor::ResourceMonitorCollection::Stats::numberOfCopyWorkers, numberOfCopyWorkers_, stor::ResourceMonitorCollection::Stats::numberOfInjectWorkers, numberOfInjectWorkers_, and stor::ResourceMonitorCollection::Stats::sataBeastStatus.
Referenced by stor::SMWebPageHelper::addDOMforResourceUsage(), and do_updateInfoSpaceItems().
|
private |
Definition at line 352 of file ResourceMonitorCollection.cc.
References begin, dwParams_, end, spr::find(), and stor::DiskWritingParams::otherDiskPaths_.
Referenced by emitDiskAlarm(), and emitDiskSpaceAlarm().
|
private |
|
private |
Definition at line 256 of file ResourceMonitorCollection.cc.
References doStatFs(), dwParams_, emitDiskAlarm(), emitDiskSpaceAlarm(), stor::DiskWritingParams::highWaterMark_, and revokeDiskAlarm().
Referenced by addDisk(), and calcDiskUsage().
|
private |
Definition at line 362 of file ResourceMonitorCollection.cc.
References alarmHandler_, and stor::AlarmHandler::OKAY.
Referenced by retrieveDiskSize().
|
private |
Definition at line 554 of file ResourceMonitorCollection.cc.
References end, stor::AlarmHandler::ERROR, flags, dqm_diff::start, and AlCaHLTBitMon_QueryRunRegistry::string.
|
friend |
Definition at line 49 of file ResourceMonitorCollection.h.
|
private |
Definition at line 127 of file ResourceMonitorCollection.h.
Referenced by checkNumberOfCopyWorkers(), checkNumberOfInjectWorkers(), checkSataBeast(), emitDiskAlarm(), emitDiskSpaceAlarm(), and revokeDiskAlarm().
|
private |
Definition at line 165 of file ResourceMonitorCollection.h.
Referenced by calcNumberOfCopyWorkers(), calcNumberOfInjectWorkers(), configureDisks(), and getSataBeasts().
|
private |
Definition at line 172 of file ResourceMonitorCollection.h.
Referenced by do_appendInfoSpaceItems(), and do_updateInfoSpaceItems().
|
private |
Definition at line 176 of file ResourceMonitorCollection.h.
Referenced by do_appendInfoSpaceItems(), and do_updateInfoSpaceItems().
|
private |
Definition at line 123 of file ResourceMonitorCollection.h.
Referenced by addDisk(), calcDiskUsage(), configureDisks(), do_reset(), and getDiskStats().
|
mutableprivate |
Definition at line 124 of file ResourceMonitorCollection.h.
Referenced by calcDiskUsage(), configureDisks(), do_reset(), and getDiskStats().
|
private |
Definition at line 163 of file ResourceMonitorCollection.h.
Referenced by addOtherDisks(), configureDisks(), emitDiskSpaceAlarm(), isImportantDisk(), and retrieveDiskSize().
|
private |
Definition at line 173 of file ResourceMonitorCollection.h.
Referenced by do_appendInfoSpaceItems(), and do_updateInfoSpaceItems().
|
private |
Definition at line 170 of file ResourceMonitorCollection.h.
Referenced by checkSataBeast(), checkSataBeasts(), do_reset(), and getStats().
|
private |
Definition at line 169 of file ResourceMonitorCollection.h.
Referenced by configureDisks(), and do_updateInfoSpaceItems().
|
private |
Definition at line 167 of file ResourceMonitorCollection.h.
Referenced by calcNumberOfCopyWorkers(), checkNumberOfCopyWorkers(), do_reset(), and getStats().
|
private |
Definition at line 175 of file ResourceMonitorCollection.h.
Referenced by do_appendInfoSpaceItems(), and do_updateInfoSpaceItems().
|
private |
Definition at line 168 of file ResourceMonitorCollection.h.
Referenced by calcNumberOfInjectWorkers(), checkNumberOfInjectWorkers(), do_reset(), and getStats().
|
private |
Definition at line 164 of file ResourceMonitorCollection.h.
Referenced by calcNumberOfCopyWorkers(), calcNumberOfInjectWorkers(), checkNumberOfCopyWorkers(), and checkNumberOfInjectWorkers().
|
private |
Definition at line 174 of file ResourceMonitorCollection.h.
Referenced by do_appendInfoSpaceItems(), and do_updateInfoSpaceItems().
|
private |
Definition at line 177 of file ResourceMonitorCollection.h.
Referenced by do_appendInfoSpaceItems(), and do_updateInfoSpaceItems().
|
private |
Definition at line 126 of file ResourceMonitorCollection.h.
|
private |
Definition at line 178 of file ResourceMonitorCollection.h.
Referenced by do_appendInfoSpaceItems(), and do_updateInfoSpaceItems().