Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

script to get top 3 yarn applications in RUNNING state from all clusters ?

script to get top 3 yarn applications in RUNNING state from all clusters ?

What could be script to get top 3 yarn applications in RUNNING state from all different clusters ?

7 REPLIES 7

Re: script to get top 3 yarn applications in RUNNING state from all clusters ?

Contributor

@Anurag Mishra

You can use 'yarn top' command. 'yarn top' is a tool to help cluster administrators understand cluster usage better . It displays the details of applications and which apps are consuming resources.

Hope it helps.

Re: script to get top 3 yarn applications in RUNNING state from all clusters ?

does it Give details from all clusters or particular cluster ?

Re: script to get top 3 yarn applications in RUNNING state from all clusters ?

try this on yarn cluster, it will fetch you all running application on cluster

yarn application -list -appStates RUNNING

Re: script to get top 3 yarn applications in RUNNING state from all clusters ?

does It fetch results from different clusters as well ?

Re: script to get top 3 yarn applications in RUNNING state from all clusters ?

No this will fetch you RUNNING application from single cluster where you execute it, if you want to monitor remote cluster for RUNNING job you can use YARN RM rest API

curl --compressed -X GET http://<cluster1_RM_HOST>:8088/ws/v1/cluster/apps?state=RUNNING
curl --compressed -X GET http://<cluster2_RM_HOST>:8088/ws/v1/cluster/apps?state=RUNNING

Re: script to get top 3 yarn applications in RUNNING state from all clusters ?

how to filter some details like application type , startedTime etc. ?

Re: script to get top 3 yarn applications in RUNNING state from all clusters ?

imp point here is that i want to fetch result from different clusters as well in one single machine