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

nfsdtop.linux does not count NFS4 write traffic #3

Open
rrzefox opened this issue Mar 17, 2023 · 0 comments
Open

nfsdtop.linux does not count NFS4 write traffic #3

rrzefox opened this issue Mar 17, 2023 · 0 comments

Comments

@rrzefox
Copy link

rrzefox commented Mar 17, 2023

I think I have found a bug in nfsdtop.linux: It currently does not count any NFS4 write traffic.

Looking at the code, I see the following in kprobe:nfsd4_write:

@nfsd4_write_count[tid] = $nfsd4_write->wr_bytes_written;

That seems wrong. When the write function is entered, obviously 0 bytes have been written so far. We would need to read wr_bytes_written when the function returns instead, it will always contain 0 before the function runs.

As a workaround, I tried resorting to $nfsd4_write->wr_buflen instead. That does yield results that look far more in line with the actual network and disc traffic of the server I tried this on - but obviously it is prone to overcounting if not all bytes are written, e.g. because the user exceeded the quota. I'm unsure if there is a better fix, otherwise I'd propose a patch.

Thanks for this great tool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant