3

I have some external jobs need to be monitoring from central Jenkins/Hudson server. Jenkins/Hudson just send job output after it finish. Some jobs run in very long time and we aren't sure it is running or failing to the end of process. How can I config Jenkins/Hudson to receive jobs output in realtime?

olragon
  • 35
  • 5

1 Answers1

3

If you look in the hudson jobs dir for your project you'll see a builds directory. In this is a directory for each build. The last one in there sorted by time is the current one (running or finished). In there is a file called log which you can watch in realtime:

# cd ~/.hudson/jobs/PROJECTNAMEHERE/builds
# ls -ltr | tail -2
lrwxrwxrwx 1 m4 m4   19 Aug 28 21:16 1751 -> 2011-08-28_21-16-40
drwxrwxr-x 2 m4 m4 4096 Aug 28 21:16 2011-08-28_21-16-40
# ls -ltr 1751/
total 104
-rw-rw-r-- 1 m4 m4   124 Aug 28 21:16 changelog.xml
-rw-rw-r-- 1 m4 m4 97994 Aug 28 21:17 log
# tail -f 1751/log
    [javac] Compiling 165 source files to blah
     [copy] Copying 20 files to someotherblah
... more output from my ant job here in realtime

You could just setup something to monitor the builds dir every few seconds for new directories then tail the log.

polynomial
  • 3,968
  • 13
  • 24