From owner-freebsd-hackers@freebsd.org Mon Dec 12 13:35:06 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 118F6C73AF1 for ; Mon, 12 Dec 2016 13:35:06 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x235.google.com (mail-yw0-x235.google.com [IPv6:2607:f8b0:4002:c05::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C51881342 for ; Mon, 12 Dec 2016 13:35:05 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x235.google.com with SMTP id r204so64544995ywb.0 for ; Mon, 12 Dec 2016 05:35:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=FM+hi0Rfh3vkazbXXh6sbkCUArAtalccChSbN7n4DDg=; b=M7FRGaj1iNRg3AS+5OOFSZRW+78MkCYGD25boHtwhWK+BAtb4Unb4v1zAlEBkZfJc3 lCMuqR84GMskiW+GjHDenS+XV8fuJwvUFZNzUPgXucQhORAjj5GpDXnjsr3i0xI8AVxX wvUg/TJydhMEqJurmZS7up0Ddy5hLoVlEO88Gz2zWCzTwJLKVLo2mpJM0E6DQyFq8MYV dlKsd+xpMdZLNQ33pFsvCgDpLMfiOsti4NViEZA67pUmkrvpWxHtlaf8eplTCdTCUh3k 9ANCNk7sUMzAR9XH+MzzC2fby/A5smZhX58aLoOki6K84GKL7y8IZiHKnO8QWWp0oRhI HYkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=FM+hi0Rfh3vkazbXXh6sbkCUArAtalccChSbN7n4DDg=; b=PHivJmgVAZyaFR9jxWRlUYfOqYbCobQFRjpcwI6xqewPZgG1a+LrOwazTXHpdAD9vi o4lV9DadD5+ZaevcXBglN1jRs7s5Q1Kgueldxg98md6Xp3/zzsPR+WRbIz2fItLCfqkM 6EP3Vpd2+W1iRPtKxl7hfrLbEyFF9aRmuUnr6SepjApLTySqruH3wVim6B3Jf1agrZ45 MBo1c7hncYt7wWxkTfIKcMa30JcEe/v2ME+ucXjfgSXidVBPVNWbH9a3BhmXWSy+TIYB jGj/lJVfaElsgvTe71oEipXU1pzKD/ZnLFyazsdmvnpmw8DpLSmTfd319ZfatNneFbrO hnUQ== X-Gm-Message-State: AKaTC00pWatxaVhBmtxA1YbhRsf3z/nqVfhvoCETLagKXnL15Jc/B/G6sk6AUQ0Ol09H5Tv/Do29ZH+KH5MEVg== X-Received: by 10.13.246.193 with SMTP id g184mr89165767ywf.277.1481549704984; Mon, 12 Dec 2016 05:35:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.0.212 with HTTP; Mon, 12 Dec 2016 05:34:34 -0800 (PST) In-Reply-To: <200A5D70-24CE-4843-B99D-E10A2AF4F68F@FreeBSD.org> References: <200A5D70-24CE-4843-B99D-E10A2AF4F68F@FreeBSD.org> From: Ed Schouten Date: Mon, 12 Dec 2016 14:34:34 +0100 Message-ID: Subject: Re: Sysctl as a Service, or: making sysctl(3) more friendly for monitoring systems To: Jonathan Anderson Cc: Allan Jude , FreeBSD Hackers Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 13:35:06 -0000 Hi Jonathan, 2016-12-11 21:12 GMT+01:00 Jonathan Anderson : > 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 Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717