23 #ifndef __PLUGINS_PROCRRD_PROCRRD_THREAD_H_ 24 #define __PLUGINS_PROCRRD_PROCRRD_THREAD_H_ 26 #include <core/threading/thread.h> 27 #include <aspect/logging.h> 28 #include <aspect/configurable.h> 29 #include <aspect/clock.h> 30 #include <plugins/rrd/aspect/rrd.h> 31 #include <config/change_handler.h> 54 protected:
virtual void run() { Thread::run(); }
57 void add_process(
const char *path, std::string pid, std::string
name);
58 void remove_process(
const char *path);
59 std::string get_process_id(
const char *process);
60 void get_cpu(
unsigned long int* cpus);
62 virtual void config_tag_changed(
const char *new_tag);
65 virtual void config_value_erased(
const char *path);
70 std::string __netinterface;
71 unsigned long int *__lastcpu;
82 unsigned long int *last_cpu;
91 typedef std::map<std::string, ProcessInfo> ProcessMap;
92 ProcessMap __processes;
virtual void loop()
Code to execute in the thread.
Thread aspect that allows to obtain the current time from the clock.
Fawkes library namespace.
Interface for configuration change handling.
virtual void run()
Stub to see name in backtrace for easier debugging.
Thread class encapsulation of pthreads.
virtual void finalize()
Finalize the thread.
Thread aspect create, update, and graph round-robin databases (RRD).
Class representing a graph definition.
virtual ~ProcRRDThread()
Destructor.
const char * name() const
Get name of thread.
Thread aspect to log output.
Thread aspect to access configuration data.
Iterator interface to iterate over config values.
ProcRRDThread()
Constructor.
virtual void init()
Initialize the thread.