What could be script to get top 3 yarn applications in RUNNING state from all different clusters ?
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.
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