Skip to content

Conversation

don-brady
Copy link

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