Return-Path: X-Original-To: apmail-ambari-issues-archive@minotaur.apache.org Delivered-To: apmail-ambari-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CD72819353 for ; Wed, 6 Apr 2016 11:55:25 +0000 (UTC) Received: (qmail 53160 invoked by uid 500); 6 Apr 2016 11:55:25 -0000 Delivered-To: apmail-ambari-issues-archive@ambari.apache.org Received: (qmail 53128 invoked by uid 500); 6 Apr 2016 11:55:25 -0000 Mailing-List: contact issues-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list issues@ambari.apache.org Received: (qmail 53091 invoked by uid 99); 6 Apr 2016 11:55:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Apr 2016 11:55:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 88D552C1F5C for ; Wed, 6 Apr 2016 11:55:25 +0000 (UTC) Date: Wed, 6 Apr 2016 11:55:25 +0000 (UTC) From: "Dmytro Sen (JIRA)" To: issues@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMBARI-15588) Use ">>" instead of ">" to write ambari-metrics-monitor.out MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMBARI-15588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15228153#comment-15228153 ] Dmytro Sen commented on AMBARI-15588: ------------------------------------- Committed to trunk > 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)