QUARK_QUEUE_GET_STATS(3) Library Functions Manual QUARK_QUEUE_GET_STATS(3)

quark_queue_get_statsfetch queue statistics

#include <quark.h>

void
quark_queue_get_stats(struct quark_queue *qq, struct quark_queue_stats *qs);

quark_queue_get_stats copies out all internal statistics from qq into qs. quark_queue_stats is defined as:
struct quark_queue_stats {
	u64	insertions;
	u64	removals;
	u64	aggregations;
	u64	non_aggregations;
	u64	lost;
};
A counter of all events that were inserted into the queue sorting/buffering structures, this is roughly 1:1 with the actual events we read from the backend.
A counter of removals of the above, you can count alive items by counting the difference.
A counter of how many events were aggregated, this is an absolute counter, meaning a FORK+EXEC+EXIT counts as 1 aggregation, which consumes 3 events.
The opposite of aggregations. It is increased by one when we didn't aggregate.
A a counter of missed backend events. This can happen if the user didn't call quark_queue_get_events(3) fast enough or if simply can't handle the load, the former is way more likely. It is a state counter representing total loss, the user should compare to an old reading to know if it increased.

quark_event_dump(3), quark_process_lookup(3), quark_queue_block(3), quark_queue_close(3), quark_queue_default_attr(3), quark_queue_get_events(3), quark_queue_open(3), quark(7), quark-btf(8), quark-mon(8)

September 19, 2024 Linux