Sysctl as a Service, or: making sysctl(3) more friendly for monitoring systems

Ed Schouten ed at nuxi.nl
Mon Dec 12 13:35:06 UTC 2016


Hi Jonathan,

2016-12-11 21:12 GMT+01:00 Jonathan Anderson <jonathan at freebsd.org>:
> Rather than doing lots of system calls to
> enumerate clearly-related sysctl values, it would be very cool to do one
> system call and then inspect the resulting data structure in memory.

I'm not sure it's worth tackling this problem at this time. My current
version of the exporter is already pretty fast:

$ time ./prometheus_sysctl_exporter | wc -l
        0.00 real         0.00 user         0.00 sys
    3162

If our sysctl tree would get substantially larger at some point, we
should of course revisit this.

-- 
Ed Schouten <ed at nuxi.nl>
Nuxi, 's-Hertogenbosch, the Netherlands
KvK-nr.: 62051717


More information about the freebsd-hackers mailing list