<?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 do I get information of CPU &amp; memory used by a certain node in the cluster by an API call for certain amount of time? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-do-I-get-information-of-CPU-memory-used-by-a-certain/m-p/219935#M82075</link>
    <description>&lt;P&gt;How do I get the memory usage avg.? &lt;/P&gt;</description>
    <pubDate>Tue, 14 Aug 2018 15:24:53 GMT</pubDate>
    <dc:creator>amarn_ucs2014</dc:creator>
    <dc:date>2018-08-14T15:24:53Z</dc:date>
    <item>
      <title>How do I get information of CPU &amp; memory used by a certain node in the cluster by an API call for certain amount of time?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-do-I-get-information-of-CPU-memory-used-by-a-certain/m-p/219933#M82073</link>
      <description>&lt;P&gt;Say, for last 5 minutes what is the cpu usage for 5 minutes averaged across all nodes in the cluster?&lt;/P&gt;&lt;P&gt;I can see that in Ambari, but I want information in the given time range and I should be able to get that information with an API call.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 11:47:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-do-I-get-information-of-CPU-memory-used-by-a-certain/m-p/219933#M82073</guid>
      <dc:creator>amarn_ucs2014</dc:creator>
      <dc:date>2018-08-14T11:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get information of CPU &amp; memory used by a certain node in the cluster by an API call for certain amount of time?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-do-I-get-information-of-CPU-memory-used-by-a-certain/m-p/219934#M82074</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/91253/amarnucs2014.html" nodeid="91253"&gt;@naveen r&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you have ambari metrics installed you can do this with REST API. For example;&lt;/P&gt;&lt;PRE&gt;curl -u admin:admin -H 'X-Requested-By:ambari' -X GET "https//localhost:8080/api/v1/clusters/&amp;lt;your cluster name&amp;gt;/?fields=metrics/load/CPUs._avg[1534230000,1534231500,15]"&lt;/PRE&gt;&lt;P&gt;Note that ;&lt;/P&gt;&lt;PRE&gt;CPUs._avg[X,Y,15]
&lt;/PRE&gt;&lt;P&gt;X = start time, Y = end time, 15 = step value used for zero padding or null padding &lt;/P&gt;&lt;P&gt;More examples and official documentation on:&lt;/P&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/AMBARI/Ambari+Metrics+API+specification" target="_blank"&gt;https://cwiki.apache.org/confluence/display/AMBARI/Ambari+Metrics+API+specification&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 14:31:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-do-I-get-information-of-CPU-memory-used-by-a-certain/m-p/219934#M82074</guid>
      <dc:creator>JonathanSneep</dc:creator>
      <dc:date>2018-08-14T14:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get information of CPU &amp; memory used by a certain node in the cluster by an API call for certain amount of time?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-do-I-get-information-of-CPU-memory-used-by-a-certain/m-p/219935#M82075</link>
      <description>&lt;P&gt;How do I get the memory usage avg.? &lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 15:24:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-do-I-get-information-of-CPU-memory-used-by-a-certain/m-p/219935#M82075</guid>
      <dc:creator>amarn_ucs2014</dc:creator>
      <dc:date>2018-08-14T15:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get information of CPU &amp; memory used by a certain node in the cluster by an API call for certain amount of time?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-do-I-get-information-of-CPU-memory-used-by-a-certain/m-p/219936#M82076</link>
      <description>&lt;P&gt;There are a variety of options for memory. I just tried the same for my cluster and using for example fields=metrics/memory/Use._avg[1534235091,1534235391,15] worked well.&lt;/P&gt;&lt;P&gt;Further options quoted from the source code;&lt;/P&gt;&lt;PRE&gt;/clusters/{clusterName}/?fields=metrics/memory/Buffer._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Cache._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Share._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Swap._avg[{fromSeconds},{toSeconds},{stepSeconds}],
metrics/memory/Total._avg[{fromSeconds},{toSeconds},{stepSeconds}], metrics/memory/Use._avg[{fromSeconds},{toSeconds},{stepSeconds}]',&lt;BR /&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Aug 2018 15:39:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-do-I-get-information-of-CPU-memory-used-by-a-certain/m-p/219936#M82076</guid>
      <dc:creator>JonathanSneep</dc:creator>
      <dc:date>2018-08-14T15:39:40Z</dc:date>
    </item>
  </channel>
</rss>

