23 #ifndef _PLUGINS_PROCRRD_PROCRRD_THREAD_H_
24 #define _PLUGINS_PROCRRD_PROCRRD_THREAD_H_
26 #include <aspect/clock.h>
27 #include <aspect/configurable.h>
28 #include <aspect/logging.h>
29 #include <config/change_handler.h>
30 #include <core/threading/thread.h>
31 #include <plugins/rrd/aspect/rrd.h>
61 void add_process(
const char *path,
const std::string &pid,
const std::string &
name);
62 void remove_process(
const char *path);
63 std::string get_process_id(
const char *process);
64 void get_cpu(
unsigned long int *cpus);
66 virtual void config_tag_changed(
const char *new_tag);
69 virtual void config_value_erased(
const char *path);
74 std::string netinterface_;
75 unsigned long int *lastcpu_;
87 unsigned long int * last_cpu;
96 typedef std::map<std::string, ProcessInfo> ProcessMap;
97 ProcessMap processes_;
virtual ~ProcRRDThread()
Destructor.
ProcRRDThread()
Constructor.
virtual void init()
Initialize the thread.
virtual void run()
Stub to see name in backtrace for easier debugging.
virtual void loop()
Code to execute in the thread.
virtual void finalize()
Finalize the thread.
Thread aspect that allows to obtain the current time from the clock.
Thread aspect to access configuration data.
Interface for configuration change handling.
Iterator interface to iterate over config values.
Thread aspect to log output.
Thread aspect create, update, and graph round-robin databases (RRD).
Class representing a graph definition.
Thread class encapsulation of pthreads.
const char * name() const
Get name of thread.
Fawkes library namespace.