13#ifndef ZIGPC_DIAGNOSTIC_UPTIME_H
14#define ZIGPC_DIAGNOSTIC_UPTIME_H
17#include <linux/unistd.h>
19#include <linux/kernel.h>
20#include <sys/sysinfo.h>
38 struct sysinfo s_info;
39 int error = sysinfo(&s_info);
42 "Failed to read uptime code error = %d\n",
46 value = s_info.uptime;
Abstract top level metric from which all diagnostic metric derive from.
Definition: zigpc_diagnostics_metric.hpp:25
zigpc_diagnostics_notification & on_update_complete
Definition: zigpc_diagnostics_metric.hpp:28
std::string serialized_value
Definition: zigpc_diagnostics_metric.hpp:30
std::string metric_id
Definition: zigpc_diagnostics_metric.hpp:29
Definition: zigpc_diagnostics_notification.hpp:20
virtual void notify(std::string metric_id)
Definition: zigpc_diagnostics_notification.hpp:22
Definition: zigpc_uptime.hpp:26
zigpc_uptime_metric(zigpc_diagnostics_notification ¬if, std::string metric_id)
Definition: zigpc_uptime.hpp:31
long value
Definition: zigpc_uptime.hpp:28
void update_value()
Definition: zigpc_uptime.hpp:36
~zigpc_uptime_metric()
Definition: zigpc_uptime.hpp:35
#define sl_log_error(tag, fmtstr,...)
Definition: sl_log.h:145