<?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: Script to get queue usage in graph. in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Script-to-get-queue-usage-in-graph/m-p/151467#M40625</link>
    <description>&lt;P&gt;upgrade to HDP 2.5 with Smartsense 1.3 and you will get a Zeppelin dashboard with predefined queries to analyze your queues, along with great features built over the last few years you've been missing out on running an unsupported release.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Sep 2016 19:53:54 GMT</pubDate>
    <dc:creator>aervits</dc:creator>
    <dc:date>2016-09-14T19:53:54Z</dc:date>
    <item>
      <title>Script to get queue usage in graph.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Script-to-get-queue-usage-in-graph/m-p/151465#M40623</link>
      <description>&lt;P&gt;Hi I am using ambari 1.7. Hdp 2.1&lt;/P&gt;&lt;P&gt;We have multiple queue's to run jobs. Now we want to take the output of queue usage in graph . Any idea how to do this.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2016 18:08:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Script-to-get-queue-usage-in-graph/m-p/151465#M40623</guid>
      <dc:creator>ashneesharma88</dc:creator>
      <dc:date>2016-09-14T18:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: Script to get queue usage in graph.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Script-to-get-queue-usage-in-graph/m-p/151466#M40624</link>
      <description>&lt;P&gt;I'd recommend you upgrading to a more recent version of HDP. In recent versions of Ambari you can install Grafana that proposes such graphs and much more. &lt;/P&gt;&lt;P&gt;&lt;A href="http://hortonworks.com/blog/advanced-metrics-visualization-dashboarding-apache-ambari/" target="_blank"&gt;http://hortonworks.com/blog/advanced-metrics-visualization-dashboarding-apache-ambari/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Otherwise you have a real time representation of your current queues use in the YARN resource manager UI.&lt;/P&gt;&lt;P&gt;If you want to do something custom, you can have a look at the REST APIs exposed by YARN:&lt;/P&gt;&lt;P&gt;&lt;A href="https://hadoop.apache.org/docs/r2.7.0/hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html" target="_blank"&gt;https://hadoop.apache.org/docs/r2.7.0/hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2016 18:34:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Script-to-get-queue-usage-in-graph/m-p/151466#M40624</guid>
      <dc:creator>pvillard</dc:creator>
      <dc:date>2016-09-14T18:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Script to get queue usage in graph.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Script-to-get-queue-usage-in-graph/m-p/151467#M40625</link>
      <description>&lt;P&gt;upgrade to HDP 2.5 with Smartsense 1.3 and you will get a Zeppelin dashboard with predefined queries to analyze your queues, along with great features built over the last few years you've been missing out on running an unsupported release.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2016 19:53:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Script-to-get-queue-usage-in-graph/m-p/151467#M40625</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-09-14T19:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: Script to get queue usage in graph.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Script-to-get-queue-usage-in-graph/m-p/151468#M40626</link>
      <description>&lt;P&gt;I wrote one script for this. We can't migrate right now because it will take time to upgrade, this is client system.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 20:09:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Script-to-get-queue-usage-in-graph/m-p/151468#M40626</guid>
      <dc:creator>ashneesharma88</dc:creator>
      <dc:date>2016-09-15T20:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Script to get queue usage in graph.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Script-to-get-queue-usage-in-graph/m-p/151469#M40627</link>
      <description>&lt;P&gt;To upgrade it will take time so I have written script to get the graph of queue usage data:-&lt;/P&gt;&lt;P&gt;Gnuplot installed on linux box&lt;/P&gt;&lt;P&gt;cat data.sh &lt;/P&gt;&lt;P&gt;#!/bin/bash&lt;/P&gt;&lt;P&gt;WD='/path where we will resotre
the data&lt;/P&gt;&lt;P&gt;FN=`date +%Y%m%d%H%M%S`&lt;/P&gt;&lt;P&gt;curl "&lt;U&gt;&lt;A href="http://XXX.XXX.XXX:8088/ws/v1/cluster/scheduler" target="_blank"&gt;http://XXX.XXX.XXX:8088/ws/v1/cluster/scheduler&lt;/A&gt;&lt;/U&gt;"
&amp;gt; $WD/$FN&lt;/P&gt;&lt;P&gt;To collect the output in one file for creating one graph for qurue usage:-&lt;/P&gt;&lt;P&gt;cat queue.sh&lt;/P&gt;&lt;P&gt;HM=home path where stored all config and script&lt;/P&gt;&lt;P&gt;WD=$HM/original&lt;/P&gt;&lt;P&gt;QD=$HM/queue-data&lt;/P&gt;&lt;P&gt;rm -rf $QD/*&lt;/P&gt;&lt;P&gt;cd $WD&lt;/P&gt;&lt;P&gt;for que in abc xyz xx &lt;/P&gt;&lt;P&gt;do&lt;/P&gt;&lt;P&gt;for i in `ls`&lt;/P&gt;&lt;P&gt;do&lt;/P&gt;&lt;P&gt;column=`awk -F',' '{ for (i=0; i&amp;lt;=NF; i++)  {print i,$i}}' $i| grep $que | tail -1 | awk '{print $1}'`&lt;/P&gt;&lt;P&gt;uc=$((column-6))&lt;/P&gt;&lt;P&gt;auc=$((column-2))&lt;/P&gt;&lt;P&gt;awk -F',' '{print ARGV[3], $ucp, $aucp}' ucp="$uc" aucp="$auc" $i | awk -F' ' '{print $1" "$2" "$3}' | awk -F':' '{print $1" "$2" "$3}' | awk '{print $1" "$3" "$5}' &amp;gt;&amp;gt; $QD/$que&lt;/P&gt;&lt;P&gt;done&lt;/P&gt;&lt;P&gt;done&lt;/P&gt;&lt;P&gt;paste -d' ' $QD/abc $QD/xyz $QD/xx | gawk '{print $1 "    " $3 "    " $6 "    " $9 "    " $12 "    " $15 "    " $18 "    "  $21 "    " $24"   " $27}' &amp;gt;&amp;gt;$QD/all_que&lt;/P&gt;&lt;P&gt;Than create a conf file for create graph:-&lt;/P&gt;&lt;P&gt; cat 1.conf &lt;/P&gt;&lt;P&gt;set terminal png truecolor size 2000,600&lt;/P&gt;&lt;P&gt;set output "all-in-1.png"&lt;/P&gt;&lt;P&gt;set autoscale&lt;/P&gt;&lt;P&gt;set xdata time&lt;/P&gt;&lt;P&gt;set timefmt "%Y%m%d%H%M%S"&lt;/P&gt;&lt;P&gt;set format x "%Y/%m/%d\n%H:%M\n"&lt;/P&gt;&lt;P&gt;set style data lines&lt;/P&gt;&lt;P&gt;set key reverse Left outside&lt;/P&gt;&lt;P&gt;set xlabel "Time(in IST)"&lt;/P&gt;&lt;P&gt;set ylabel "Used Capacity"&lt;/P&gt;&lt;P&gt;set title "non-parental-queue-usage"&lt;/P&gt;&lt;P&gt;plot "/home/xyz" using 1:2 title "xyz", '' using 1:3 title "abc", '' using 1:4 title "xx"&lt;/P&gt;&lt;P&gt;/home/xyz is path from where we will get the details of que usage and time&lt;/P&gt;&lt;P&gt;In this conf on xlabel is use for TIme and ylable for used capacity of queue.&lt;/P&gt;&lt;P&gt;Now plot the graph using following command-&lt;/P&gt;&lt;P&gt;cat 1.conf | gnuplot&lt;/P&gt;&lt;P&gt;You will see the graph &lt;/P&gt;&lt;P&gt;Thanks for the reply.....!!!!!!!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2016 15:07:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Script-to-get-queue-usage-in-graph/m-p/151469#M40627</guid>
      <dc:creator>ashneesharma88</dc:creator>
      <dc:date>2016-09-16T15:07:25Z</dc:date>
    </item>
  </channel>
</rss>

