From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 84271 invoked by alias); 2 Jun 2018 15:17:17 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 84262 invoked by uid 89); 2 Jun 2018 15:17:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,UNSUBSCRIBE_BODY autolearn=no version=3.3.2 spammy=sk:laoar.s, U*laoar.shao, shao, sk:laoars X-HELO: mail-it0-f46.google.com Received: from mail-it0-f46.google.com (HELO mail-it0-f46.google.com) (209.85.214.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 02 Jun 2018 15:17:14 +0000 Received: by mail-it0-f46.google.com with SMTP id d10-v6so5164502itj.1 for ; Sat, 02 Jun 2018 08:17:14 -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:in-reply-to:references:from:date :message-id:subject:to:cc; bh=TSYLqXbyvWp8mLN9VoYg46QKCYF5oVsGmXmampYF8KY=; b=fUh+G9XgH/Ar+cpsbIWDcufwQBf4C5sqiLDqxHbPS3W+gsrV4TEYnxxOvzMzmct2NI aEuc9APVr2qS2I+k8ixoEyhVK1B1msUzfvvAti+vShyQh0QYDykeqTtl21VYZS0GN5mu m59QT4TtbiuiLvP6tRSsii9VBkfbz8OB0g/7q25VL6moatTjDNG87rvVxVOJZV8y2hm4 EtOfgpmlE+pEckXSItHZkg0+0AENp9WFMyCaLQaaeirNDNkYz3TKEC4NsaWt4v1eflaA dHGpuKjoHRg1j7Egub+IVfrSFAfrQqUboZ56JuMScjQNsFAgEE/NCwhuBQ0AS/vv3QrT 8AIg== X-Gm-Message-State: APt69E1RBWDZNbUSH0LYCYAh7oha5lxJnUMonUUpDnZRZihW5ZMtLaVe 3w43Aq9KU6Kuimm4caSmpjKJo4wBW2w7jg2QClI= X-Google-Smtp-Source: ADUXVKLorHhW3JFUnu9frpYbGB6iQbkMoWuWoVA/TtwU790E+Vr41RzLbdVxsD87ZWZaNr6+Ot2BDCeFlrpct15FrtI= X-Received: by 2002:a24:284a:: with SMTP id h71-v6mr8282305ith.105.1527952632355; Sat, 02 Jun 2018 08:17:12 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:ef03:0:0:0:0:0 with HTTP; Sat, 2 Jun 2018 08:16:31 -0700 (PDT) In-Reply-To: References: <20180601192741.GB31664@redhat.com> From: Yafang Shao Date: Sat, 02 Jun 2018 15:17:00 -0000 Message-ID: Subject: Re: issues about the systemtap log file name To: "Frank Ch. Eigler" Cc: systemtap@sourceware.org Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2018-q2/txt/msg00091.txt.bz2 On Sat, Jun 2, 2018 at 9:35 PM, Yafang Shao wrote: > On Sat, Jun 2, 2018 at 3:27 AM, Frank Ch. Eigler wrote: >> Hi - >> >>> currently we can use '-s' option to specify the maximum size of output >>> file and the maximum number of output files i.e., >>> >>> > stap -F -o test.output -S 128,10 test.stp >>> >>> The issue here is the output file names will be from test.output.0 to >>> test.output.INT_MAX, that is not friendly if we continuesly run >>> systemtap. >>> >>> So I give a suggestion that, if the 'N' of '-S size[,N]' is set, the >>> output file name should be from >>> output_filename.0 to output_filename.(N-1) and then rotate begin with >>> output_filename.0. >> >> That makes perfect sense. >> >>> The attachment is my patch to fix this issue. hope it could help. >>> I can't find how to submit a patch to your open source git tree, so I >>> just email to you. >> >> (The README file points to HACKING, which points to several ways.) >> > > Thanks :) > >> In this rotatingly-named file case, is there any need to remove >> old files? Can we just drop that part, and let stap incidentally >> truncate the output-$N files is it goes? If so, the code could >> be simplified even more. >> > Hi Frank, When I think over should we remove the old files or not again, I think that we'd better remove the old file and create a new one. Because we always use the file creation event to judge that we stop writing the current file and begin to write to the next file. I will submit a new patch with commit log. Thanks Yafang