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

Bogus values for -D if SO_TIMESTAMPNS is unavailable #216

Closed
sthen opened this issue Mar 7, 2021 · 1 comment
Closed

Bogus values for -D if SO_TIMESTAMPNS is unavailable #216

sthen opened this issue Mar 7, 2021 · 1 comment

Comments

@sthen
Copy link

sthen commented Mar 7, 2021

If the OS doesn't have SO_TIMESTAMPNS then fping chooses CLOCK_MONOTONIC for its timer if available. This results in bogus values for timestamps with fping -D as it uses an uptime-based clock rather than realtime.

$ fping -D -c1 127.0.0.1 2> /dev/null             
[596040.03537] 127.0.0.1 : [0], 64 bytes, 0.122 ms (0.122 avg, 0% loss)

This was introduced in 754a21e (

#define CLOCKID CLOCK_MONOTONIC
) when SO_TIMESTAMP was replaced with SO_TIMESTAMPNS.

@sthen
Copy link
Author

sthen commented Mar 7, 2021

Oh, this is a duplicate of #203

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