Dashboard > GBuild > Home > Searching the logs > Information > Page Comparison
Searching the logs
compared with
Current by David Blevins
on Jan 09, 2006 01:14.

(show comment)
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history

There are 1 changes. View first change.

 h1. Tail cgi
 There is a cgi script on ci.gbuild.org that will allow you to search the logs of the various hosts in gbuild. Here it is with all it's default options:
 - [http://ci.gbuild.org/tck/logs/tail.cgi]
 Which is the same as:
 - [http://ci.gbuild.org/tck/logs/tail.cgi?host=b0&cut=43-&grep=.&lines=100]
 Those are executed in the script as such:
 {quote}cut -c $cut $log | egrep $grep | tail -n $lines{quote}
 h2. Host
 To see the last few lines of stan's (b0.gbuild.org) log file. Try this url:
 - [http://ci.gbuild.org/tck/logs/tail.cgi?host=b0]
 These also work:
 - [http://ci.gbuild.org/tck/logs/tail.cgi?host=b1]
 - [http://ci.gbuild.org/tck/logs/tail.cgi?host=b2]
 - [http://ci.gbuild.org/tck/logs/tail.cgi?host=b3]
 See the list of [Hosts] in the GBuild Network for the full list of valid bX values.
 h2. Grep
 There are a bunch of ways to grep the log files for interesting info. The grep string is actually evaluated by egrep, so it's fairly powerful.
 Here are some some useful examples for searching stan's log (he just coordinates and doesn't build):
 | no ping lines | [http://ci.gbuild.org/tck/logs/tail.cgi?grep=-v%20ping-monitor] |
 | work started | [http://ci.gbuild.org/tck/logs/tail.cgi?grep=Started] |
 | work completed | [http://ci.gbuild.org/tck/logs/tail.cgi?grep=Completed] |
 | work completed by kenny | [http://ci.gbuild.org/tck/logs/tail.cgi?grep=kenny.*Completed] |
 | work completed successfully | [http://ci.gbuild.org/tck/logs/tail.cgi?grep=Completed.*Successful] |
 | work started or completed |http://ci.gbuild.org/tck/logs/tail.cgi?grep="Started\|Completed" |
 | Messages from the build-activity component | [http://ci.gbuild.org/tck/logs/tail.cgi?grep=build-activity] |
 | build-activity messages from kenny only | [http://ci.gbuild.org/tck/logs/tail.cgi?grep="build-activity.*kenny"] |
 | messages from the build-producer | [http://ci.gbuild.org/tck/logs/tail.cgi?grep=build-producer] |
 | builds created for ejb things | [http://ci.gbuild.org/tck/logs/tail.cgi?grep=build-producer.*ejb] |
 | activity for ejb things | [http://ci.gbuild.org/tck/logs/tail.cgi?grep=build-activity.*ejb] |
 | completion of ejb related tests | [http://ci.gbuild.org/tck/logs/tail.cgi?grep=build-activity.*ejb.*Completed] |
 If you use the *host* param to search a specific build agent that is doing actual build work, you might grep for these things:
 | build commands executed | [http://ci.gbuild.org/tck/logs/tail.cgi?host=b1&grep=ContinuumBuildExecutor:shell.*Arguments] |
 | build command and exit codes | http://ci.gbuild.org/tck/logs/tail.cgi?host=b1&grep="ContinuumBuildExecutor:shell.*(Arguments\|Exit)" |
 | scm activity | [http://ci.gbuild.org/tck/logs/tail.cgi?host=b1&grep=Scm] |
 | scm activity and build commands | http://ci.gbuild.org/tck/logs/tail.cgi?host=b1&grep="Scm\|Arguments" |
 You can even pass arguments to the grep command for doing things like context greps. This is really nice as it puts separators between each matching chunk.
 | get 15 lines before each BUILD.RESULTS | [http://ci.gbuild.org/tck/logs/tail.cgi?host=b1&grep=-B%2015%20BUILD.RESULTS] |
 | the 14 lines after "Message Received" | [http://ci.gbuild.org/tck/logs/tail.cgi?host=b1&grep=-A%2014%20"Message%20Received"] |
 h2. Lines
 To get more or less lines of output from a log file use the *lines* parameter as such:
 - http://ci.gbuild.org/tck/logs/tail.cgi?lines=10
 A few examples combined with some greps:
 | the last build completed | [http://ci.gbuild.org/tck/logs/tail.cgi?lines=1&grep=Completed] |
 | the last build started | [http://ci.gbuild.org/tck/logs/tail.cgi?lines=1&grep=Started] |
 | the last ten builds added to the queue | [http://ci.gbuild.org/tck/logs/tail.cgi?lines=10&grep=build-producer.*Build] |
  | the last seven pings received | [http://ci.gbuild.org/tck/logs/tail.cgi?lines=7&grep=Ping] |
 h2. Cut
 You can cut off the first few characters of the lines to get shorter output as such:
 - [http://ci.gbuild.org/tck/logs/tail.cgi?cut=20-]
 That would cut off the first 19 characters and give you everything from 20 to the end of the line \(-\).
 | cut up till INFO, WARN, etc. | [http://ci.gbuild.org/tck/logs/tail.cgi?cut=78-] |
 | cut up till the component name | [http://ci.gbuild.org/tck/logs/tail.cgi?cut=84-] |
 | cut up till the message | [http://ci.gbuild.org/tck/logs/tail.cgi?cut=117-] |
Site running on a free Atlassian Confluence Open Source Project License granted to OSS. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.5 Build:#811 Jul 25, 2007) - Bug/feature request - Contact Administrators