[
https://issues.apache.org/jira/browse/AMBARI-15588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dmytro Sen updated AMBARI-15588:
--------------------------------
Resolution: Fixed
Status: Resolved (was: Patch Available)
> 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
> Fix For: 2.4.0
>
> 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)