ncpopen.sh - Bash Menu driven utility to deal with open file problems on OES servers.

0 Likes
Have you ever had troubles tracking down who has an open file on an OES server? Here's a simple menu driven solution which can help you track down and fix open file problems.

ncpopen.sh utility

Overview:

Bash Menu driven utility to deal with open file problems on OES servers.

Symptom:

Have you ever had troubles tracking down who has an open file on an OES server? Here's a simple menu driven solution which can help you track down and fix open file problems.

Details:


  • This utility allows you to search all mounted NCP volumes for a specific file or partial name.

  • Display open files by "username"

  • Display all open files on a mounted NCP Volume.

  • Clear all "Not logged in" NLI connections.

  • Search for open files using Linux "lsof" commands.



Install:


  • Copy this ncpopen.sh script to the server and make it executable. I like to copy it to the /root/bin/ directory so when I login as root the utility is available to me no matter what my current working directory is.

  • Once copied to server make sure to change permissions. "chmod 755 ncpopen.sh"

  • Depending on the desired behavior, you may modify the global controls. By default we will prompt to close open files which it finds from the menu driven search results.



USAGE:

## GLOBAL CONTROLS ##
SHOWSTATS=1 ## Whether to show NCP Statistics before Menu. Option: 0=Disable 1=Enable
MOFL=200 ## Maximum Open File List per connection.
CLOSE=1 ## Prompt to Close Open files. Option: 0=Disable 1=Enable


<< MENU for ncpopen.sh >>

1) Search for open files via Filename
2) Open files by Username
3) Display all open files on a Volume
4) Clear all Not Logged in NLI connections
5) Search for open files using Linux lsof
0) Exit

Labels:

Collateral
How To-Best Practice
Comment List
Anonymous
Related Discussions
Recommended