distrax.utils.ceph.pool_status#
- distrax.utils.ceph.pool_status(timeout='5')[source]#
Get the status of the Pools.
- Parameters:
timeout (
str
) – The length of time to try and connect to the cluster.
ceph -s is used instead of ceph pg stat as ceph pg stat is faster to record the status, and such does not mirror ceph -s. Therefore, as ceph -s is the default way to check the status of the ceph cluster it is used to maintain cohesion with system outputs.
- Return type:
- Returns:
Where ‘int’ is a number and ‘str’ is a string
>>> {'pgs_by_state': [{'state_name':str,'count': int}], ... 'num_pgs': int, ... 'num_pools': int, ... 'num_objects': int, ... 'data_bytes': int, ... 'bytes_used': int, ... 'bytes_avail': int, ... 'bytes_total': int ...}
Examples
>>> import distrax.utils.ceph as ceph >>> ceph.pool_status() {'pgs_by_state': [{'state_name': 'active+clean', 'count': 65}], 'num_pgs': 65, 'num_pools': 3, 'num_objects': 2, 'data_bytes': 590368, 'bytes_used': 13357056, 'bytes_avail': 1056190464, 'bytes_total': 1069547520}