4 #ifndef EventFilter_StorageManager_ResourceMonitorCollection_h
5 #define EventFilter_StorageManager_ResourceMonitorCollection_h
13 #include <sys/param.h>
14 #include <sys/mount.h>
16 #include <sys/statfs.h>
19 #include <boost/thread/mutex.hpp>
20 #include <boost/shared_ptr.hpp>
22 #include "xdata/Integer32.h"
23 #include "xdata/String.h"
24 #include "xdata/UnsignedInteger32.h"
25 #include "xdata/Vector.h"
34 class testResourceMonitorCollection;
138 void addDisk(
const std::string&);
154 int getProcessCount(
const std::string& processName,
const int& uid=-1);
160 bool checkSataDisks(
const std::string& sataBeast,
const std::string& hostSuffix);
184 #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
bool isImportantDisk(const std::string &)
xdata::Integer32 sataBeastStatus_
DiskWritingParams dwParams_
xdata::Vector< xdata::UnsignedInteger32 > usedDiskSpace_
DiskUsageStatsPtrList diskUsageStatsList
void configureDisks(DiskWritingParams const &)
xdata::UnsignedInteger32 injectWorkers_
void getStats(Stats &) const
void doStatFs(DiskUsagePtr)
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
const std::string pathName_
boost::shared_ptr< AlarmHandler > AlarmHandlerPtr
AlarmHandler::ALARM_LEVEL alarmState_
void configureAlarms(AlarmParams const &)
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_
void revokeDiskAlarm(DiskUsagePtr)
void updateSataBeastStatus(const std::string &sataBeast, const std::string &content)
friend class testResourceMonitorCollection
void configureResources(ResourceMonitorParams const &)
void emitDiskAlarm(DiskUsagePtr)
DiskUsage(const std::string &pathName)
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_