[XRT-SMI] Context health update to move to Option Options #9525
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem solved by the commit
This PR updates the context health feature within xrt-smi to function as a standalone option rather than a separate report.
Also fixes sudo requirements for xrt-smi features that need to be run in sudo mode
Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered
https://jira.xilinx.com/browse/AIESW-21258
How problem was solved, alternative solutions (if any) and why they were rejected
The problem was solved via creating a new Option option --context-health (similar to firmware-log and event-trace). Since context health itself has some sub options, the help printing is now much simpler and convenient for the end user. This is more inlined with other xrt-smi options since now there is no requirement for manually parsing the "ctx-id" and "pid" string and the flow is aligned with other fearures.
Risks (if any) associated the changes in the commit
None
What has been tested and how, request additional testing if necessary
Tested on linux :
Documentation impact (if any)
None