From owner-freebsd-hackers@freebsd.org Tue Dec 13 16:24:28 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 0E20FC7643E for ; Tue, 13 Dec 2016 16:24:28 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (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 9399C10AB for ; Tue, 13 Dec 2016 16:24:27 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: by mail-wm0-x22c.google.com with SMTP id f82so126582331wmf.1 for ; Tue, 13 Dec 2016 08:24:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to; bh=Si1qoKmC2kTrk5liix1akJMS+icz+aaGTDv5lRer70Y=; b=uE7gSp810jKZnxkfZ5U3JFbF48Hr52DUYfBvXMVQ3Otf5OOZFqhc6M/iPgHpmJUwLJ h7gNAVEb3+f26et3+AdM5QWLettXj3x54CGVtzybbi9R9dkJ31dMWmAM2CuQRwhQEiVJ eCwg9eh9KMNcirdoTc/v9Hd7UHR48tWA9dZ3NA8LKP7gvJporoIH4xJ2QwHP8RxOj8n2 8iIHiqoEoNFCWxxTyO+96hM3we4MjIaFntNWfATZ5ahsuWY4HBIEpl9eS8TgkiGfbUwu KjeURuZP6Dm44O2RyhWvGn47yDYb/S8pi0JGnZ5xtrMinpjwgH2YYOzp62tOmNFvu2g5 NfBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=Si1qoKmC2kTrk5liix1akJMS+icz+aaGTDv5lRer70Y=; b=YLAXhcezRgrw8enAIsAEiGlT0DRqnq/203jmXVgGHwkT9X5qw5WzPv6yS7wFYNm971 wJV7ul2gQZlCuGAssHQkNGWLYGbWHMmlRP4ULdGW2XSQwRNrcK4TNXtqwv/Y8pd3SBx4 k0ubm9nCcYNShc2QYXb3CFwU4BSI6ajyobpTZQdFmX0yojZHnMa8/iyi2K+YwVKnIK23 wGQM4myZfVzRmwl1Gzskzz0uFg6WYXCSQVfGV2/w05SGqUOY3H90KKXjd/BncbGq9XjH M2z+PPR9j9M4tThnWdmEOYyN4wCWqvNlb2+dVHaAr2aXrryMFcflRXR2Gv2oKxoLLdBl AfRg== X-Gm-Message-State: AKaTC00Di/hXNLyDYLUf1NGkEuY13RVd+S4+LFCqc23UBaGCjcyeH/ARUw0u1t4YXdhzbsD6 X-Received: by 10.28.138.137 with SMTP id m131mr3382515wmd.118.1481646265584; Tue, 13 Dec 2016 08:24:25 -0800 (PST) Received: from [10.10.1.58] ([185.97.61.26]) by smtp.gmail.com with ESMTPSA id w8sm3339057wmw.4.2016.12.13.08.24.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Dec 2016 08:24:24 -0800 (PST) Subject: Re: Sysctl as a Service, or: making sysctl(3) more friendly for monitoring systems To: freebsd-hackers@freebsd.org References: <200A5D70-24CE-4843-B99D-E10A2AF4F68F@FreeBSD.org> From: Steven Hartland Message-ID: Date: Tue, 13 Dec 2016 16:25:02 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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: Tue, 13 Dec 2016 16:24:28 -0000 Gathering every sysctl would case issues as some are very heavy and if called regularly would cause noticeable stalls. On 13/12/2016 16:16, Mark Rushakoff wrote: > In Prometheus' node_exporter, it looks like they're calling sysctl to grab > just > CPU or just memory, etc., metrics. > > On the InfluxDB side of things, I'm not seeing any Telegraf plugin to > monitor > sysctl in a generic way, although you could probably emit InfluxDB line > protocol pretty easily from the exporter tool or something similar to that. > > My impression, from a monitoring perspective, is that there isn't much > demand > to gather _everything_ in sysctl in a single call, although categorized > subsets > might be appealing. > > > On Mon, Dec 12, 2016 at 5:34 AM, Ed Schouten wrote: > >> 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 >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >> > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"