Skip to content
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

[Mellanox] Improve the prompt of the Mellanox sdk sniffer command. #546

Merged
merged 4 commits into from
Jul 15, 2019

Conversation

stephenxs
Copy link
Collaborator

@stephenxs stephenxs commented May 30, 2019

- What I did
Prompt the risk of excessive consumption of disk space when user intends to turn on the sdk sniffer.
The SDK sniffer is a diagnosis feature, introduced with a view to recording all the operations to SDK into the sniffer file which the low-level team can replay and investigate. Only the sniffer file contains all the operations from SWSS restart does it help. To handle it in a way like log-rotate to limit its size can hurt its integrity since the operating records can be lost during rotating and to address this requires a big effort.
So we just add a prompt of that risk for now.

- Previous command output (if the output of a command-line utility has changed)

admin@arc-mtbc-1001:~$ sudo config platform mlnx sniffer sdk enable
To change SDK sniffer status, swss service will be restarted, continue? [y/N]: y
Enabling SDK sniffer
Enabled SDK sniffer, recording file is /var/log/mellanox/sniffer/sx_sdk_sniffer_20190530012428.pcap
admin@arc-mtbc-1001:~$ sudo config platform mlnx sniffer sdk disable
To change SDK sniffer status, swss service will be restarted, continue? [y/N]: y
Disabling SDK sniffer
Disabled SDK sniffer

- New command output (if the output of a command-line utility has changed)

admin@mtbc-sonic-01-2410:~$ sudo config platform mlnx sniffer sdk enable 
Swss service will be restarted, continue? [y/N]: y
Enabling SDK sniffer
SDK sniffer is Enabled, recording file is /var/log/mellanox/sniffer/sx_sdk_sniffer_20190601091204.pcap.
Note: the sniffer file may exhaust the space on /var/log, please disable it when you are done with this sniffering.
admin@mtbc-sonic-01-2410:~$ sudo config platform mlnx sniffer sdk disable 
Swss service will be restarted, continue? [y/N]: y
Disabling SDK sniffer
SDK sniffer is Disabled.

Signed-off-by: Stephen Sun stephens@mellanox.com

Prompt the risk of excessive consumption of disk space when user intends to turn on the sdk sniffer.
The SDK sniffer is a diagnosis feature, introduced with a view to recording the all the operations to SDK into the sniffer file which the low level team can replay and investigate. Only the sniffer file contains all the operations from SWSS restart does it help. To handle it in a way like log-rotate can hurt its integrity since the operations can be lost during rotating and to address this requires big effort.
So we just add a promot of that risk for now.
@msftclas
Copy link

msftclas commented May 30, 2019

CLA assistant check
All CLA requirements met.

@stephenxs
Copy link
Collaborator Author

please help to redo vstest.

@keboliu
Copy link
Collaborator

keboliu commented May 31, 2019

retest this please

adjust prompt in order to make it more clear.
@stephenxs
Copy link
Collaborator Author

re-vstest, please.

@liat-grozovik
Copy link
Collaborator

retest this please

4 similar comments
@stcheng
Copy link
Contributor

stcheng commented Jun 4, 2019

retest this please

@stephenxs
Copy link
Collaborator Author

retest this please

@stcheng
Copy link
Contributor

stcheng commented Jun 6, 2019

retest this please

@stephenxs
Copy link
Collaborator Author

retest this please

@liat-grozovik
Copy link
Collaborator

retest this please

2 similar comments
@keboliu
Copy link
Collaborator

keboliu commented Jun 25, 2019

retest this please

@liat-grozovik
Copy link
Collaborator

retest this please

@liat-grozovik
Copy link
Collaborator

retest this please

Stephen Sun added 2 commits July 2, 2019 09:42
adjust prompt in order to make it more clear.
(recommit this in order to trigger vstest of the sonic-utilities and check whether it can pass)
@liat-grozovik liat-grozovik merged commit 2764c6c into sonic-net:master Jul 15, 2019
@stephenxs stephenxs deleted the warn-when-sdk-sniffer branch March 23, 2020 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants