lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gora Mohanty <g...@mimirtech.com>
Subject Re: Monitor the QTime.
Date Mon, 14 Feb 2011 08:21:56 GMT
On Sun, Feb 13, 2011 at 7:54 AM, Lance Norskog <goksron@gmail.com> wrote:
> If you're a unix shell scripting wiz, here are a few strategies.
>
> Tail the logfile and filter for the string 'QTime'. The number is the
> very last string in the line. So, strip the text between the timestamp
> and the number- sort by the timestamp first and the number second. Now
>  grab the first qtime for each timestamp. I don't know a command for
> this. This gives you the longest query time for each second.
[...]

Thanks for the idea. As this was useful enough for us, have gone ahead
and implemented it.

* Attached is a bash script that will print
    timestamp query-string qtime
  for each query in a list of Solr log files specified as command-line
  arguments.
* Use as "./qtime_solr.sh logfile1 logfile2...". Without any arguments,
  the script uses /var/log/tomcat6/catalina.out as the log file.
* Have only minimally tested it, but would be glad to fix any bugs
  that people encounter.
* Have *not* implemented the latter part of the suggestion, i.e.,
  sorting by timestamp, and taking only the first query. IMHO, the
  needs here might be different, and it is best to have a second
  script doing this, that uses the output from this one.
* Not sure if attachments to this list are stripped, so the script has
  also been uploaded to http://pastebin.com/YLqBHp19

Regards,
Gora

Mime
View raw message