GpfsmonSensorGroup.h 1.02 KB
Newer Older
lu43jih's avatar
lu43jih committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * gpfsmonSensorGroup.h
 *
 *  Created on: 26.11.2018
 *      Author: Your name goes here!
 */

#ifndef GPFSMON_GPFSMONSENSORGROUP_H_
#define GPFSMON_GPFSMONSENSORGROUP_H_

#include "../../includes/SensorGroupTemplate.h"

#include "GpfsmonSensorBase.h"

using Gpfs_SB = std::shared_ptr<GpfsmonSensorBase>;

class GpfsmonSensorGroup : public SensorGroupTemplate<GpfsmonSensorBase> {
public:
	GpfsmonSensorGroup(const std::string& name);
	virtual ~GpfsmonSensorGroup();

	void init(boost::asio::io_service& io) override;
	void start() override;
	void stop() override;

lu43jih's avatar
lu43jih committed
26
27
	GpfsmonSensorGroup& operator=(const GpfsmonSensorGroup& other);

lu43jih's avatar
lu43jih committed
28
29
30
31
32
33
private:
	void read() override;
	void readAsync() override;

	void createTempFile();

lu43jih's avatar
lu43jih committed
34
	const std::string cmd_io = "/usr/lpp/mmfs/bin/mmpmon -p -i /tmp/gpfsmon"; //todo change to real command
lu43jih's avatar
lu43jih committed
35
36

	Gpfs_SB searchDummy;
lu43jih's avatar
lu43jih committed
37
38
	std::vector<uint64_t> data;
	constexpr static int BUFFER_SIZE=255; //!< constant buffer that is parse by a line given from the popen command
lu43jih's avatar
lu43jih committed
39
40
41
42
43
};



#endif /* GPFSMON_GPFSMONSENSORGROUP_H_ */