Details
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!
# ./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!
Activity
Farshid Ghods
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Keith Batten [ keith ] | Bin Cui [ bcui ] |
Farshid Ghods
made changes -
| Summary | CLI - membase host-list | membase cli should have a flag for printing out all the server nodes without health info |
Bin Cui
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] |
Peter Wansch
made changes -
| Component/s | tools [ 10223 ] | |
| Component/s | cli [ 10011 ] |