-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Collect ICMP packet loss information (#14)
### Description of PR Summary: Fixes # (issue) This PR is to collect ICMP packet loss information. sign-off: Jing Zhang zhangjing@microsoft.com ### Type of change - [x] New feature ### Approach #### What is the motivation for this PR? When ICMP heartbeat loss happens, we want to know how long it lasts. We also want to collect the packet loss ratio information. #### How did you do it? * Post link prober state change events and time stamps to state db metrics, when get in or out link prober unknown state; * Post link prober pck loss ratio every 300 ms to state db. #### How did you verify/test it? Tested on dual testbed. Table entries created as expected: ``` $ redis-cli -n 6 127.0.0.1:6379[6]> KEYS *LINK_PROBE* 1) "LINK_PROBE_STATS|Ethernet48" 2) "LINK_PROBE_STATS|Ethernet84" ... ... ``` Before ICMP responder was turned on: ``` ~$ redis-cli -n 6 HGETALL "LINK_PROBE_STATS|Ethernet44" 1) "pck_loss_count" 2) "24" 3) "pck_expected_count" 4) "24" 5) "link_prober_unknown_start" 6) "2022-Jan-26 02:59:58.138248" ``` After running a link_failure test case, link_prober_unknown_start and link_prober_unknown_end are updated: ``` ~$ redis-cli -n 6 HGETALL "LINK_PROBE_STATS|Ethernet44" 1) "pck_loss_count" 2) "612" 3) "pck_expected_count" 4) "840" 5) "link_prober_unknown_start" 6) "2022-Jan-26 03:13:05.366900" 7) "link_prober_unknown_end" 8) "2022-Jan-26 03:17:35.446580" ``` After resetting the packet loss counts: ``` ~$ redis-cli -n 4 HSET "MUX_CABLE|Ethernet44" pck_loss_data_reset reset (integer) 0 ~$ redis-cli -n 6 HGETALL "LINK_PROBE_STATS|Ethernet44" 1) "pck_loss_count" 2) "0" 3) "pck_expected_count" 4) "0" 5) "link_prober_unknown_start" 6) "2022-Jan-26 03:13:05.366900" 7) "link_prober_unknown_end" 8) "2022-Jan-26 03:17:35.446580" ~$ redis-cli -n 6 HGETALL "LINK_PROBE_STATS|Ethernet44" 1) "pck_loss_count" 2) "0" 3) "pck_expected_count" 4) "6" 5) "link_prober_unknown_start" 6) "2022-Jan-26 03:13:05.366900" 7) "link_prober_unknown_end" 8) "2022-Jan-26 03:17:35.446580" ```
- Loading branch information
Showing
18 changed files
with
529 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.