Feature #3484
closedmon: 'ceph df'
0%
Updated by Sage Weil over 11 years ago
- Translation missing: en.field_story_points set to 2
- Translation missing: en.field_position deleted (
17) - Translation missing: en.field_position set to 12
Updated by Joao Eduardo Luis about 11 years ago
- Status changed from New to In Progress
Updated by Joao Eduardo Luis about 11 years ago
- Status changed from In Progress to Fix Under Review
wip-3484
Example output:
$ ./ceph -c ceph.conf df global statistics total used 69393K total avail 359M total space 450M pool statistics name id used (B) objects data 0 0 0 metadata 1 25052 53 rbd 2 0 0 test 3 55475K 1 $ ./ceph -c ceph.conf df --format=json { "stats": { "total_space": 472345880, "total_used": 71058504, "total_avail": 377286864}, "pools": [ { "name": "data", "id": 0, "stats": { "kb_used": 0, "bytes_used": 0, "objects": 0}}, { "name": "metadata", "id": 1, "stats": { "kb_used": 25, "bytes_used": 25052, "objects": 53}}, { "name": "rbd", "id": 2, "stats": { "kb_used": 0, "bytes_used": 0, "objects": 0}}, { "name": "test", "id": 3, "stats": { "kb_used": 55476, "bytes_used": 56806602, "objects": 1}}]}
With 'detail'/extended version:
$ ./ceph -c ceph.conf df detail global statistics total used 69381K total avail 359M total space 450M num objects 54 pool statistics name id category used (B) objects read (B) write (B) data 0 - 0 0 0 0 metadata 1 - 25052 53 31 126 rbd 2 - 0 0 0 0 test 3 - 55475K 1 0 14
or in json:
$ ./ceph -c ceph.conf df detail --format=json { "stats": { "total_space": 472345880, "total_used": 71057076, "total_avail": 377288292, "total_objects": 54}, "pools": [ { "name": "data", "id": 0, "categories": [], "stats": { "kb_used": 0, "bytes_used": 0, "objects": 0, "rd": 0, "rd_kb": 0, "wr": 0, "wr_kb": 0}}, { "name": "metadata", "id": 1, "categories": [], "stats": { "kb_used": 25, "bytes_used": 25052, "objects": 53, "rd": 31, "rd_kb": 0, "wr": 126, "wr_kb": 68}}, { "name": "rbd", "id": 2, "categories": [], "stats": { "kb_used": 0, "bytes_used": 0, "objects": 0, "rd": 0, "rd_kb": 0, "wr": 0, "wr_kb": 0}}, { "name": "test", "id": 3, "categories": [], "stats": { "kb_used": 55476, "bytes_used": 56806602, "objects": 1, "rd": 0, "rd_kb": 0, "wr": 14, "wr_kb": 55476}}]}
Updated by Greg Farnum about 11 years ago
Haven't looked at the code, but how do those categories display in the detail version? Does the pool print out multiple times in a tree structure?
Updated by Joao Eduardo Luis about 11 years ago
It should print something like
pool_foo 6 cat_foo <remaining columns> pool_foo 6 cat_foo2 <remaining columns>
But now that I think of it, if would be trivial to make it just print the pool name and the id once.
Is this what you mean by chance?
Updated by Greg Farnum about 11 years ago
It just wasn't clear from the columns whether each category got a separate row or if it was just a category listing. :)
Updated by Sage Weil about 11 years ago
Can you right-justify the numbers in the plain view?
otherwise, looks good to me!
Updated by Dan Mick about 11 years ago
If you're using TextTable you can, trivially :)
Updated by Josh Durgin about 11 years ago
The plain output columns say (B), but the data will be in different units since you're using si_t. I'd suggest just leaving off the (B) from the column headers.
Updated by Joao Eduardo Luis about 11 years ago
Updated the branch using TextTable to reflect Dan's suggestion (this thing is a beauty!)
Also added a new column of '%USED' to the global statistics, as well as to the pool's, considering the %USED of the global's available -- both only available on 'detail':
$ ./ceph -c ceph.conf df detail GLOBAL: SIZE AVAIL USED %USED OBJECTS 450M 359M 69659K 15.10 55 POOLS: NAME ID CATEGORY USED %USED OBJECTS READ WRITE data 0 - 0 0 0 0 0 metadata 1 - 25052 0 53 31 126 rbd 2 - 0 0 0 0 0 test 3 - 55475K 0.01 1 0 14 foo 4 - 0 0 1 0 0 foo_cat 0 0 1 0 0 $ ./ceph -c ceph.conf df GLOBAL: SIZE AVAIL USED 450M 359M 69659K POOLS: NAME ID USED OBJECTS data 0 0 0 metadata 1 25052 53 rbd 2 0 0 test 3 55475K 1 foo 4 0 1
Updated by Sage Weil about 11 years ago
Looks much nicer!
Let's call it raw used in the global view to distinguish it from user data usage units.
Also let's include the % in the non detail view
Updated by Joao Eduardo Luis about 11 years ago
$ ./ceph -c ceph.conf df GLOBAL: SIZE AVAIL RAW USED %RAW USED 450M 358M 70635K 15.31 POOLS: NAME ID USED %USED OBJECTS data 0 0 0 0 metadata 1 25052 0 53 rbd 2 0 0 0 test 3 55475K 0.01 1 foo 4 0 0 1 $ ./ceph -c ceph.conf df detail GLOBAL: SIZE AVAIL RAW USED %RAW USED OBJECTS 450M 358M 70634K 15.31 55 POOLS: NAME ID CATEGORY USED %USED OBJECTS READ WRITE data 0 - 0 0 0 0 0 metadata 1 - 25052 0 53 31 126 rbd 2 - 0 0 0 0 0 test 3 - 55475K 0.01 1 0 14 foo 4 - 0 0 1 0 0 foo_cat 0 0 1 0 0
Updated by Sage Weil about 11 years ago
- Status changed from Fix Under Review to Resolved