px_clusterinfo (v2.0)

Description

The px_clusterinfo command lists the structure of Portworx storage clusters.

The command will inspect the key-value database used by the Portworx cluster, and extract the information about the various clusters, including the storage nodes and their status.

Download

You can download the latest Linux/x64 version @ http://yum.portworx.com/dl/clusterinfo/px_clusterinfo.

Apple OSX version is also available @ px_clusterinfo-osx.

Syntax

Display basic cluster information:

Usage: px_clusterinfo [-e ep1|-c file] [-cacert file -cert file -key file] \
                      [-username user:passwd] [-q]

    -c string
            Px configuration file (default "/etc/pwx/config.json")
    -e string
            Kvdb endpoint (ie. etcd:http://localhost:4001)
  
  * SSL authentication parameters (may be required w/ https endpoints):
    -cacert string
            Specify CA certificate chain file
    -cert string
            Specify client certificate file
    -key string
            Specify client certificate key
  
  * Basic authentication parameters:
    -username string
            Specify username and password (ie. -username root:rootpw)
  
  * Misc:
    -d      Debug output
    -q      Quiet mode (display summary only)

Examples

Use connection information from local Portworx configuration file:

px_clusterinfo -c /etc/pwx/config.json

Specify connection information:

px_clusterinfo -e etcd:http://etcd0w.portworx.com:4001

Run in “quiet mode” to display summary statistics only:

px_clusterinfo -q -e etcd:http://etcd0w.portworx.com:4001

Specify etcd username/password parameters:

px_clusterinfo -e etcd:http://127.0.0.1:4001 -username root:password

Specify SSL connection parameters:

px_clusterinfo -e etcd:https://etcd0w.portworx.com:4001 -cacert ca.crt -cert cert.crt -key key.key

Example output

# px_clusterinfo -e etcd:http://etcd0w.portworx.com:4001

Portworx storage cluster report
===============================
> Date: 2017-03-17 14:00:44 -0700
> Generated-By: px_clusterinfo.sh-v2.0 on imagine.local using kvdbAPI and etcd-kv on http://etcd0w.portworx.com:4001

Portworx cluster 01ee6584-97bb-11e6-86d9-0242ac110003 has 7 node(s):
   3a06d9d5-d36d-470e-9609-38d63a5c2b59 [status:ok]
   3c4182e3-ee88-4247-8a6a-42dd065f753e [status:removed]
   401f0986-892b-4551-920e-ec715791fe0e [status:removed]
   6b799b1c-a642-415b-abd7-6097be280ddc [status:ok]
   9636274a-8bcb-4420-8610-604cd1293462 [status:ok]
   b47d9ccb-2136-42d6-aaa5-a98545c38e44 [status:ok]
   fc0c9f6d-7ad0-44a7-897a-65b43496739c [status:ok]

Portworx cluster 152c8756-6bbd-11e6-aa15-0242ac110003 has 3 node(s):
   6abfe57d-77f2-4945-b266-09a0fabe13c8 [status:init]
   859b712c-6d63-4520-94d6-ff550cd55629 [status:init]
   c0e7ebbd-42fe-4d29-a60e-dc61f55f33d1 [status:init]

Portworx cluster 15c30332-c634-11e6-a404-0242ac110003 has 1 node(s):
   ff74fc89-1ceb-45ae-beb9-53dc1d0fd206 [status:rm-pending]

Portworx cluster 2a998455-94a8-11e6-94a8-0242ac110003 has 6 node(s):
   3dedce11-b073-481e-9c18-aeeb16dc50c9 [status:ok]
   4d9c4c47-5e17-4b5b-9b39-dc51bfe6631c [status:ok]
   7ac30dd2-657f-46a2-a841-cd0e96933fa3 [status:ok]
   872bf528-eb76-4222-a765-19bc43a4483b [status:ok]
   d2510a4a-9ee8-4cea-8f24-c416a62def91 [status:rm-fail]
   dadbf69c-b8bd-4bbc-a447-4df8ad8170fa [status:removed]
[...]

TOTAL number of clusters: 165
TOTAL number of nodes: 541

WARNING: Also found 2 clusters that have no nodes information:
   10a9aea2-aa85-11e6-afb5-0242ac110003
   11cfaae3-6957-11e6-83e2-0242ac110003

Prerequisites