gpt4 book ai didi

rabbitmq - 如何解析rabbitmq状态输出?

转载 作者:行者123 更新时间:2023-12-02 06:28:56 30 4
gpt4 key购买 nike

我在 Linux 上安装了 RabbitMQ,它是一个很棒的软件。

当我运行此命令时:

sudo rabbitmqctl status

我得到了一团糟的输出:

[{pid,18665},
{running_applications,
[{rabbitmq_management,"RabbitMQ Management Console","3.1.5"},
{rabbitmq_web_dispatch,"RabbitMQ Web Dispatcher","3.1.5"},
{webmachine,"webmachine","1.10.3-rmq3.1.5-gite9359c7"},
{mochiweb,"MochiMedia Web Server","2.7.0-rmq3.1.5-git680dba8"},
{rabbitmq_management_agent,"RabbitMQ Management Agent","3.1.5"},
{rabbit,"RabbitMQ","3.1.5"},
{os_mon,"CPO CXC 138 46","2.2.7"},
{inets,"INETS CXC 138 49","5.7.1"},
{xmerl,"XML parser","1.2.10"},
{mnesia,"MNESIA CXC 138 12","4.5"},
{amqp_client,"RabbitMQ AMQP Client","3.1.5"},
{sasl,"SASL CXC 138 11","2.1.10"},
{stdlib,"ERTS CXC 138 10","1.17.5"},
{kernel,"ERTS CXC 138 10","2.14.5"}]},
{os,{unix,linux}},
{erlang_version,
"Erlang R14B04 (erts-5.8.5) [source] [64-bit] [rq:1] [async-threads:30] [kernel-poll:true]\n"},
{memory,
[{total,179426464},
{connection_procs,300224},
{queue_procs,14434024},
{plugins,474968},
{other_proc,9607952},
{mnesia,89264},
{mgmt_db,1539936},
{msg_index,85175152},
{other_ets,29060560},
{binary,18243208},
{code,17504466},
{atom,1602617},
{other_system,1394093}]},
{vm_memory_high_watermark,0.4},
{vm_memory_limit,1522479923},
{disk_free_limit,1000000000},
{disk_free,58396659712},
{file_descriptors,
[{total_limit,924},{total_used,17},{sockets_limit,829},{sockets_used,4}]},
{processes,[{limit,1048576},{used,233}]},
{run_queue,0},
{uptime,5169640}]

它看起来像 JSON,但其实不是。

这是什么数据格式?你是怎么发现的?

我能找到的最接近的是:http://erlang.org/doc/man/yecc.html

最佳答案

我建议查询将返回 JSON 的 REST api,而不是查询rabbitctrl 进程。

GET: http://localhost:15672/api/overview

这是文档:

http://hg.rabbitmq.com/rabbitmq-management/raw-file/3646dee55e02/priv/www-api/help.html

关于rabbitmq - 如何解析rabbitmq状态输出?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27448347/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com