quark_queue_get_stats —
fetch 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;
u64 garbage_collections;
u64 stalls;
int backend;
};
- insertions
- 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.
- removals
- A counter of removals of the above, you can count alive items by counting
the difference.
- aggregations
- 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.
- non_aggregations
- The opposite of aggregations. It is increased by one
when we didn't aggregate.
- lost
- A counter of missed backend events. This can happen if the user didn't
call
quark_queue_get_event(3)
fast enough or if
quark
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.
- garbage_collections
- A counter of cached objects (processes, sockets and pods) that were
deleted after expiring their grace time.
- stalls
- A counter of perf rings that are stalled due to corrupt records. A stalled
ring is abandoned and no further events are read from it. Only meaningful
on the
QQ_KPROBE backend, zero on
QQ_EBPF.
- backend
- Active queue backend, either
QQ_EBPF or
QQ_KPROBE.
quark_event_dump(3),
quark_process_lookup(3),
quark_queue_block(3),
quark_queue_close(3),
quark_queue_default_attr(3),
quark_queue_get_event(3),
quark_queue_open(3),
quark(7),
quark-btf(8),
quark-mon(8),
quark-test(8)