Support Questions

Find answers, ask questions, and share your expertise

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 ?



@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.

does it Give details from all clusters or particular cluster ?

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

yarn application -list -appStates RUNNING

does It fetch results from different clusters as well ?

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

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

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

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.