From nobody Tue Feb 10 21:41:24 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1575451694; cv=none; d=zohomail.com; s=zohoarc; b=bgLq4KNlyq3YtLlI3+kTl5dSaHBOy2u7Pe+jV5abshpnRTbYa0SLiSrH7UsA2s82UqkbbEH1nwwExriMdoIGqe1SPclrY6rIPJjtT2qRAUQdXqkQ+65FxJPYP9d8z+SYavkFxsBvKyxlkWRByd8njvulFu6ZeTNHeD3IGSJ2E8w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575451694; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=m5lDZzmDJ0fFRvnJg/FjZIOkMQSuONMZK7tZ10ebtfY=; b=ihQY/h7dgVyvqplAzEsM8C/9pFvaF3G5X5j0C7qXXKsB5Vd02u8tWzW8MBjuyUdLLO/wVYq2MRjCqYZ3zuDE6Rbqv+JmM+bX50ZRUipaIlfgCIcwKlm3RIKUV1NDzmuRKCOY9d+mEXVs00S71mHOz8kUlMR01zeszEBAlCWK5jA= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1575451694830501.7462530806339; Wed, 4 Dec 2019 01:28:14 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1icQwW-0001rf-F1; Wed, 04 Dec 2019 09:27:32 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1icQwV-0001r5-5P for xen-devel@lists.xenproject.org; Wed, 04 Dec 2019 09:27:31 +0000 Received: from know-smtprelay-omc-3.server.virginmedia.net (unknown [80.0.253.67]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 47705d2a-1678-11ea-81fe-12813bfff9fa; Wed, 04 Dec 2019 09:27:24 +0000 (UTC) Received: from mail0.xen.dingwall.me.uk ([82.47.84.47]) by cmsmtp with ESMTPA id cQwNilTneMk4gcQwNiUugr; Wed, 04 Dec 2019 09:27:23 +0000 Received: from localhost (localhost [IPv6:::1]) by mail0.xen.dingwall.me.uk (Postfix) with ESMTP id C373315941D; Wed, 4 Dec 2019 09:27:41 +0000 (UTC) Received: from mail0.xen.dingwall.me.uk ([IPv6:::1]) by localhost (mail0.xen.dingwall.me.uk [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 4vHU23Vkuy3M; Wed, 4 Dec 2019 09:27:41 +0000 (UTC) Received: from behemoth.dingwall.me.uk (behemoth.dingwall.me.uk [192.168.1.5]) by dingwall.me.uk (Postfix) with ESMTP id 8AD7C159414; Wed, 4 Dec 2019 09:27:41 +0000 (UTC) Received: by behemoth.dingwall.me.uk (Postfix, from userid 1000) id 862E5140E17; Wed, 4 Dec 2019 09:27:41 +0000 (UTC) X-Inumbo-ID: 47705d2a-1678-11ea-81fe-12813bfff9fa X-Originating-IP: [82.47.84.47] X-Authenticated-User: james.dingwall@blueyonder.co.uk X-Spam: 0 X-Authority: v=2.3 cv=Rfa+9Wlv c=1 sm=1 tr=0 a=0bfgdX8EJi0Cr9X0x0jFDA==:117 a=0bfgdX8EJi0Cr9X0x0jFDA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=xqWC_Br6kY4A:10 a=pxVhFHJ0LMsA:10 a=5IRWAbXhAAAA:8 a=VF6w29W6N5P4AWm6VDUA:9 a=AJ2fcQ_F1HIVBPS0:21 a=KZYNt8ff4v5rtnoV:21 a=xo7gz2vLY8DhO4BdlxfM:22 X-Virus-Scanned: Debian amavisd-new at dingwall.me.uk From: james-xen@dingwall.me.uk To: xen-devel@lists.xenproject.org Date: Wed, 4 Dec 2019 09:27:36 +0000 Message-Id: <20191204092739.18177-2-james-xen@dingwall.me.uk> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191204092739.18177-1-james-xen@dingwall.me.uk> References: <20191204092739.18177-1-james-xen@dingwall.me.uk> MIME-Version: 1.0 X-CMAE-Envelope: MS4wfMwp32QxQOJTLzY+MwLbkx+8ze7848ZeIpY21eg5iEbuT67dRWEDzBIZz+j+umI7w76y5rxBfu856CrHgxa/YOXRtUSORrITzE+v19eq5q76WJKpaTjQ /Pgitv451uww3oLLDbyDux7EtEXLFuyAuTfMdUyvcFYX3wXP/A6B+BWqqvQWxWnL2mo1qNVEPEoe2F8xZOStrT5vwPvGiyidTC1kPgtVHfQGxKC9V4F2jW/Z dVDu2Hl5Z/wcpKyVSwziTxnfUeiMinxW83EYh/C2+40= Subject: [Xen-devel] [PATCH 1/4] xenstored logging: introduce -Y / --trace-syslog option X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: wei.liu2@citrix.com, ian.jackson@eu.citrix.com, James Dingwall Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" From: James Dingwall Add a new command line argument -Y / --trace-syslog which toggles the boolean tracesyslog variable. --- tools/xenstore/xenstored_core.c | 10 ++++++++-- tools/xenstore/xenstored_core.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_cor= e.c index c8e423700d..d0b383becc 100644 --- a/tools/xenstore/xenstored_core.c +++ b/tools/xenstore/xenstored_core.c @@ -79,6 +79,7 @@ static bool recovery =3D true; static int reopen_log_pipe[2]; static int reopen_log_pipe0_pollfd_idx =3D -1; char *tracefile =3D NULL; +bool tracesyslog =3D false; TDB_CONTEXT *tdb_ctx =3D NULL; =20 static const char *sockmsg_string(enum xsd_sockmsg_type type); @@ -1871,7 +1872,8 @@ static void usage(void) " -H, --help to output this message,\n" " -N, --no-fork to request that the daemon does not fork,\n" " -P, --output-pid to request that the pid of the daemon is output= ,\n" -" -T, --trace-file giving the file for logging, and\n" +" -T, --trace-file giving the file for logging, and/or\n" +" -Y, --trace-syslog writing trace message to syslog,\n" " -E, --entry-nb limit the number of entries per domain,\n" " -S, --entry-size limit the size of entry per domain, and\n" " -W, --watch-nb limit the number of watches per domain,\n" @@ -1895,6 +1897,7 @@ static struct option options[] =3D { { "output-pid", 0, NULL, 'P' }, { "entry-size", 1, NULL, 'S' }, { "trace-file", 1, NULL, 'T' }, + { "trace-syslog", 0, NULL, 'Y' }, { "transaction", 1, NULL, 't' }, { "no-recovery", 0, NULL, 'R' }, { "internal-db", 0, NULL, 'I' }, @@ -1918,7 +1921,7 @@ int main(int argc, char *argv[]) int timeout; =20 =20 - while ((opt =3D getopt_long(argc, argv, "DE:F:HNPS:t:T:RVW:", options, + while ((opt =3D getopt_long(argc, argv, "DE:F:HNPS:t:T:RVW:Y", options, NULL)) !=3D -1) { switch (opt) { case 'D': @@ -1960,6 +1963,9 @@ int main(int argc, char *argv[]) case 'W': quota_nb_watch_per_domain =3D strtol(optarg, NULL, 10); break; + case 'Y': + tracesyslog =3D true; + break; case 'e': dom0_event =3D strtol(optarg, NULL, 10); break; diff --git a/tools/xenstore/xenstored_core.h b/tools/xenstore/xenstored_cor= e.h index 3d7eb91254..f5b0d70da4 100644 --- a/tools/xenstore/xenstored_core.h +++ b/tools/xenstore/xenstored_core.h @@ -174,6 +174,7 @@ void dtrace_io(const struct connection *conn, const str= uct buffered_data *data, void reopen_log(void); void close_log(void); =20 +extern bool tracesyslog; extern char *tracefile; extern int tracefd; =20 --=20 2.24.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel