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

osd/OpRequest: dump both name and addr for the client op #12691

Merged
merged 1 commit into from Dec 30, 2016

Conversation

Projects
None yet
2 participants
@runsisi
Contributor

runsisi commented Dec 28, 2016

"description": "osd_op(...)",
            "initiated_at": "2016-12-28 10:03:01.594712",
            "age": 0.461309,
            "duration": 0.461392,
            "type_data": [
                "waiting for sub ops",
                {
                    "client": "client.2479681 192.2.2.46:0\/3375080003",
                    "tid": 119
                },

vs

"description": "osd_op(...)",
            "initiated_at": "2016-12-28 10:02:25.649869",
            "age": 0.602622,
            "duration": 0.602842,
            "type_data": [
                "waiting for sub ops",
                {
                    "client": "client.2479681",
                    "tid": 46
                },

for debugging purposes, without the addr, it's very hard for us to trace back the client.

Signed-off-by: runsisi runsisi@zte.com.cn

f->dump_string("client", client_name.str());
stringstream client_inst;
client_inst << m->get_orig_source_inst();
f->dump_string("client", client_inst.str());

This comment has been minimized.

@liewegas

liewegas Dec 28, 2016

Member

Can you instead add a new field, "addr" or "client_addr", so that "client" is still just teh entity name (client.1234)?

This comment has been minimized.

@runsisi

runsisi Dec 29, 2016

Contributor

done, thanks!

"description": "osd_op(client.2635642.0:401 0.e50f6e92 benchmark_data_ceph242_14981_object400 [set-alloc-hint object_size 4194304 write_size 4194304,write 0~4194304] snapc 0=[] ondisk+write+known_if_redirected e274)",
            "initiated_at": "2016-12-29 13:55:36.831502",
            "age": 0.069869,
            "duration": 0.070436,
            "type_data": [
                "waiting for sub ops",
                {
                    "client": "client.2635642",
                    "client_addr": "192.2.2.46:0\/2245183744",
                    "tid": 401
                },
runsisi
osd/OpRequest: dump both name and addr for the client op
Signed-off-by: runsisi <runsisi@zte.com.cn>
f->dump_string("client", client_name.str());
f->dump_string("client_addr", client_addr.str());

This comment has been minimized.

@liewegas

liewegas Dec 29, 2016

Member

Note a simpler syntax is just

f->dump_stream("client") << m->get_orig_source();
f->dump_stream("client_addr") << m->get_orig_source_addr();

@liewegas liewegas merged commit 0260de9 into ceph:master Dec 30, 2016

@runsisi runsisi deleted the runsisi:wip-dump-osdop branch Dec 31, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment