Description
Instead of a new script, perhaps we should improve the membase command-line utility for you. Right now...
- ./bin/membase server-list -c 127.0.0.1 -u Administrator -p password
ns_1@10.1.4.12 10.1.4.12:8091 healthy active
ns_1@10.1.4.99 10.1.4.99:8091 unhealthy active
So, this would be the same as your allnodes.sh...
- ./bin/membase server-list -c 127.0.0.1 -u Administrator -p password | cut -d " " -f 2 | cut -d ":" -f 1
10.1.4.12
10.1.4.99
Maybe...
- ./bin/membase host-list -c 127.0.0.1 -u Administrator -p password
That would have the benefit of also running on Windows.
Steve
________________________________________
From: Perry Krug
Sent: Friday, July 08, 2011 12:43 PM
To: dev_support
Subject: simple bash script
I know it may sound super simple, but could I ask that someone create a quick bash script and include this line:
curl http://localhost:8091/pools/default 2> /dev/null | grep -Po "hostname.*?," | cut -d"\"" -f 3 | cut -d":" -f 1
Then name it something like "allnodes.sh" so that I can very easily run:
for i in `./allnodes.sh`;do /opt/membase/bin/mbstats $i:11210 all | grep uptime;done
Please commit it to the build so that it's included in the /opt/membase/bin directory.
I'm open to other ideas, but really need a way to get the full list of IP's from a cluster...especially a >10 noder...
Thanks!
Attachments
For Gerrit Dashboard: MB-4043 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
7824,1 | MB-4043 List all server nodes within a cluster | master | membase-cli | Status: MERGED | +2 | +1 |