From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id OA87HmQ1MGSaFAAASxT56A (envelope-from ) for ; Fri, 07 Apr 2023 17:23:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 0EQnHmQ1MGT6qQAA9RJhRA (envelope-from ) for ; Fri, 07 Apr 2023 17:23:16 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2C5F3197FC for ; Fri, 7 Apr 2023 17:23:16 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pknvd-0003S5-He; Fri, 07 Apr 2023 11:23:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pknvb-0003Rw-HT for guix-patches@gnu.org; Fri, 07 Apr 2023 11:23:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pknva-00068b-MD for guix-patches@gnu.org; Fri, 07 Apr 2023 11:23:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pknva-00088G-Hc for guix-patches@gnu.org; Fri, 07 Apr 2023 11:23:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#60788] [PATCH] services: Add vnstat-service-type. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 07 Apr 2023 15:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60788 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Bruno Victal Cc: maxim.cournoyer@gmail.com, 60788@debbugs.gnu.org Received: via spool by 60788-submit@debbugs.gnu.org id=B60788.168088095731210 (code B ref 60788); Fri, 07 Apr 2023 15:23:02 +0000 Received: (at 60788) by debbugs.gnu.org; 7 Apr 2023 15:22:37 +0000 Received: from localhost ([127.0.0.1]:57069 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pknvB-00087I-G6 for submit@debbugs.gnu.org; Fri, 07 Apr 2023 11:22:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54912) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pknv9-000872-Au for 60788@debbugs.gnu.org; Fri, 07 Apr 2023 11:22:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pknv3-0005zq-3d; Fri, 07 Apr 2023 11:22:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=vtqeF2+iohMq1AZlnBn4oPogcWLQyPjeCW/TpmEqVlk=; b=C2ajJs3Jl3AcQeKE9HBs 8VZa3nmXYi4RrrZKP32RKKSUFHt9sHST5wViO9ynV1xT6ub8BsIeq66TAsY/Psxgg9zlSQFmG5f38 sGJ+jmCRhLEgsTsC6NOFdVqI+fomuQbqPLAZQvLoH+zNhx0rILXaZB81ur691L/OQ7KKkxZ69cgJ6 Kb31CmPvZZIqHQsH4l7fFmsWHd/AbwY6P9a/1OkHsh/WgZ/Pk6GrynuqiKSGPRpDmpxPM4vipxMzQ ZQE9tGl6JmPwBIlijaHtcRyeHaNLRv79HPMczs1OCrgXPJ9idMlft/SAxHEAJlz32cPSCIk6oIEUU Y16vgTRvXjJaww==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pknv2-0006dQ-GR; Fri, 07 Apr 2023 11:22:28 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <95b646eb6b23dec213cba43b6e4e7ddc4a601d0f.1673640404.git.mirai@makinata.eu> Date: Fri, 07 Apr 2023 17:22:25 +0200 In-Reply-To: (Bruno Victal's message of "Tue, 4 Apr 2023 14:08:36 +0100") Message-ID: <87edovd8em.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1680880996; a=rsa-sha256; cv=none; b=esTwhX1jeKCbCw3y/cvaecV8b9yIEJdV+UlhAPNfhCQgmmHmt1lbNtzXXbEd0x4jZYnyHl fF8+UL0fANY0iPeyZpHmgVzu8l+0nL5UqaX9Q0lEqRews3rADjbjlDfKWW05bjPzOjFbqa sngd7I/ANXKv5atXc47yNZ5uXUEcf0MbmNWcusKZ8qRLvW8XP6rje96LUw+c/4PiAbL+Yt NXf2RAxxywOt2/lmrvBbZU0wpVxgyvqe5NYLJM6NfvmK6n5diaoKPXgj5swsEg81xX8Wxz 19o7sU65/jIoTgz+BaZGgrMZAxyuVCAKLO9ahhBt+mvNFJD2evhkHAr4Xl4oew== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=C2ajJs3J; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1680880996; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=vtqeF2+iohMq1AZlnBn4oPogcWLQyPjeCW/TpmEqVlk=; b=bR/3yzmSmqhK+j0FdXCC8dzLIFae/FEyytWhEzfN0B1tK1GluCOkSKvyvfKw2SQGnzuq2w oHJpBIXCQHiKXLun7V6AkA3Yfc+PjQdN9UjKFwqZM8JCXLD5qFm2QIsWFcEUSr/ReW/lSI 3b8HIcAP8dFcaqi2ESIr6ajjDVFeElGls/OAXXdXiu0O7HDwUssyjoxj5p/zIA7RvkEMFD QPN67R8D4dLAdJn7ZwMnr6qhkvZB0YF3C6Lri3y+qcDlxTJFY1GeEbL4lYGw1MAaLhqiFP 28zW8N/W7HYi8M/CV5MiBS3bbJ3TjLxw6c7M4r60ndHAM16Ir/qo95LB6uSaoQ== X-Migadu-Spam-Score: -2.62 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=C2ajJs3J; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Spam-Score: -2.62 X-Migadu-Queue-Id: 2C5F3197FC X-TUID: CPB9VXROmwMC Hi! Bruno Victal skribis: > * gnu/services/monitoring.scm (vnstat-service-type): New variable. > * doc/guix.texi (Monitoring Services): Document it. > --- > > Changes since v8: > * Forgot to amend commit in v8, v9 corrects this. Sorry to chime in after 9 versions (!). I think a system test would be nice, we generally require it upfront, but since Maxim wrote it can come later, let=E2=80=99s not let it block this patch any longer. One comment: > +@item @code{database-dir} (default: @code{"/var/lib/vnstat"}) (type: str= ing) [...] > +@item @code{create-dirs?} (default: @code{#t}) (type: maybe-boolean) For consistency, both within this record and with the rest of Guix, I suggest avoiding abbreviations. Since this will be part of the API, better fix it now than later. > +@item @code{max-bandwidth} (type: maybe-integer) > +Maximum bandwidth for all interfaces. If the interface specific traffic > +exceeds the given value then the data is assumed to be invalid and > +rejected. Set to 0 in order to disable the feature. Value range: > +@samp{0}..@samp{50000} > + > +@item @code{max-bw} (type: maybe-alist) > +Same as @var{max-bandwidth} but can be used for setting individual > +limits for selected interfaces. This is an association list of > +interfaces as symbols/strings to integer values. For example, > +@lisp > +(max-bw `((eth0 . 15000) > + (ppp0 . 10000))) > +@end lisp Both the naming and semantics are a bit confusing to me. How about s/max-bw/per-interface-max-bandwidth/ ? Side note: I=E2=80=99d represent interfaces as strings because there=E2=80= =99s no guarantee they =E2=80=9Cfit=E2=80=9D in a symbol. That=E2=80=99s all, thanks! Ludo=E2=80=99.