Add trap flow counter support#1868
Conversation
a35423e to
eb997c1
Compare
|
Hi @qiluo-msft , could you please suggest a reviewer from MSFT side? Thanks! |
|
Hi @qiluo-msft , kindly reminder, could you please suggest a reviewer? |
eb997c1 to
80035f1
Compare
|
/azpw run |
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
8227476 to
d9563bf
Compare
|
/azpw run |
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
d9563bf to
298260f
Compare
298260f to
384b1fb
Compare
|
/azpw run Azure.sonic-utilities |
|
/AzurePipelines run Azure.sonic-utilities |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@dgsudharsan, can you review this as well? |
counterpoll/main.py
Outdated
| if tunnel_info: | ||
| data.append(["TUNNEL_STAT", rif_info.get("POLL_INTERVAL", DEFLT_10_SEC), rif_info.get("FLEX_COUNTER_STATUS", DISABLE)]) | ||
| if trap_info: | ||
| data.append(["FLOW_CNT_TRAP_STAT", trap_info.get("POLL_INTERVAL", DEFLT_1_SEC), trap_info.get("FLEX_COUNTER_STATUS", DISABLE)]) |
There was a problem hiding this comment.
Should this be changed to 10 sec?
tests/counterpoll_test.py
Outdated
| PG_WATERMARK_STAT 10000 enable | ||
| PG_DROP_STAT 10000 enable | ||
| ACL 10000 enable | ||
| FLOW_CNT_TRAP_STAT 1000 enable |
There was a problem hiding this comment.
Should this be 10000?
|
|
||
| old_values = old_stats[name] | ||
| if values[-1] != old_values[-1]: | ||
| # Counter OID not equal means the trap was removed and added again. Removing a trap would cause |
There was a problem hiding this comment.
This is a good logic to handle. However, what if OID returned is the same as before delete? Should we rather not check if the diff is negative and consider it as a case where trap got deleted?
|
/azpw run Azure.sonic-utilities |
|
/AzurePipelines run Azure.sonic-utilities |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azpw run Azure.sonic-utilities |
|
/AzurePipelines run Azure.sonic-utilities |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Add flowcnt commands * counterpoll flowcnt-trap enable/disable * counterpoll flowcnt-trap interval * show flowcnt-trap stats
What I did
Add trap flow counter CLI support. See HLD: sonic-net/SONiC#858
How I did it
Add new command:
How to verify it
Unit test/Manual test
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)