Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script to capture NFS error

Status
Not open for further replies.

terrywashington

Technical User
Jun 28, 2001
185
US
I need to write a script to help Sun determine why one of our E450 NFS servers periodically generates an NFS error. I am assuming that the the script will run from the crontab almost constanlty as the error message only appears as a single line, randomly about once a week. The error is below.

systema unix: WARNING: nfsauth: mountd not responding^M

The script will need to execute the below commands when the error message is generated.

#ps -ef | grep mountd

find the pid of mountd, then....

#pstack <pid of mountd> > pstack.out

#truss -o /tmp/truss.out -aelf -wall -rall -vall -p <pid of mountd>

I am very new to script-writing and am not sure of the best way to go about this. Would an if statement that greps for nfsauth, then running the other commands be the best way to go? Any suggestions would be greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top