Skip to content

Modifications to README and smbclientlogs.sh#296

Open
meetakshi253 wants to merge 5 commits intomasterfrom
msetiya/smbclientlogs
Open

Modifications to README and smbclientlogs.sh#296
meetakshi253 wants to merge 5 commits intomasterfrom
msetiya/smbclientlogs

Conversation

@meetakshi253
Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread SMBDiagnostics/smbclientlogs.sh Outdated
Copy link
Copy Markdown
Collaborator

@bharathsm-ms bharathsm-ms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make python as mandatory only for 'OnAnamoly' mode

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request improves the SMBDiagnostics tooling by modernizing the shell script and enhancing the README documentation. The changes focus on better coding practices, improved command checking, and clearer user-facing documentation.

Changes:

  • Modernized command existence checks from which to command -v throughout the script
  • Improved README formatting with proper Markdown syntax and better structure
  • Enhanced error handling with return code checking for trace-cmd
  • Optimized Python detection to only check when OnAnomaly mode is used

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.

File Description
SMBDiagnostics/smbclientlogs.sh Refactored utility checking logic, improved error handling for trace-cmd, optimized Python detection for OnAnomaly mode, and improved code style consistency
SMBDiagnostics/README Converted to proper Markdown format with headers and code formatting, updated dependency documentation to mention package names instead of just command names

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread SMBDiagnostics/smbclientlogs.sh Outdated
Comment thread SMBDiagnostics/README Outdated
Comment thread SMBDiagnostics/README Outdated
Comment thread SMBDiagnostics/README Outdated
Comment thread SMBDiagnostics/smbclientlogs.sh
Comment thread SMBDiagnostics/README Outdated
Comment thread SMBDiagnostics/smbclientlogs.sh Outdated
Comment thread SMBDiagnostics/README Outdated
Copy link
Copy Markdown
Collaborator

@bharathsm-ms bharathsm-ms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@meetakshi253
Copy link
Copy Markdown
Collaborator Author

if (( ($(which apt |egrep -c apt) > 0) && ($(which zgrep |egrep -c zgrep) == 0) ));
then
echo "zgrep is not installed, please install zgrep"
if (command -v apt >/dev/null 2>&1) && (! command -v zgrep >/dev/null 2>&1); then
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to your change: Why do we have apt as a dependency? This would not work for non-debian distros, right?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a precondition for using zgrep.

init
start_trace $@
init "$@"
start_trace "$@"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is start_trace utilizing the args passed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, yes for VerboseLogs, but I found a bug. Let me submit another commit.

@meetakshi253 meetakshi253 force-pushed the msetiya/smbclientlogs branch from 0382f9d to 6a7632a Compare March 3, 2026 08:55
@meetakshi253 meetakshi253 force-pushed the msetiya/smbclientlogs branch from 6a7632a to f7e01f7 Compare March 3, 2026 08:59
@meetakshi253
Copy link
Copy Markdown
Collaborator Author

@microsoft-github-policy-service agree company="Microsoft"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants