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.
try this on yarn cluster, it will fetch you all running application on cluster
yarn application -list -appStates RUNNING
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
imp point here is that i want to fetch result from different clusters as well in one single machine