Skip to content

Instantly share code, notes, and snippets.

@chrisglass
Last active December 10, 2015 22:49
Show Gist options
  • Save chrisglass/4505342 to your computer and use it in GitHub Desktop.
Save chrisglass/4505342 to your computer and use it in GitHub Desktop.
Display full Ceph ring usage statistics using the python API
#!/usr/bin/python
# This requires rados.py to be at least as recent as
# https://raw.github.com/chrisglass/ceph/expose_cluster_stats_to_python/src/pybind/rados.py
import rados
stats = {}
with rados.Rados(conffile='/etc/ceph/ceph.conf') as cluster:
stats = cluster.get_cluster_stats()
print stats
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment