English 中文(简体)
RabbitMQ: Verification edition of rabbitmq
原标题:RabbitMQ: Verify version of rabbitmq
  • 时间:2011-09-29 06:21:01
  •  标签:
  • rabbitmq

我怎么能够核实拉比特姆克的哪一种版本正在服务器上运行?

Is there a command to verify that rabbitmq is running?

最佳回答

Use this command:

sudo rabbitmqctl status

并寻找这样的思路:

{rabbit,"RabbitMQ","2.6.1"},
问题回答

你只能从指挥线执行:

sudo rabbitmqctl status | grep rabbit

如果Rrabbitimq不能开张,那么确定版本的唯一途径是通过安装系统。

Eample Debian/Ubuntu:

dpkg -s rabbitmq-server | grep Version

如果你无法使用rabbitmqctl或rabbitmq-server,则按行距:

ls /usr/lib/rabbitmq/lib/

我:

rabbitmq_server-3.5.6

正如Marek在本地服务器上说过的,或者在遥远服务器上(使用amqplib):

from amqplib import client_0_8 as amqp
import sys

conn = amqp.Connection(host=sys.argv[1], userid="guest", password="guest", virtual_host="/", insist=False)

for k, v in conn.server_properties.items():
    print k, v

Save as checkVersion.py andî with pythoneckVersion.py dev.rabbitmq.com:

% python checkVersion.py dev.rabbitmq.com
information Licensed under the MPL.  See http://www.rabbitmq.com/
product RabbitMQ
copyright Copyright (C) 2007-2011 VMware, Inc.
capabilities {}
platform Erlang/OTP
version 2.6.0

在非比亚系统方面,你只能运行:

dpkg-query --showformat= ${Version}  --show rabbitmq-server

在你可能再次使用“管理”(web) plug-in的情况下,RabbitMQ版本在每一网页上右上角以及Erlang管理时间版本。

我在指挥下将产出降为版本。

rabbitmqctl status | grep "{rabbit,"RabbitMQ""

<<>Output>:

  {rabbit,"RabbitMQ","3.7.3"},

自2006年以来 我期待着在Windows机器的C#中这样做,目前所有的答案都是对*nix的答复。

public string GetRabbitMqVersion()
{
    string prefix = "rabbitmq_server-";
    var dirs = System.IO.Directory.EnumerateDirectories(@"C:Program Files (x86)RabbitMQ Server", string.Format("{0}*",prefix));

    foreach (var dir in dirs)
    {
        //Just grab the text after  rabbitmq_server-  and return the first item found
        var i = dir.LastIndexOf(prefix);
        return dir.Substring(i+16);
    }
    return "Unknown";
}

可在Centos上使用yum list rabbitmq-server

可以找到这一版本。 还利用以下指挥人员查找版本

<代码# sudo bash

http://www.ohchr.org。





相关问题
what the default max length of rabbit queue

For any given queue, the maximum length (of either type) can be defined using a policy (this option is highly recommended) or by clients using the queue s optional arguments. In the case where both ...

Retrieve messages from RabbitMQ queue(s)

I m looking to implement RabbitMQ into my PHP application, and am using the php-amqp extension. My only question is this, how do I easily query to return the contents of the queue in PHP? php-amqp ...

How to use listen on basic.return in python client of AMQP

I d like to make sure that my message was delivered to a queue. To do so I m adding the mandatory param to the basic_publish. What else should I do to receive the basic.return message if my message ...

Is AMQP production ready?

I d like to use AMQP to join two services one written in C# and other written in python. I m expecting quite large volume of messages per second. Is there any AMQP Broker that is production ready? ...

Multiple consumer one queue

Is it possible to make multiple consumers to share one single queue in RabbitMQ? I am currently using this php library to work with RabbitMQ, from what I observe, although I have 2 identical instances ...

Why use AMQP/ZeroMQ/RabbitMQ

as opposed to writing your own library. We re working on a project here that will be a self-dividing server pool, if one section grows too heavy, the manager would divide it and put it on another ...

How to wait for messages on multiple queues using py-amqplib

I m using py-amqplib to access RabbitMQ in Python. The application receives requests to listen on certain MQ topics from time to time. The first time it receives such a request it creates an AMQP ...

热门标签