From owner-freebsd-current@freebsd.org Sun May 19 02:19:08 2019 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24EAC159F5F6 for ; Sun, 19 May 2019 02:19:08 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B59EE720DB for ; Sun, 19 May 2019 02:19:05 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lj1-f173.google.com with SMTP id z1so9434757ljb.3 for ; Sat, 18 May 2019 19:19:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=r1PDtH7lgNPj7vTc+2t+IQ1Ga/Yy0jydNIHRnlVGlGA=; b=H1kcQcT8DPwhoxTSFR6A8SduP+Hc7jhWM3T/IuW/WhckRDpAplkkdUx03B98KuFoDU sNa4jm9ha5iKjBGhuGY0RPijfrI/t8wsVL9qBUyaTIKj+e3ZbYqoWljo59uZh7S9Z3kN i/FaYHmI8DTEMVWg5DcmcUe8m3DR4Telzlp96friNm4qbHmSyH7+EK4Dye+3BoL0jqLm +ol/Qrg8DxyGG9ieiemsjXWMTUiT+4Ux+ObrQBIbbiTJOyxgFIOcmZJkJj1sVtg0J/Oo ymCfAEqWO26KzlPs5wM4gom5PEWegxH6lcuqeCCN8bOqo5i9MHqX2W5/phs+9iRkA0pQ NlUQ== X-Gm-Message-State: APjAAAU2OS5/rVt1WBDD3CSXVQXyv8NtXxINwHRNhxye+cvxPpDzAkIq jByAbYyoUmAJQbSOTzQJ5ATuq4nP6NHCEtxKILQ= X-Google-Smtp-Source: APXvYqwxaiJlvgEV0YgFE+FuudAiCdxZnPS6TkC+3n3uW3SPqPCy02U7MC9Y32Y5rd0gENCx1P8/cAzb36Px/3cTKPg= X-Received: by 2002:a2e:74f:: with SMTP id i15mr31664835ljd.156.1558232338508; Sat, 18 May 2019 19:18:58 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Alan Somers Date: Sat, 18 May 2019 20:18:46 -0600 Message-ID: Subject: Re: RFC w.r.t. toggling debugging on/off for mountd via a signal To: Rick Macklem Cc: "freebsd-current@FreeBSD.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: B59EE720DB X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.208.173 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-3.93 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[173.208.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.64)[-0.641,0]; RCVD_TLS_LAST(0.00)[]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; IP_SCORE(-1.28)[ip: (-0.55), ipnet: 209.85.128.0/17(-3.50), asn: 15169(-2.27), country: US(-0.06)]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 02:19:08 -0000 On Sat, May 18, 2019 at 7:59 PM Rick Macklem wrote: > > Hi, > > I've been working with Peter Errikson on a patch for mountd that adds a new option > for incremental updating of exports. This seems to be helping a lot w.r.t. performance > on an NFS server with lots (10000+) of exported file systems. > > I have debug syslog() calls in the code, which I/Peter think would be worth keeping > in the production code in case someone runs into problems with this new option. > > As such, I'd like to have the code compiled in by default (not only if DEBUG is defined, > as mountd.c has now). I also was thinking it would be nice if the daemon didn't need > to be restarted to enable/disable the debugging output, since that breaks NFS > mounting during the restart. > > So, I was thinking of having the debugging output toggled on/off via SIGUSR1. > > What do you think of this idea? > Any other/better ways to do this? > Also, would LOG_DAEMON and LOG_DEBUG sound like the correct facility and > priority for theses syslog() calls? > > Thanks in advance for any comments, rick If the debug messages aren't so verbose that they'll slow down syslogd, then you can just leave them enabled all the time. syslogd will filter them. However, if they're super-verbose then SIGUSR1 sounds reasonable. I can't think of another daemon with runtime selectable logging verbosity like that. -Alan