accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [2/5] accumulo git commit: ACCUMULO-4406: Add instance number to .out and .err files
Date Mon, 15 Aug 2016 22:01:15 GMT
ACCUMULO-4406: Add instance number to .out and .err files

Rotate the logfiles with the instance numbers and only add numbered .out and .err files when
we have multiple tservers

Closes #138


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/208680f8
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/208680f8
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/208680f8

Branch: refs/heads/master
Commit: 208680f8517431997779e266764e84a08bcb7fe3
Parents: 8c3094f
Author: Dave Marion <dlmarion@apache.org>
Authored: Mon Aug 15 12:51:33 2016 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Mon Aug 15 17:27:31 2016 -0400

----------------------------------------------------------------------
 assemble/bin/start-daemon.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/208680f8/assemble/bin/start-daemon.sh
----------------------------------------------------------------------
diff --git a/assemble/bin/start-daemon.sh b/assemble/bin/start-daemon.sh
index 4df228e..c02970f 100755
--- a/assemble/bin/start-daemon.sh
+++ b/assemble/bin/start-daemon.sh
@@ -138,8 +138,15 @@ else
          fi
       fi
 
+      OUTFILE="${ACCUMULO_LOG_DIR}/${SERVICE}_${t}_${LOGHOST}.out"
+      ERRFILE="${ACCUMULO_LOG_DIR}/${SERVICE}_${t}_${LOGHOST}.err"
+
+      # Rotate the .out and .err files
+      rotate_log "$OUTFILE" ${ACCUMULO_NUM_OUT_FILES}
+      rotate_log "$ERRFILE" ${ACCUMULO_NUM_OUT_FILES}
+
       # Fork the process, store the pid
-      nohup ${NUMA_CMD} "$COMMAND" "${SERVICE}" --address "${ADDRESS}" >"${ACCUMULO_LOG_DIR}/${SERVICE}_${LOGHOST}.out"
2>"${ACCUMULO_LOG_DIR}/${SERVICE}_${LOGHOST}.err" < /dev/null &
+      nohup ${NUMA_CMD} "$COMMAND" "${SERVICE}" --address "${ADDRESS}" >"$OUTFILE" 2>"$ERRFILE"
< /dev/null &
       echo $! > ${PID_FILE}
 
    done


Mime
View raw message