4 #ifndef EventFilter_StorageManager_ResourceMonitorCollection_h
5 #define EventFilter_StorageManager_ResourceMonitorCollection_h
15 #include <boost/thread/mutex.hpp>
16 #include <boost/shared_ptr.hpp>
18 #include "xdata/Integer32.h"
19 #include "xdata/String.h"
20 #include "xdata/UnsignedInteger32.h"
21 #include "xdata/Vector.h"
30 class testResourceMonitorCollection;
126 void addDisk(
const std::string&);
141 int getProcessCount(
const std::string& processName,
const int& uid=-1);
147 bool checkSataDisks(
const std::string& sataBeast,
const std::string& hostSuffix);
171 #endif // EventFilter_StorageManager_ResourceMonitorCollection_h
virtual void do_updateInfoSpaceItems()
ResourceMonitorParams rmParams_
int numberOfInjectWorkers_
void calcNumberOfInjectWorkers()
void checkNumberOfInjectWorkers()
boost::mutex diskUsageListMutex_
void calcNumberOfCopyWorkers()
void emitDiskSpaceAlarm(DiskUsagePtr)
ResourceMonitorCollection(const utils::Duration_t &updateInterval, AlarmHandlerPtr)
static boost::mutex mutex
std::vector< DiskUsagePtr > DiskUsagePtrList
xdata::UnsignedInteger32 numberOfDisks_
void getDiskStats(Stats &) const
int latchedSataBeastStatus_
boost::shared_ptr< DiskUsage > DiskUsagePtr
int numberOfInjectWorkers
ResourceMonitorCollection & operator=(ResourceMonitorCollection const &)
const utils::Duration_t updateInterval_
xdata::UnsignedInteger32 copyWorkers_
boost::posix_time::time_duration Duration_t
xdata::Integer32 sataBeastStatus_
DiskWritingParams dwParams_
xdata::Vector< xdata::UnsignedInteger32 > usedDiskSpace_
DiskUsageStatsPtrList diskUsageStatsList
void configureDisks(DiskWritingParams const &)
xdata::UnsignedInteger32 injectWorkers_
void getStats(Stats &) const
void retrieveDiskSize(DiskUsagePtr)
std::set< std::string > SATABeasts
bool checkSataDisks(const std::string &sataBeast, const std::string &hostSuffix)
xdata::Vector< xdata::UnsignedInteger32 > totalDiskSpace_
AlarmHandler::ALARM_LEVEL alarmState
boost::shared_ptr< AlarmHandler > AlarmHandlerPtr
void configureAlarms(AlarmParams const &)
void failIfImportantDisk(DiskUsagePtr)
virtual void do_appendInfoSpaceItems(InfoSpaceItems &)
std::vector< DiskUsageStatsPtr > DiskUsageStatsPtrList
void checkSataBeast(const std::string &sataBeast)
xdata::Vector< xdata::String > diskPaths_
bool getSataBeasts(SATABeasts &sataBeasts)
boost::shared_ptr< DiskUsageStats > DiskUsageStatsPtr
std::vector< std::pair< std::string, xdata::Serializable * > > InfoSpaceItems
unsigned int nLogicalDisks_
AlarmHandler::ALARM_LEVEL alarmState
void revokeDiskAlarm(DiskUsagePtr)
void updateSataBeastStatus(const std::string &sataBeast, const std::string &content)
friend class testResourceMonitorCollection
void emitDiskAlarm(DiskUsagePtr, error_t)
void configureResources(ResourceMonitorParams const &)
AlarmHandlerPtr alarmHandler_
void checkNumberOfCopyWorkers()
int getProcessCount(const std::string &processName, const int &uid=-1)
void addDisk(const std::string &)
virtual void do_calculateStatistics()
DiskUsagePtrList diskUsageList_