zeek/src/telemetry/ProcessStats.h
Tim Wojtulewicz a6843067e9 Split cpu time metric into user/system components like prof.log
The total can be calculated from the two parts via Prometheus/Grafana
if desired, so it's more informative to pass them as separate parts.
2024-08-05 13:27:30 -07:00

24 lines
436 B
C++

#pragma once
#include "zeek/zeek-config.h"
#include <cstdint>
namespace zeek::telemetry::detail {
struct process_stats {
int64_t rss = 0;
int64_t vms = 0;
double cpu_user = 0.0;
double cpu_system = 0.0;
int64_t fds = 0;
};
#if defined(__APPLE__) || defined(HAVE_LINUX) || defined(__FreeBSD__)
#define HAVE_PROCESS_STAT_METRICS
process_stats get_process_stats();
#endif
} // namespace zeek::telemetry::detail