From owner-freebsd-hackers@freebsd.org Tue Dec 13 16:16:58 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 EAB00C75F91 for ; Tue, 13 Dec 2016 16:16:58 +0000 (UTC) (envelope-from mark@influxdb.com) Received: from mail-yb0-x22c.google.com (mail-yb0-x22c.google.com [IPv6:2607:f8b0:4002: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 AD7B7751 for ; Tue, 13 Dec 2016 16:16:58 +0000 (UTC) (envelope-from mark@influxdb.com) Received: by mail-yb0-x22c.google.com with SMTP id d128so18334292ybh.2 for ; Tue, 13 Dec 2016 08:16:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=influxdb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=qnI1G4I7yKPtNuxn3VHJq55UwJIDhHopNf2vy2InBDw=; b=xgs6WDhG0V9tFbOzrf1i2cC6fYMtcbWt3ZvIN9sZCETNmkMVRCPbbqfeF7FywP3Tf/ iQnC1KZF7+TWWemnu7+OfrUDz2AMw3AavNFEPOFB1MCI1YjpqoU7+0gaugaDOdddO8Kw CtzjlVulZ+4vVeGEUYJOxsmg2rlakYd6fmaQL1IY0rz3ImN33Uglkh9sNtG3zAAnDvPD zRbI6Sv0vDmgzOhq6cayqpLdrmFPl110i79ZZT7a3ytZ/UvEoffKj/tm3iw/EayfQHay qWqhd95YLdmSy/svD81wkaT1LHMC7NPf5zLMlPM9lrixC9tCTlDnyYnpc9aOUBlP2BXr nbRg== 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=qnI1G4I7yKPtNuxn3VHJq55UwJIDhHopNf2vy2InBDw=; b=FE0WsaQUUFcTIiVakXvSsGLCyF8NbeeFFUnfmbQ952is+7c+4H/wZpuK/jhWuRIH6X 6PBZX3o+z/NfuH2TvKGcKTX39yPpiRlg6tsmH5IyZCETojuVZIq2vgQA0hDx2yK7VuKF yTj/YBTekQYRFh9U/9tNNUnSYbPOOq140+rS5Lt0TK94XsDhoCJ0BId4jX4WVpt6BqY/ 6raCRyggfuQDI4P/RwizMQ72EGEaNvGEjzDiCkeQ+FJVV5DVRheR5Ac7sCBo5X77GVZe P7U54lre7OnM1bvyqOzdd3wRS+7H6NSQkpPiIbFanBc7HOfEZI2eFV3wh2lxDux/5wAE H78A== X-Gm-Message-State: AKaTC02FIKPsuOsNz5aOeAza+Dvh7vEDJQNQE5R4VPFtKnwdiz6qDDN4WzFrdgdCfSUJ/2w9ONJwbQdasulqSNgH X-Received: by 10.37.172.216 with SMTP id x24mr5195694ybd.151.1481645817723; Tue, 13 Dec 2016 08:16:57 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.153.140 with HTTP; Tue, 13 Dec 2016 08:16:57 -0800 (PST) In-Reply-To: References: <200A5D70-24CE-4843-B99D-E10A2AF4F68F@FreeBSD.org> From: Mark Rushakoff Date: Tue, 13 Dec 2016 08:16:57 -0800 Message-ID: Subject: Re: Sysctl as a Service, or: making sysctl(3) more friendly for monitoring systems To: Ed Schouten Cc: Jonathan Anderson , FreeBSD Hackers , Allan Jude Content-Type: text/plain; charset=UTF-8 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:16:59 -0000 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" >