[
https://issues.apache.org/jira/browse/AMBARI-15588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Akira AJISAKA updated AMBARI-15588:
-----------------------------------
Attachment: AMBARI-15588.01.patch
> Use ">>" instead of ">" to write ambari-metrics-collector.out
> -------------------------------------------------------------
>
> Key: AMBARI-15588
> URL: https://issues.apache.org/jira/browse/AMBARI-15588
> Project: Ambari
> Issue Type: Improvement
> Components: ambari-metrics
> Reporter: Akira AJISAKA
> Labels: newbie
> Attachments: AMBARI-15588.01.patch
>
>
> 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}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)