|
@@ -423,6 +423,18 @@ On success, prints a JSON listing of the member IDs, statuses, names, peer addre
|
|
|
|
|
|
|
|
```bash
|
|
```bash
|
|
|
./etcdctl member list
|
|
./etcdctl member list
|
|
|
|
|
+8211f1d0f64f3269, started, infra1, http://127.0.0.1:12380, http://127.0.0.1:2379
|
|
|
|
|
+91bc3c398fb3c146, started, infra2, http://127.0.0.1:22380, http://127.0.0.1:22379
|
|
|
|
|
+fd422379fda50e48, started, infra3, http://127.0.0.1:32380, http://127.0.0.1:32379
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
|
|
+```bash
|
|
|
|
|
+./etcdctl -w json member list
|
|
|
|
|
+{"header":{"cluster_id":17237436991929493444,"member_id":9372538179322589801,"raft_term":2},"members":[{"ID":9372538179322589801,"name":"infra1","peerURLs":["http://127.0.0.1:12380"],"clientURLs":["http://127.0.0.1:2379"]},{"ID":10501334649042878790,"name":"infra2","peerURLs":["http://127.0.0.1:22380"],"clientURLs":["http://127.0.0.1:22379"]},{"ID":18249187646912138824,"name":"infra3","peerURLs":["http://127.0.0.1:32380"],"clientURLs":["http://127.0.0.1:32379"]}]}
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
|
|
+```bash
|
|
|
|
|
+./etcdctl -w table member list
|
|
|
+------------------+---------+--------+------------------------+------------------------+
|
|
+------------------+---------+--------+------------------------+------------------------+
|
|
|
| ID | STATUS | NAME | PEER ADDRS | CLIENT ADDRS |
|
|
| ID | STATUS | NAME | PEER ADDRS | CLIENT ADDRS |
|
|
|
+------------------+---------+--------+------------------------+------------------------+
|
|
+------------------+---------+--------+------------------------+------------------------+
|
|
@@ -432,11 +444,6 @@ On success, prints a JSON listing of the member IDs, statuses, names, peer addre
|
|
|
+------------------+---------+--------+------------------------+------------------------+
|
|
+------------------+---------+--------+------------------------+------------------------+
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-```bash
|
|
|
|
|
-./etcdctl -w json member list
|
|
|
|
|
-{"header":{"cluster_id":17237436991929493444,"member_id":9372538179322589801,"raft_term":2},"members":[{"ID":9372538179322589801,"name":"infra1","peerURLs":["http://127.0.0.1:12380"],"clientURLs":["http://127.0.0.1:2379"]},{"ID":10501334649042878790,"name":"infra2","peerURLs":["http://127.0.0.1:22380"],"clientURLs":["http://127.0.0.1:22379"]},{"ID":18249187646912138824,"name":"infra3","peerURLs":["http://127.0.0.1:32380"],"clientURLs":["http://127.0.0.1:32379"]}]}
|
|
|
|
|
-```
|
|
|
|
|
-
|
|
|
|
|
## Utility Commands
|
|
## Utility Commands
|
|
|
|
|
|
|
|
### ENDPOINT \<subcommand\>
|
|
### ENDPOINT \<subcommand\>
|
|
@@ -481,13 +488,9 @@ On success, prints a line of JSON encoding each endpoint URL, ID, version, datab
|
|
|
|
|
|
|
|
```bash
|
|
```bash
|
|
|
./etcdctl endpoint status
|
|
./etcdctl endpoint status
|
|
|
-+-----------------+------------------+-----------+---------+-----------+-----------+------------+
|
|
|
|
|
-| ENDPOINT | ID | VERSION | DB SIZE | IS LEADER | RAFT TERM | RAFT INDEX |
|
|
|
|
|
-+-----------------+------------------+-----------+---------+-----------+-----------+------------+
|
|
|
|
|
-| 127.0.0.1:2379 | 8211f1d0f64f3269 | 2.3.0+git | 25 kB | false | 2 | 31563 |
|
|
|
|
|
-| 127.0.0.1:22379 | 91bc3c398fb3c146 | 2.3.0+git | 25 kB | false | 2 | 31563 |
|
|
|
|
|
-| 127.0.0.1:32379 | fd422379fda50e48 | 2.3.0+git | 25 kB | true | 2 | 31563 |
|
|
|
|
|
-+-----------------+------------------+-----------+---------+-----------+-----------+------------+
|
|
|
|
|
|
|
+127.0.0.1:2379, 8211f1d0f64f3269, 3.0.0-beta.0+git, 25 kB, false, 2, 63
|
|
|
|
|
+127.0.0.1:22379, 91bc3c398fb3c146, 3.0.0-beta.0+git, 25 kB, false, 2, 63
|
|
|
|
|
+127.0.0.1:32379, fd422379fda50e48, 3.0.0-beta.0+git, 25 kB, true, 2, 63
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
```bash
|
|
```bash
|
|
@@ -495,6 +498,16 @@ On success, prints a line of JSON encoding each endpoint URL, ID, version, datab
|
|
|
[{"Endpoint":"127.0.0.1:2379","Status":{"header":{"cluster_id":17237436991929493444,"member_id":9372538179322589801,"revision":2,"raft_term":2},"version":"2.3.0+git","dbSize":24576,"leader":18249187646912138824,"raftIndex":32623,"raftTerm":2}},{"Endpoint":"127.0.0.1:22379","Status":{"header":{"cluster_id":17237436991929493444,"member_id":10501334649042878790,"revision":2,"raft_term":2},"version":"2.3.0+git","dbSize":24576,"leader":18249187646912138824,"raftIndex":32623,"raftTerm":2}},{"Endpoint":"127.0.0.1:32379","Status":{"header":{"cluster_id":17237436991929493444,"member_id":18249187646912138824,"revision":2,"raft_term":2},"version":"2.3.0+git","dbSize":24576,"leader":18249187646912138824,"raftIndex":32623,"raftTerm":2}}]
|
|
[{"Endpoint":"127.0.0.1:2379","Status":{"header":{"cluster_id":17237436991929493444,"member_id":9372538179322589801,"revision":2,"raft_term":2},"version":"2.3.0+git","dbSize":24576,"leader":18249187646912138824,"raftIndex":32623,"raftTerm":2}},{"Endpoint":"127.0.0.1:22379","Status":{"header":{"cluster_id":17237436991929493444,"member_id":10501334649042878790,"revision":2,"raft_term":2},"version":"2.3.0+git","dbSize":24576,"leader":18249187646912138824,"raftIndex":32623,"raftTerm":2}},{"Endpoint":"127.0.0.1:32379","Status":{"header":{"cluster_id":17237436991929493444,"member_id":18249187646912138824,"revision":2,"raft_term":2},"version":"2.3.0+git","dbSize":24576,"leader":18249187646912138824,"raftIndex":32623,"raftTerm":2}}]
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
|
|
+```bash
|
|
|
|
|
+./etcdctl -w table endpoint status
|
|
|
|
|
++-----------------+------------------+------------------+---------+-----------+-----------+------------+
|
|
|
|
|
+| ENDPOINT | ID | VERSION | DB SIZE | IS LEADER | RAFT TERM | RAFT INDEX |
|
|
|
|
|
++-----------------+------------------+------------------+---------+-----------+-----------+------------+
|
|
|
|
|
+| 127.0.0.1:2379 | 8211f1d0f64f3269 | 3.0.0-beta.0+git | 25 kB | false | 2 | 52 |
|
|
|
|
|
+| 127.0.0.1:22379 | 91bc3c398fb3c146 | 3.0.0-beta.0+git | 25 kB | false | 2 | 52 |
|
|
|
|
|
+| 127.0.0.1:32379 | fd422379fda50e48 | 3.0.0-beta.0+git | 25 kB | true | 2 | 52 |
|
|
|
|
|
++-----------------+------------------+------------------+---------+-----------+-----------+------------+
|
|
|
|
|
+```
|
|
|
|
|
|
|
|
### LOCK \<lockname\>
|
|
### LOCK \<lockname\>
|
|
|
|
|
|
|
@@ -705,11 +718,7 @@ On success, prints a line of JSON encoding the database hash, revision, total ke
|
|
|
#### Examples
|
|
#### Examples
|
|
|
```bash
|
|
```bash
|
|
|
./etcdctl snapshot status file.db
|
|
./etcdctl snapshot status file.db
|
|
|
-+----------+----------+------------+------------+
|
|
|
|
|
-| HASH | REVISION | TOTAL KEYS | TOTAL SIZE |
|
|
|
|
|
-+----------+----------+------------+------------+
|
|
|
|
|
-| cf1550fb | 3 | 3 | 25 kB |
|
|
|
|
|
-+----------+----------+------------+------------+
|
|
|
|
|
|
|
+cf1550fb, 3, 3, 25 kB
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
```bash
|
|
```bash
|
|
@@ -717,6 +726,15 @@ On success, prints a line of JSON encoding the database hash, revision, total ke
|
|
|
{"hash":3474280699,"revision":3,"totalKey":3,"totalSize":24576}
|
|
{"hash":3474280699,"revision":3,"totalKey":3,"totalSize":24576}
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
|
|
+```bash
|
|
|
|
|
+./etcdctl -write-out=table snapshot status file.db
|
|
|
|
|
++----------+----------+------------+------------+
|
|
|
|
|
+| HASH | REVISION | TOTAL KEYS | TOTAL SIZE |
|
|
|
|
|
++----------+----------+------------+------------+
|
|
|
|
|
+| cf1550fb | 3 | 3 | 25 kB |
|
|
|
|
|
++----------+----------+------------+------------+
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
## Notes
|
|
## Notes
|
|
|
|
|
|
|
|
- JSON encoding for keys and values uses base64 since they are byte strings.
|
|
- JSON encoding for keys and values uses base64 since they are byte strings.
|