[rabbitmq-discuss] Queue Info question

Edwin Fine rabbitmq-discuss_efine at usa.net
Sun Jun 29 00:18:49 BST 2008


Hi all,

I read a thread (Queue Info) quite a while ago in which a user had problems
using the -remsh option on Windows:

erl -sname temp -remsh rabbit at myhost
(rabbit at myhost1>rabbit_amqqueue:stat_all().

I wondered if it might be easier simply to use an erlang rpc call to do the
same thing.

As long as you use the identical erlang.cookie file (or use -setcookie on
the command line) that was used to start the rabbitmq daemon, you can call
any exported MFA in the context of the daemon using Erlang rpc.

Example:
$ cat ~/.erlang.cookie
BGPCXKVWOUBNYKCYMHBF
$ erl -sname test    # or erl -sname test -setcookie KGNBMYPYKVUOXCHBCBFW
(test at myhost)1> rpc:call('rabbit at myhost', rabbit_amqqueue, stat_all, []).

Is there any special reason, other than it's easier just to type
rabbit_amqqueue:stat_all(), why one would want to use erl -sname temp -remsh
rabbit at myhost? Just curious.

Regards,
Edwin Fine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20080628/931ff3d9/attachment.htm 


More information about the rabbitmq-discuss mailing list