Use 64-bit Darwin netstat counters#1319
Conversation
f0cdb97 to
f26e607
Compare
|
For some reason, this produces bad data. |
|
@SuperQ Any idea why? Maybe @matthiasr knows more? |
|
uh, no, how is it bad? some byte order problem? what do the darwin/macOS tools do? |
|
@matthiasr I have no idea why it doesn't work. Here's another implementation I found that might work better. Uses |
f26e607 to
b7b9b79
Compare
Avoid 32-bit counter rollovers. Signed-off-by: Ben Kochie <superq@gmail.com>
b7b9b79 to
dd63036
Compare
|
Ok, I tested this on my mac, seems to work better. |
|
@pronoiac I found a better way to get the data. I've re-written this PR, can you try this again? |
|
Ran a test on my mac, looks correct now: Before: After: Rollover math looks right: |
matthiasr
left a comment
There was a problem hiding this comment.
should this be in procfs? 😬
|
Hah, no, this is syscalls, not procfs parsing. |
|
I tested build 5550, and the data looks good at first glance! Thanks! 🎉 |
Avoid 32-bit counter rollovers. Signed-off-by: Ben Kochie <superq@gmail.com>
Avoid 32-bit counter rollovers. Signed-off-by: Ben Kochie <superq@gmail.com>
Avoid 32-bit counter rollovers.
Closes: #1318