23 const std::string &fqrn,
37 "No implementation available for given telemetry class.");
42 if (telemetry->
weak_ref()->is_zombie_) {
44 "Requested telemetry will NOT be used. "
45 "It was not constructed correctly.");
75 struct pollfd watch_term;
77 watch_term.events = POLLIN | POLLPRI;
83 watch_term.revents = 0;
84 int retval = poll(&watch_term, 1, timeout_ms);
87 if (timeout_ms >= 0) {
89 timeout_ms = (now > deadline_sec) ? 0 :
90 static_cast<int>((deadline_sec - now) * 1000);
95 "Poll returned %d", retval);
111 assert(watch_term.revents != 0);
virtual void PushMetrics()=0
pthread_t thread_telemetry_
assert((mem||(size==0))&&"Out Of Memory")
void MakePipe(int pipe_fd[2])
static TelemetryAggregator * Create(Statistics *statistics, int send_rate, OptionsManager *options_mgr, const std::string &fqrn, const TelemetrySelector type)
void SnapshotCounters(std::map< std::string, int64_t > *counters, uint64_t *timestamp_ns)
std::map< std::string, int64_t > counters_
virtual ~TelemetryAggregator()
static void * MainTelemetry(void *data)
void WritePipe(int fd, const void *buf, size_t nbyte)
void ReadPipe(int fd, void *buf, size_t nbyte)
void ClosePipe(int pipe_fd[2])
CVMFS_EXPORT void LogCvmfs(const LogSource source, const int mask, const char *format,...)