$ git clone https://github.com/gluster/glustercli-python.git $ cd glustercli-python # python3 setup.py install
gstatus is a command line tool which aggregates the various status information about GlusterFS cluster and presents the data in pretty printed format on the console. Output can be printed in JSON format as well with the
-o json option.
New in gstatus 1.0
Python3 port (Now supports only Python3)
Supports all volume types (earlier versions displayed wrong volume sizes for arbiter and disperse volumes)
Adds quota and snapshot information.
Regular expression support for -v option. If large number of volumes are present in the cluster, filtering is easier.
The default view now shows volume information as well.
Much richer json output, this includes snapshot, volume health, brick process information, brick mount options and lot more.
The earlier version was not maintained for a long time and was outdated. Due to the bulky code base, adding new features like quota, snapshots, and new volume types was difficult and would slow down the tool. Another motivation to rewrite gstatus is to leverage the flexibility and robustness of glustercli-python library written by Aravinda and get away with gluster command execution, xml parsing, exception handling routines implemented within gstatus. All the heavy lifting is now done by the glustercli-python library thus making gstatus faster, easily maintainable, and lightweight (gstatus is now ~200 lines of python program as compared to ~2500 lines in the earlier versions).
A brief tour of gstatus
Installing from source
Installing the gstatus tool
$ git clone https://github.com/gluster/gstatus.git $ cd gstatus $ VERSION=1.0.1 make gen-version # python3 setup.py install
Using the pre-compiled binary
$ curl -LO https://github.com/gluster/gstatus/releases/download/v1.0.1/gstatus $ chmod +x ./gstatus # cp gstatus /usr/local/bin
# root@master-node:~# gstatus --help Usage: gstatus [options] Options: --version show program's version number and exit -h, --help show this help message and exit -v, --volume Supply a volume or a list of volumes by repeated invocation of -v. A regular expression can be provided in place of a volume name (ensure to use single quotes around the expression) -a, --all Print all available details on volumes -b, --bricks Print the list of bricks -q, --quota Print the quota information -s, --snapshots Print the snapshot information -u UNITS, --units=UNITS display storage size in given units -o OUTPUT_MODE, --output-mode=OUTPUT_MODE Output mode, only json is supported currently. Default is to print to console.
root@master-node:~# gstatus Cluster: Status: Healthy GlusterFS: 9dev Nodes: 3/3 Volumes: 1/1 Volumes: snap-1 Replicate Started (UP) - 2/2 Bricks Up Capacity: (0.81% used) 332.00 MiB/40.00 GiB (used/total) Snapshots: 2 Quota: On root@master-node:~#
Please try out other options and let us know what you think. In case of any issues please report here
Currently gstatus does not have self-heal information. In the next release we plan to add self-heal information like number of files pending heal.
Join the Kadalu team as we plan, design and develop new features. We are available on our Slack instance, https://kadalu.slack.com.