[users at bb.net] Timestamp on stdio logs?

Long Vu long.vu at intelerad.com
Tue Sep 13 15:45:08 UTC 2016


Thanks Pierre !  This ts utility looks like what I need.

I also gave the --debug=time a try, it is by far the easiest to
implement.  So far it works great too but with possibly some weird
buffering behavior.

It seems that for built-in scons actions (ex: Delete, Mkdir) or
commands that produce no stdout/stderr and is very fast (ex: ln,
touch) , the "Command execution time" message seems to be buffered and
I have a bunch of them stacked together so it is not exactly clear
which "execution time" is for which command.

However for slow commands (ex: the actually compilation) that produce
output, then the immediately following "Command execution time" seems
to be the matching one.  Although it can also be followed by a stack
of other very short "Command execution time" from preceding quick
actions.

I think this could be a buffering problem.  Is there a way to turn off
buffering?



On Mon, Sep 12, 2016 at 3:44 PM, Pierre Tardy <tardyp at gmail.com> wrote:
> Hello,
> as per
> http://unix.stackexchange.com/questions/26728/prepending-a-timestamp-to-each-line-of-output-from-a-command
> you can use moreutils's ts to prepend timestamp to your commands:
>
>   scons <whatever>| ts '[%Y-%m-%d %H:%M:%S]'
>
> Le lun. 12 sept. 2016 à 21:36, Long Vu <long.vu at intelerad.com> a écrit :
>>
>> Thanks Vasily !  Not what we were looking for but could fill our needs.
>>
>> I am still hoping someone could propose an option (ex: in
>> BuildmasterConfig) that we could turn on for all builders so we can
>> have timestamps for anything, not just scons build step.
>>
>>
>> On Mon, Sep 12, 2016 at 2:06 PM, Vasily <just.one.man at yandex.ru> wrote:
>> > Hi,
>> >
>> > Just try --debug=time SCons option ;-)
>> >
>> > Thanks,
>> > Vasily
>> >
>> > 12 сент. 2016 г. 20:01 пользователь "Long Vu" <long.vu at intelerad.com>
>> > написал:
>> >>
>> >> Hi,
>> >>
>> >> Our buildbot calls scons which then calls the various commands that
>> >> made up the build.
>> >>
>> >> We want to diagnose slow builds, specifically which of the commands is
>> >> hogging build time.
>> >>
>> >> So is there a quick way to prefix timestamp on each log line collected
>> >> by buildbot?
>> >>
>> >> The alternative would be to modify all the scons build file in all the
>> >> source repository to prefix the timestamp, but that would means a lot
>> >> of commits.
>> >>
>> >> We would prefer a centralized solution in buildbot that will also
>> >> future proof all the new source repositories that we will add later.
>> >>
>> >> Thanks,
>> >>
>> >>
>> >> --
>> >> Long Vu | Build Controller | Intelerad | +1-514-931-6222 ext. 7743
>> >>
>> >> --
>> >>
>> >> This email or any attachments may contain confidential or legally
>> >> privileged information intended for the sole use of the addressees. Any
>> >> use, redistribution, disclosure, or reproduction of this information,
>> >> except as intended, is prohibited. If you received this email in error,
>> >> please notify the sender and remove all copies of the message,
>> >> including
>> >> any attachments.
>> >>
>> >> _______________________________________________
>> >> users mailing list
>> >> users at buildbot.net
>> >> https://lists.buildbot.net/mailman/listinfo/users
>> >>
>> >
>>
>>
>>
>> --
>> Long Vu | Build Controller | Intelerad | +1-514-931-6222 ext. 7743
>>
>> --
>>
>> This email or any attachments may contain confidential or legally
>> privileged information intended for the sole use of the addressees. Any
>> use, redistribution, disclosure, or reproduction of this information,
>> except as intended, is prohibited. If you received this email in error,
>> please notify the sender and remove all copies of the message, including
>> any attachments.
>>
>> _______________________________________________
>> users mailing list
>> users at buildbot.net
>> https://lists.buildbot.net/mailman/listinfo/users



-- 
Long Vu | Build Controller | Intelerad | +1-514-931-6222 ext. 7743

-- 

This email or any attachments may contain confidential or legally 
privileged information intended for the sole use of the addressees. Any 
use, redistribution, disclosure, or reproduction of this information, 
except as intended, is prohibited. If you received this email in error, 
please notify the sender and remove all copies of the message, including 
any attachments.



More information about the users mailing list