You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2016/08/15 22:01:15 UTC

[2/5] accumulo git commit: ACCUMULO-4406: Add instance number to .out and .err files

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 <dl...@apache.org>
Authored: Mon Aug 15 12:51:33 2016 -0400
Committer: Josh Elser <el...@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