Skip to content

DLPX-75405 nfs_threads script should flush output and include timestamps #62

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

Merged
merged 1 commit into from
May 14, 2021

Conversation

don-brady
Copy link
Contributor

Problem:

The /usr/bin/nfs_threads script on the Delphix engine does not currently flush its output so redirecting it to a file results in an empty file. It is useful for Support to be able to capture this output when troubleshooting NFS issues.

To be able to match up the output with other estat data, it would also be useful to have it include timestamps on each line.

Solution:

The following improvements were added to nfs_threads script

  • Added timestamp to output
  • Print header every 48 lines of output
  • Added flush to print lines
  • Accommodate an NFS server restart while script is running
  • Added optional --interval argument to supply sampling interval
  • Fixed threads used calculation (was sometimes going negative)
  • Fixed underflow in sockets-enqueued

Testing

ab-pre-push:
http://selfservice.jenkins.delphix.com/job/devops-gate/job/master/job/appliance-build-orchestrator-pre-push/5276/

Manually tested on dcol1
Manually tested to confirm that flush works (can now tail output from nohup output file)

@don-brady don-brady requested review from sebroy, tonynguien and pzakha May 13, 2021 21:55
Copy link

@tonynguien tonynguien left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for adding the timestamp :)

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

Successfully merging this pull request may close these issues.

4 participants