This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: issues about the systemtap log file name


On Sat, Jun 2, 2018 at 9:35 PM, Yafang Shao <laoar.shao@gmail.com> wrote:
> On Sat, Jun 2, 2018 at 3:27 AM, Frank Ch. Eigler <fche@redhat.com> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]