[rabbitmq-discuss] "rabbitmqctl cluster_status" output - quoted or not quoted?

Jerry Bao hijerrybao at gmail.com
Thu Nov 8 19:31:19 GMT 2012


Thanks a lot for the answer. I will go pick up an Erlang book, right now....

Date: Wed, 7 Nov 2012 14:23:24 -0800
> From: Jerry Kuch <jerryk at rbcon.com>
> Subject: Re: [rabbitmq-discuss] "rabbitmqctl cluster_status" output -
>         quoted or not quoted?
> To: Discussions about RabbitMQ <rabbitmq-discuss at lists.rabbitmq.com>
> Message-ID:
>         <CAE0Sz=
> xebJqYuVCRNR0qnxPzz6t6NSdduOA5SRFCbAi8i-1T4g at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi, Jerry:
>
> Note those '-' signs in the quoted ones.  Erlang's demanding that an atom
> name be escaped in single quotes so that the hyphen doesn't get taken as a
> minus sign, thereby producing a gibberish expression.
>
> If you're writing something to systematically parse things like this, you
> might find looking at an Erlang reference useful so you can get a sense for
> what types are involved in such expressions, and what the syntactic
> conventions and requirements are on their structures...
>
> Best regards,
> Jerry
>
> On Wed, Nov 7, 2012 at 2:08 PM, Jerry Bao <hijerrybao at gmail.com> wrote:
>
> > Why do some "rabbitmqctl cluster_status" outputs have single quote around
> > the nodes, others do not?
> >
> > For example,
> > *[root at jbao-vm1 ~]# rabbitmqctl cluster_status*
> > *Cluster status of node 'rabbit at jbao-vm1' ...*
> > *[{nodes,[{disc,['rabbit at jbao-vm2','rabbit at jbao-vm1']}]},*
> > * {running_nodes,['rabbit at jbao-vm2',*
> > *                 'rabbit at jbao-vm1']}]*
> > *...done.*
> > *
> > *
> > On another cluster, I have somthing like this:
> >
> > rabbit1$ *rabbitmqctl cluster_status*
> > Cluster status of node rabbit at rabbit1 ...
> > [{nodes,[{disc,[rabbit at rabbit1,rabbit at rabbit2]},{ram,[rabbit at rabbit3
> ]}]},
> >  {running_nodes,[rabbit at rabbit2,rabbit at rabbit1]}]
> > ...done.
> >
> > They are same version of RabbitMQ/Erlang/OTP, all on the same CentOS 5.7
> > 64bit.
> >
> > I am trying to write a script to parse it so I can monitor the status of
> > the cluster. I have been working with RabbitMQ for a while but am
> > relatively new to Erlang. Does anybody know why? Is this a Erlang or OS
> > locale issue?
> >
> > I know I can write my parser to handle both cases but just want to know
> > what is causing that.
> >
> > Thanks,
> >
> > Jerry
> >
> >
> >
> > _______________________________________________
> > rabbitmq-discuss mailing list
> > rabbitmq-discuss at lists.rabbitmq.com
> > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20121107/2e99844f/attachment-0001.htm
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20121108/9d39a620/attachment.htm>


More information about the rabbitmq-discuss mailing list