Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mon: show the pg count in df output #7050

Merged
merged 1 commit into from May 5, 2016
Merged

Conversation

songbaisen
Copy link

Mon: show the total pg on each osd
ceph pg dump osds
dumped osds in format plain
osdstat kbused kbavail kb hb in hb out pg sum
0 143304204 79623420 234882056 [1,2] [] 330
1 143304204 79623420 234882056 [0,2] [] 295
2 143304148 79623476 234882056 [0,1] [] 303
sum 429912556 238870316 704646168

Fixes: #14183
Signed-off-by: song baisen song.baisen@zte.com.cn

@songbaisen songbaisen force-pushed the wipshowpg branch 3 times, most recently from 3b144b0 to daf786d Compare December 24, 2015 09:22
@songbaisen
Copy link
Author

Hi, is there any body can help me?I can not understand this test error.

@songbaisen songbaisen changed the title Show the totall pg on each osd. Show the totallpg on each osd. Dec 25, 2015
@songbaisen songbaisen changed the title Show the totallpg on each osd. Show the total pg on each osd. Dec 25, 2015
@songbaisen songbaisen force-pushed the wipshowpg branch 9 times, most recently from 73c3862 to 7e653bc Compare January 5, 2016 10:38
@liewegas
Copy link
Member

liewegas commented Jan 8, 2016

This output is already part of 'ceph osd df', btw.

@songbaisen
Copy link
Author

@liewegas Oh, thans very much to you Sage Weil. Show the total pg on each osd may be more related with the ceph pg dump osds command.Just personal idea.

@@ -370,6 +373,7 @@ void osd_stat_t::generate_test_instances(std::list<osd_stat_t*>& o)
o.back()->kb = 1;
o.back()->kb_used = 2;
o.back()->kb_avail = 3;
o.back()->pg_sum = 100;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't add this to the osd_stat_t. It breaks compatibiltiy (at least the way it was added does) but more importantly it's not needed--the monitor already has a per-osd pg sum in the PGMap (see mon/PGMap.h). Use that instead!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liewegas Ok,clear it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@songbaisen i guess what @liewegas means is the PGMap::get_num_pg_by_osd(osd)?

so you don't need to add pg_sum to osd_stat_t, by the way, the new pg_sum field in osd_stat_t breaks the compatibility. see ENCODE_START(4, 2, bl); in the osd_stat_t::encode().

@songbaisen songbaisen force-pushed the wipshowpg branch 3 times, most recently from 40b0eed to 56de90a Compare January 15, 2016 10:04
@songbaisen
Copy link
Author

@tchaikov @liewegas Thanks for yours advice. I change it. It now look more simple.Sorry for late reply Our network is not very stable for github.

@tchaikov
Copy link
Contributor

@songbaisen

could you add a prefix for the title of your commit message?

and the last two lines of your commit do not look quite right, should be

Fixes: #14183
Signed-off-by: song baisen <song.baisen@zte.com.cn>

@songbaisen songbaisen changed the title Show the total pg on each osd. Mon:show the total pg on each osd. Jan 16, 2016
@songbaisen
Copy link
Author

@tchaikov Thanks for your warm education! That reminds me of my mentor.Now I can use github more skilled than before 。

@liewegas liewegas changed the title Mon:show the total pg on each osd. mon: show the total pg on each osd May 3, 2016
@liewegas liewegas changed the title mon: show the total pg on each osd mon: show the pg count in df output May 3, 2016
ceph pg dump osds
dumped osds in format plain
osdstat kbused kbavail kb hb in hb out pg sum
0 143304204 79623420 234882056 [1,2] [] 330
1 143304204 79623420 234882056 [0,2] [] 295
2 143304148 79623476 234882056 [0,1] [] 303
sum 429912556 238870316 704646168

Fixes:ceph#14183
Signed-off-by: songbaisen song.baisen@zte.com.cn
@liewegas liewegas merged commit 70ef394 into ceph:master May 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants