GpfsmonSensorBase.h 856 Bytes
Newer Older
lu43jih's avatar
lu43jih committed
1
/*
lu43jih's avatar
lu43jih committed
2
 * GpfsmonSensorBase.h
lu43jih's avatar
lu43jih committed
3
4
 *
 *  Created on: 26.11.2018
lu43jih's avatar
lu43jih committed
5
 *      Author: Carla Guillen
lu43jih's avatar
lu43jih committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 */

#ifndef GPFSMON_GPFSMONSENSORBASE_H_
#define GPFSMON_GPFSMONSENSORBASE_H_

#include "../../includes/SensorBase.h"

#include <regex>


	enum GPFS_METRIC {
		TIMESTAMP_GPFS=0,
		IOBYTESREAD=1,
		IOBYTESWRITE=2,
		IOOPENS=3,
		IOCLOSES=4,
		IOREADS=5,
		IOWRITES=6,
		READDIR=7,
		INODE_UPDATES=8,
		SIZE = INODE_UPDATES +1
	};

class GpfsmonSensorBase : public SensorBase {
public:
lu43jih's avatar
lu43jih committed
31
32
	GpfsmonSensorBase(const std::string& name) :
		SensorBase(name), _metric_type(GPFS_METRIC::SIZE) {
lu43jih's avatar
lu43jih committed
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
		setDelta(true);
	}

	virtual ~GpfsmonSensorBase() {
	}

	GPFS_METRIC getMetricType() const {
		return _metric_type;
	}

	void setMetricType(GPFS_METRIC metricType) {
		_metric_type = metricType;
	}

protected:
	GPFS_METRIC _metric_type;
};

#endif /* GPFSMON_GPFSMONSENSORBASE_H_ */