-
Notifications
You must be signed in to change notification settings - Fork 666
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
[show][interfaces] Add proposal for show interfaces flap #3627
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Vaibhav Dahiya <vdahiya@microsoft.com>
Signed-off-by: Vaibhav Dahiya <vdahiya@microsoft.com>
Signed-off-by: Vaibhav Dahiya <vdahiya@microsoft.com>
- Example: | ||
``` | ||
admin@sonic:~$ show interfaces flap | ||
Interface Last Link Down Flap Count |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we show interface current admin and oper status in an additional column?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will add
- Example: | ||
``` | ||
admin@sonic:~$ show interfaces flap | ||
Interface Last Link Down Flap Count |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will last link down time stamp be a bit ambiguous? since we don't know when is the counter be calculated without start point, and down time will not show gap between down to up.
Below is some sample from Junos cli maybe referenced:
Physical interface: ge-0/0/1, Enabled, Physical link is Up
Interface index: 137, SNMP ifIndex: 515
...
Link-level type: Ethernet, MTU: 1514, Speed: 1000mbps, Loopback: Disabled,
...
Last flapped : 2022-10-01 10:00:00 UTC (00:01:23 ago)
Statistics last cleared: Never
Traffic statistics:
Input bytes : 1234567890
Output bytes : 9876543210
Input packets: 12345
Output packets: 54321
...
Input errors: 0, Output errors: 0, Input drops: 0, Output drops: 0
...
Protocol eth-switch, MTU: 1514
Flags: None
...
Link is Up
Interface has been up 5 days, 2 hours, 30 minutes, 15 seconds
...
Last flap event: None
Flap statistics:
Since 2022-09-01 00:00:00 UTC
Link flaps: 2
Up transitions: 3
Down transitions: 2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vdahiya12 can you check if we can show the number of up and down events separately? if not we can take that has next enhancement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vdahiya12 can
- Link down timestamp as "Last flapped : 2024-10-01 10:00:00 UTC (0 days 00:01:23 ago)
- Link up timestamp as "Last Link up: 2024-10-05 10:01:03 UTC (5 days 02:30 :15 ago)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vdahiya12 you can specify the column for timestamp (UTC).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not understand the logic here, do we want one or two columns? If we say just one column then how will both last flap and last link up be supported.
Also if we support both, the first time switch boots up and the link never comes up, then last link down should be boot time ? and last link up be never ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this what is expected ?
admin@sonic:~$ show interfaces flap
Interface Link Down TimeStamp (UTC) Link Up TimeStamp (UTC) Flap Count
--------- ------------------------------------------------------- ----------------------------------------------------------- ----------
Ethernet0 Last flapped : 2024-10-01 10:00:00 (0 days 00:01:23 ago) Last Link up: 2024-09-30 10:01:03 UTC (1 days 02:30 :15 ago) 5
Ethernet4 Never Last Link up: 2024-09-30 10:01:03 UTC (1 days 02:30 :15 ago) Never
Ethernet8 Last flapped : 2024-10-01 10:01:00 (0 days 00:00:23 ago) Last Link up: 2024-10-02 10:01:03 UTC (5 days 02:30 :15 ago) 1
@vdahiya12 If the link down count = 0 or the link up count = 0 then the timestamp should show "never". can you capture these? |
--------- ------------------- ---------- | ||
Ethernet0 2024-11-21 14:32:12 5 | ||
Ethernet4 2024-11-20 08:15:04 2 | ||
Ethernet8 2024-11-19 23:45:16 8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vdahiya12 show one example where link never flapped
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vdahiya12 can you address comments please
The show interfaces flap command provides detailed insights into interface events, including the timestamp of the last link down event and the total flap count (number of times the link has gone up and down). This helps in diagnosing stability and connectivity issues.
What I did
How I did it
How to verify it
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)