]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Included the total cluster size in components_count object
authorBabu Shanmugam <anbu@enovance.com>
Fri, 11 Apr 2014 13:28:50 +0000 (13:28 +0000)
committerBabu Shanmugam <anbu@enovance.com>
Fri, 11 Apr 2014 13:28:50 +0000 (13:28 +0000)
Signed-off-by: Babu Shanmugam <anbu@enovance.com>
README.md
client/ceph-brag
server/ceph_brag/json.py
server/ceph_brag/model/db.py

index 55af44f83a6a394de2cd396306ca2192b890181c..574d7fdb0fe059495c9c6cc84530697cc011719c 100644 (file)
--- a/README.md
+++ b/README.md
@@ -24,7 +24,8 @@ Run 'ceph-brag -h' to get the usage information of this tool.
       "cluster_creation_date": "2014-01-16 13:38:41.928551",
       "uuid": "20679d0e-04b1-4004-8ee9-45ac271510e9",
       "components_count": {
-        "num_bytes": 0,
+        "num_data_bytes": 0,
+        "num_bytes_total": 1209312904,
         "num_osds": 1,
         "num_objects": 0,
         "num_pgs": 192,
index 22b1e153fc0a37acd99e17bef2ec56733a59c82e..91981e580da8eea0e1e49cb6b1f0089ba90e5f25 100755 (executable)
@@ -58,7 +58,8 @@ def get_nums():
 
   pgmap = oj['pgmap']
   num_pgs = pgmap['num_pgs']
-  num_bytes = pgmap['data_bytes']
+  num_data_bytes = pgmap['data_bytes']
+  num_bytes_total = pgmap['bytes_total']
 
   (rc, o, e) = run_command(['ceph', 'pg', 'dump', 'pools', '-f', 'json-pretty'])
   if rc is not 0:
@@ -74,7 +75,8 @@ def get_nums():
           'num_osds':num_osds,
           'num_mdss':num_mdss,
           'num_pgs':num_pgs,
-          'num_bytes':num_bytes,
+          'num_data_bytes':num_data_bytes,
+          'num_bytes_total':num_bytes_total,
           'num_pools':num_pools,
           'num_objects':num_objs}
   return nums
index bc4670287f2e85861074d02d6e327b537536944c..7f36eb6d8ed0480bb770e7e1212dd62ca1510389 100644 (file)
@@ -22,7 +22,8 @@ def jsonify_cluster_info(ci):
 @jsonify.register(db.components_info)
 def jsonify_components_info(comps):
     return dict(
-            num_bytes=comps.num_bytes,
+            num_data_bytes=comps.num_data_bytes,
+            num_bytes_total=comps.num_bytes_total,
             num_osds=comps.num_osds,
             num_objects=comps.num_objects,
             num_pgs=comps.num_pgs,
index 94d98ffc04d2f6e1c18892ef56e48ba3084d9428..5dfc745d8b78981197ae40bb51a090b2e42402b5 100644 (file)
@@ -35,7 +35,8 @@ class components_info(Base):
 
   index = Column(Integer, primary_key=True)
   vid = Column(ForeignKey('version_info.index'))
-  num_bytes = Column(BigInteger)
+  num_data_bytes = Column(BigInteger)
+  num_bytes_total = Column(BigInteger)
   num_osds = Column(Integer)
   num_objects = Column(Integer)
   num_pgs = Column(Integer)
@@ -168,7 +169,8 @@ def put_new_version(data):
   def add_components_info(vi):
     comps_count= info['components_count']
     comps_info = components_info(vid=vi.index,
-                         num_bytes=comps_count['num_bytes'],
+                         num_data_bytes=comps_count['num_data_bytes'],
+                         num_bytes_total=comps_count['num_bytes_total'],
                          num_osds=comps_count['num_osds'],
                          num_objects=comps_count['num_objects'],
                          num_pgs=comps_count['num_pgs'],