如何获取 Mesos Agents Framework Executor 内存

How to get Mesos Agents Framework Executor Memory

在 Mesos Web 内部 UI 我可以在 table

中看到我的 Spark 执行程序的内存使用情况

Agents -> Framework -> Executors

有一个 table 列出了我的 Spark 驱动程序的所有执行程序,它们的内存使用情况在 Mem (Used / Allocated) 列中指示。

有没有办法直接通过 link 获取此号码?如果可以,如何获取?

例如,我可以通过 http://IP/mesos/metrics/snapshot 获得一堆 Mesos 指标,但执行程序的内存使用情况不是其中之一。

executor的内存占用其实和mesos task有关,意思是对于每个task,executor会消耗多少内存。

如果上面是你需要的,你可以使用下面的rest api得到一个json,然后解析它使用的内存。

http://mesos_ip:5050/master/tasks

仅供参考。

自己找到了答案。对于每个 worker/agent 执行者可以 运行,直接访问内存信息在这里:

http://IP_of_worker1:5051/slave(1)/monitor/statistics
http://IP_of_worker2:5051/slave(1)/monitor/statistics
等等

内容以json的形式存在,framework_id允许找到相关的执行器及其内存消耗,cpu使用等[=24中给出的内容=].