[
https://issues.apache.org/jira/browse/AMBARI-15588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Akira AJISAKA updated AMBARI-15588:
-----------------------------------
Description:
If we want to rotate ambari-metrics-monitor.out by logrotate (using
copytruncate option), we need to use ">>" instead of ">" not to keep the file
offset to write. If the offset is kept, null characters are padded in the new
file.
{code:title=ambari-metrics-monitor}
nohup ${PYTHON} ${METRIC_MONITOR_PY_SCRIPT} "$@" > ${OUTFILE} 2>&1 &
{code}
should be
{code}
nohup ${PYTHON} ${METRIC_MONITOR_PY_SCRIPT} "$@" >> ${OUTFILE} 2>&1 &
{code}
was:
If we want to rotate ambari-metrics-collector.out by logrotate (using
copytruncate option), we need to use ">>" instead of ">" not to keep the file
offset to write. If the offset is kept, null characters are padded in the new
file.
{code:title=ambari-metrics-collector}
"-Dproc_${DAEMON_NAME}" "${CLASS}" "$@" > $OUTFILE 2>&1 &
{code}
should be
{code}
"-Dproc_${DAEMON_NAME}" "${CLASS}" "$@" >> $OUTFILE 2>&1 &
{code}
Summary: Use ">>" instead of ">" to write ambari-metrics-monitor.out
(was: Use ">>" instead of ">" to write ambari-metrics-collector.out)
s/collector/monitor/g
> Use ">>" instead of ">" to write ambari-metrics-monitor.out
> -----------------------------------------------------------
>
> Key: AMBARI-15588
> URL: https://issues.apache.org/jira/browse/AMBARI-15588
> Project: Ambari
> Issue Type: Improvement
> Components: ambari-metrics
> Reporter: Akira AJISAKA
> Assignee: Akira AJISAKA
> Labels: newbie
> Attachments: AMBARI-15588.01.patch
>
>
> If we want to rotate ambari-metrics-monitor.out by logrotate (using
> copytruncate option), we need to use ">>" instead of ">" not to keep the file
> offset to write. If the offset is kept, null characters are padded in the new
> file.
> {code:title=ambari-metrics-monitor}
> nohup ${PYTHON} ${METRIC_MONITOR_PY_SCRIPT} "$@" > ${OUTFILE} 2>&1 &
> {code}
> should be
> {code}
> nohup ${PYTHON} ${METRIC_MONITOR_PY_SCRIPT} "$@" >> ${OUTFILE} 2>&1 &
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)