<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: how to limit collector-gc.log creation under /var/log/ambari-metrics-collector in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/how-to-limit-collector-gc-log-creation-under-var-log-ambari/m-p/221045#M182919</link>
    <description>&lt;P&gt;can I add the syntax on the end of the line - so the final line should be like this ?&lt;/P&gt;&lt;PRE&gt;export AMS_COLLECTOR_GC_OPTS="-XX:+UseConcMarkSweepGC -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:{{ams_collector_log_dir}}/collector-gc.log-`date +'%Y%m%d%H%M'` -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=4K"&lt;BR /&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 15 Aug 2018 16:56:48 GMT</pubDate>
    <dc:creator>mike_bronson7</dc:creator>
    <dc:date>2018-08-15T16:56:48Z</dc:date>
    <item>
      <title>how to limit collector-gc.log creation under /var/log/ambari-metrics-collector</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-limit-collector-gc-log-creation-under-var-log-ambari/m-p/221043#M182917</link>
      <description>&lt;P&gt;Under ambari-metrics-collector we have many files as ollector-gc.log &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;how to limit the number of this files to 5 max ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;as I know we can set the follwing syntax in ambari configuration ( I guess&lt;STRONG&gt; ams-env&lt;/STRONG&gt; )&lt;/P&gt;&lt;PRE&gt;-XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=4K&lt;/PRE&gt;&lt;P&gt;but I am not sure on which variable in &lt;STRONG&gt;ams-env&lt;/STRONG&gt; we can set it ?&lt;/P&gt;&lt;PRE&gt;/var/log/ambari-metrics-collector&lt;/PRE&gt;
&lt;PRE&gt;4.0K    collector-gc.log-201804251456
4.0K    collector-gc.log-201804251517
4.0K    collector-gc.log-201805011453
4.0K    collector-gc.log-201805031000
4.0K    collector-gc.log-201805061332
4.0K    collector-gc.log-201805071101
4.0K    collector-gc.log-201805211039
4.0K    collector-gc.log-201806031253
4.0K    collector-gc.log-201806041646
4.0K    collector-gc.log-201806131159
4.0K    collector-gc.log-201806131204
4.0K    collector-gc.log-201806131219
4.0K    collector-gc.log-201806240625
4.0K    collector-gc.log-201806241235
4.0K    collector-gc.log-201806241409
4.0K    collector-gc.log-201806280803
4.0K    collector-gc.log-201807160859
4.0K    collector-gc.log-201807160908
4.0K    collector-gc.log-201807160913
4.0K    collector-gc.log-201807160930
4.0K    collector-gc.log-201807160934
4.0K    collector-gc.log-201807160937
4.0K    collector-gc.log-201807161112
4.0K    collector-gc.log-201807161114
4.0K    collector-gc.log-201807161118
4.0K    collector-gc.log-201807161130
4.0K    collector-gc.log-201807161132
4.0K    collector-gc.log-201807161137
4.0K    collector-gc.log-201807161147
4.0K    collector-gc.log-201807161152
4.0K    collector-gc.log-201807161201
&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Aug 2018 14:59:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-limit-collector-gc-log-creation-under-var-log-ambari/m-p/221043#M182917</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-08-15T14:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to limit collector-gc.log creation under /var/log/ambari-metrics-collector</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-limit-collector-gc-log-creation-under-var-log-ambari/m-p/221044#M182918</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;Adding the below parameters for &lt;STRONG&gt;AMS_COLLECTOR_GC_OPTS&lt;/STRONG&gt; in ams-env template and &lt;STRONG&gt;SERVER_GC_OPTS&lt;/STRONG&gt; in ams-hbase-env template via ambari&lt;/P&gt;&lt;PRE&gt;-XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=4K&lt;/PRE&gt;&lt;P&gt;Helped me.&lt;/P&gt;&lt;P&gt;I hope this is your query.&lt;/P&gt;&lt;P&gt;you might need to add it in this two places to control collector-gc.log and gc.log&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;if you find this answer usefull please mark the 'accept' button so that it helps other community users to find the best one.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 16:05:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-limit-collector-gc-log-creation-under-var-log-ambari/m-p/221044#M182918</guid>
      <dc:creator>akhilsnaik</dc:creator>
      <dc:date>2018-08-15T16:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to limit collector-gc.log creation under /var/log/ambari-metrics-collector</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-limit-collector-gc-log-creation-under-var-log-ambari/m-p/221045#M182919</link>
      <description>&lt;P&gt;can I add the syntax on the end of the line - so the final line should be like this ?&lt;/P&gt;&lt;PRE&gt;export AMS_COLLECTOR_GC_OPTS="-XX:+UseConcMarkSweepGC -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:{{ams_collector_log_dir}}/collector-gc.log-`date +'%Y%m%d%H%M'` -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=4K"&lt;BR /&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Aug 2018 16:56:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-limit-collector-gc-log-creation-under-var-log-ambari/m-p/221045#M182919</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-08-15T16:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to limit collector-gc.log creation under /var/log/ambari-metrics-collector</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-limit-collector-gc-log-creation-under-var-log-ambari/m-p/221046#M182920</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;Yeah exactly thats what i did.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 18:31:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-limit-collector-gc-log-creation-under-var-log-ambari/m-p/221046#M182920</guid>
      <dc:creator>akhilsnaik</dc:creator>
      <dc:date>2018-08-15T18:31:24Z</dc:date>
    </item>
  </channel>
</rss>

