What steps should I take to diagnose why output does not appear in Jenkins's "Console Output" immediately?

25 views
Skip to first unread message

Behrang Saeedzadeh

unread,
Dec 2, 2014, 9:14:09 PM12/2/14
to jenkins...@googlegroups.com
Hi,

We have some Jenkins jobs that at some point during their executions output they produce during execution of their scripts, etc. does not appear in the Jenkins "Console Output" immediately.

What are some things that can cause this behavior and how do you suggest I should start diagnosing this?

Rob Mandeville

unread,
Dec 3, 2014, 8:33:14 AM12/3/14
to jenkins...@googlegroups.com, Rob Mandeville

I’m guessing that, if you run your command from the command line, you get your output more quickly than you do when you run it in Jenkins.

 

One possibility is that the program writing the log can tell whether it’s writing to a TTY or not, and changes its behavior accordingly.  Often, this means that it flushes its output cache every line for TTY output, and every (say) 1024 bytes for non-TTY output.

 

If you’re using Unix, try running this (replacing foo with your command):

 

foo > file.out &; tail –f file.out

 

This makes the foo command write to a file rather than a TTY, and lets you see what gets written to that file in real time.

 

If this is indeed the problem, I don’t have a solution right off, except to google for “Jenkins slave tty” and go from there.

 

Hope this helps!

 

--Rob

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/fb455d67-b0e6-4f4b-b491-3962851905cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Click here to report this email as spam.



This e-mail and the information, including any attachments it contains, are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.

Thank you.

Please consider the environment before printing this email.

Daniel Beck

unread,
Dec 3, 2014, 6:37:48 PM12/3/14
to jenkins...@googlegroups.com
unbuffer, part of expect, may also help if this is the problem.

What would be interesting is whether the log file for the build on Jenkins master gets written to immediately, or whether that's also delayed.

On 03.12.2014, at 14:33, Rob Mandeville <rmand...@dekaresearch.com> wrote:

> I’m guessing that, if you run your command from the command line, you get your output more quickly than you do when you run it in Jenkins.
>
> One possibility is that the program writing the log can tell whether it’s writing to a TTY or not, and changes its behavior accordingly. Often, this means that it flushes its output cache every line for TTY output, and every (say) 1024 bytes for non-TTY output.
>
> If you’re using Unix, try running this (replacing foo with your command):
>
> foo > file.out &; tail –f file.out
>
> This makes the foo command write to a file rather than a TTY, and lets you see what gets written to that file in real time.
>
> If this is indeed the problem, I don’t have a solution right off, except to google for “Jenkins slave tty” and go from there.
>
> Hope this helps!
>
> --Rob
>
> From: jenkins...@googlegroups.com [mailto:jenkins...@googlegroups.com] On Behalf Of Behrang Saeedzadeh
> Sent: Tuesday, December 02, 2014 9:14 PM
> To: jenkins...@googlegroups.com
> Subject: What steps should I take to diagnose why output does not appear in Jenkins's "Console Output" immediately?
>
> Hi,
>
> We have some Jenkins jobs that at some point during their executions output they produce during execution of their scripts, etc. does not appear in the Jenkins "Console Output" immediately.
>
> What are some things that can cause this behavior and how do you suggest I should start diagnosing this?
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/fb455d67-b0e6-4f4b-b491-3962851905cf%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> Click here to report this email as spam.
>
>
> This e-mail and the information, including any attachments it contains, are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.
>
> Thank you.
>
> Please consider the environment before printing this email.
>
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0A40042D85E7C84DB443060EC44B3FD36D9A6B85A6%40dekaexchange07.deka.local.
Reply all
Reply to author
Forward
0 new messages