SysmosSysmos Docs
Server Agent

eBPF Metrics

Deep dive into the kernel-level metrics collected by the Sysmos eBPF probes.

The Sysmos agent uses eBPF (extended Berkeley Packet Filter) to attach lightweight probes to kernel functions. This provides deep visibility without modifying your applications or requiring kernel modules.

How It Works

The agent uses the cilium/ebpf Go library with bpf2go to compile C-based BPF programs into Go bindings at build time. At runtime, the compiled BPF programs are loaded into the kernel and attach to specific tracepoints and kprobes.

All BPF resources are cleaned up on shutdown using deferred close handlers — no kernel state is left behind.

Metrics Reference

TCP Connection Tracking

Attaches to tcp_connect, tcp_close, and related kernel functions.

MetricTypeDescription
tcp.active_connectionsGaugeCurrent number of active TCP connections
tcp.connections_per_secondRateNew connections established per second
tcp.close_rateRateConnections closed per second
tcp.retransmitsCounterTCP segment retransmissions
tcp.rtt_usHistogramRound-trip time distribution in microseconds

DNS Resolution

Monitors DNS query/response via UDP socket tracing.

MetricTypeDescription
dns.queries_per_secondRateDNS queries sent per second
dns.latency_msHistogramDNS resolution latency distribution
dns.failuresCounterFailed DNS resolutions
dns.cache_hitsCounterQueries served from local cache

File I/O

Attaches to VFS read/write functions for per-file I/O visibility.

MetricTypeDescription
file.read_latency_usHistogramFile read latency distribution
file.write_latency_usHistogramFile write latency distribution
file.read_bytesCounterBytes read from disk
file.write_bytesCounterBytes written to disk

Process Monitoring

Tracks process creation and resource usage via sched_process_exec and sched_process_exit tracepoints.

MetricTypeDescription
process.top_cpuGaugeTop processes by CPU usage
process.top_memoryGaugeTop processes by memory usage
process.spawn_rateRateNew process creation rate
process.exit_rateRateProcess exit rate

Kernel Requirements

FeatureMinimum Kernel
Basic eBPF4.15
BTF support (required)5.2
BPF ring buffer5.8
Full Sysmos agent5.8+

Fallback Mode

If eBPF is unavailable (unsupported kernel, insufficient capabilities), the agent falls back to collecting metrics from /proc and /sys. You'll still get CPU, memory, disk, and network metrics — just without the kernel-level depth.

To explicitly disable eBPF:

collection:
  ebpf_enabled: false

On this page