Solr
  1. Solr
  2. SOLR-294

scripts fail to log elapsed time on Solaris

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3
    • Component/s: replication (scripts)
    • Labels:
      None
    • Environment:

      Solaris

      Description

      The code in the scritps to determine the elapsed time does not work on Solaris because the date command there does not support the %s output format.

        Activity

        Hide
        Bill Au added a comment -

        Here is the patch to using

        perl -e "print time;"

        to get the timestamp in seconds on Solaris.

        I have added a new function in scripts-util to set the start time and updated all the scripts to use that. This way the code to get timestamp and to calculate elapsed time is centralized in scripts.util. We will just have to update a single source if we need to change it to support additional OSes.

        Show
        Bill Au added a comment - Here is the patch to using perl -e "print time;" to get the timestamp in seconds on Solaris. I have added a new function in scripts-util to set the start time and updated all the scripts to use that. This way the code to get timestamp and to calculate elapsed time is centralized in scripts.util. We will just have to update a single source if we need to change it to support additional OSes.
        Hide
        Bill Au added a comment -

        By the way, I have lost my access to Solaris. While I did tested the code snipplet the patch is using before when I still had access, I am now not able to test the patch itself on Solaris. It will be good if someone using Solaris check this out.

        Show
        Bill Au added a comment - By the way, I have lost my access to Solaris. While I did tested the code snipplet the patch is using before when I still had access, I am now not able to test the patch itself on Solaris. It will be good if someone using Solaris check this out.
        Hide
        Bill Au added a comment -

        Patch has been committed.

        Show
        Bill Au added a comment - Patch has been committed.

          People

          • Assignee:
            Bill Au
            Reporter:
            Bill Au
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development