Hello,
I would like to know if a ray worker is running an actor or task, is there a developer API to get such details?
I tried ray.nodes() API it does not tell me if a node is running actor or task:
[{'NodeID': '3a2163869db41b4959980031dbf2316f8c51b6981539a408fc5d03c0', 'Alive': True, 'NodeManagerAddress': '172.17.0.4', 'NodeManagerHostname': 'example-cluster-ray-head-type-6zrkv', 'NodeManagerPort': 34921, 'ObjectManagerPort': 37621, 'ObjectStoreSocketName': '/tmp/ray/session_2021-08-09_11-54-14_626105_102/sockets/plasma_store', 'RayletSocketName': '/tmp/ray/session_2021-08-09_11-54-14_626105_102/sockets/raylet', 'MetricsExportPort': 62442, 'alive': True, 'Resources': {'object_store_memory': 581958451.0, 'node:172.17.0.4': 1.0, 'CPU': 1.0, 'memory': 1503238553.0}}, {'NodeID': '185ea8409086d4def9e0c8962b8229c10bc9970f88407cde1fe66d82', 'Alive': True, 'NodeManagerAddress': '172.17.0.5', 'NodeManagerHostname': 'example-cluster-ray-worker-type-8qbc8', 'NodeManagerPort': 43647, 'ObjectManagerPort': 42897, 'ObjectStoreSocketName': '/tmp/ray/session_2021-08-09_11-54-14_626105_102/sockets/plasma_store', 'RayletSocketName': '/tmp/ray/session_2021-08-09_11-54-14_626105_102/sockets/raylet', 'MetricsExportPort': 65271, 'alive': True, 'Resources': {'memory': 375809638.0, 'CPU': 1.0, 'node:172.17.0.5': 1.0, 'object_store_memory': 143407104.0}}, {'NodeID': 'bb05ec85f8c337ae58fe42d21a6743fbfd11381ca722fc7ec600c0d9', 'Alive': True, 'NodeManagerAddress': '172.17.0.7', 'NodeManagerHostname': 'example-cluster-ray-worker-type-648z8', 'NodeManagerPort': 38055, 'ObjectManagerPort': 40627, 'ObjectStoreSocketName': '/tmp/ray/session_2021-08-09_11-54-14_626105_102/sockets/plasma_store', 'RayletSocketName': '/tmp/ray/session_2021-08-09_11-54-14_626105_102/sockets/raylet', 'MetricsExportPort': 64740, 'alive': True, 'Resources': {'CPU': 1.0, 'memory': 375809638.0, 'object_store_memory': 143291596.0, 'node:172.17.0.7': 1.0}}, {'NodeID': 'e28787a67afb6ca2581786bea787cbc591f89a52a40f4fabd0641ddd', 'Alive': True, 'NodeManagerAddress': '172.17.0.6', 'NodeManagerHostname': 'example-cluster-ray-worker-type-xvz2j', 'NodeManagerPort': 44155, 'ObjectManagerPort': 45769, 'ObjectStoreSocketName': '/tmp/ray/session_2021-08-09_11-54-14_626105_102/sockets/plasma_store', 'RayletSocketName': '/tmp/ray/session_2021-08-09_11-54-14_626105_102/sockets/raylet', 'MetricsExportPort': 49914, 'alive': True, 'Resources': {'object_store_memory': 144262348.0, 'CPU': 1.0, 'memory': 375809638.0, 'node:172.17.0.6': 1.0}}]
Thanks