facebookincubator / below

A time traveling resource monitor for modern Linux systems
Apache License 2.0
1.01k stars 59 forks source link

Add sub-module for reading `tc` stats #8210

Closed mmynk closed 2 months ago

mmynk commented 8 months ago

Result:

$ below dump tc -b '5s ago'
Datetime            Interface   Kind       Queue Length   Bps        Pps        Bytes      Packets    Backlog    Drops      Requeues   Overlimits   MaxPacket   EcnMark    NewFlowsLen   OldFlowsLen   CeMark     DropOverlimit   NewFlowCount   MemoryUsage   DropOvermemory   Target     Limit      Interval   Ecn        Quantum    CeThreshold   DropBatchSize   MemoryLimit   Flows      Timestamp
2024-01-30 20:24:31 lo          noqueue    0              0.0 B/s    0/s        0.0 B/s    0/s        0/s        0/s        0/s        0/s          ?           ?          ?             ?             ?          ?               ?              ?             ?                ?          ?          ?          ?          ?          ?             ?               ?             ?          1706646271
2024-01-30 20:24:31 ens5        mq         0              0.0 B/s    0/s        167 B/s    2/s        0/s        0/s        0/s        0/s          ?           ?          ?             ?             ?          ?               ?              ?             ?                ?          ?          ?          ?          ?          ?             ?               ?             ?          1706646271
2024-01-30 20:24:31 ens5        fq_codel   0              0.0 B/s    0/s        0.0 B/s    0/s        0/s        0/s        0/s        0/s          110         0          0             0             0          0/s             0/s            0/s           0/s              4999       10240      99999      1          1514       0             64              33554432      0/s        1706646271
2024-01-30 20:24:31 ens5        fq_codel   0              0.0 B/s    0/s        167 B/s    2/s        0/s        0/s        0/s        0/s          182         0          0             0             0          0/s             0/s            0/s           0/s              4999       10240      99999      1          1514       0             64              33554432      0/s        1706646271
mmynk commented 3 months ago

@brianc118 Could you take a look at the PR again? Thanks!

mmynk commented 3 months ago

@brianc118 not sure if you got a chance to read my last comment regarding the implementation of maj:min identifier for qdiscs: https://github.com/facebookincubator/below/pull/8210#discussion_r1550174837 I think that's the only remaining part for this PR. I'll add README in the meanwhile.

mmynk commented 2 months ago

@brianc118 added README and refactored the fq_codel xstats definition. Could you please take another look?

I will refactor TcModel to be uniquely identifiable in a subsequent PR. Thanks!

facebook-github-bot commented 2 months ago

@brianc118 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

mmynk commented 2 months ago

@brianc118 fixed the lint issues, for some reason the test seems to be running for over a day, would re-triggering help? regardless, could you please re-import to trigger the linter again? thanks!

facebook-github-bot commented 2 months ago

@brianc118 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

brianc118 commented 2 months ago

@mmynk don't worry about the internal tests. I suspect the test hook isn't working as expected.

mmynk commented 2 months ago

@brianc118 is the PR okay to be merged? just wanted to make sure if there is something I need to fix (lint or test). thanks!

brianc118 commented 2 months ago

@mmynk I was just working on vendoring the netlink-* crates internally which proved to be a pain. Expect to have this merged in the next few days.

mmynk commented 2 months ago

@mmynk I was just working on vendoring the netlink-* crates internally which proved to be a pain.

Oh shoot! I wish I could help with that.

Expect to have this merged in the next few days.

Great, thanks for letting me know.

facebook-github-bot commented 2 months ago

@brianc118 merged this pull request in facebookincubator/below@4acd7488eaea9147cd879b41ff9826dd8a45a52b.