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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Associating a nsrmmd thread with a device 1

Status
Not open for further replies.

vickey

MIS
Feb 18, 2002
6
US
Hello,

Does anyone know of a way to associate a nsrmmd thread to a specific tape device? I have 5 tape drives, one of which is used to back up database logs, while the other 4 devices are used to back up databases and file systems. The drive that I use to back up the database logs can potentially sit idle for several hours. When a database log backup is needed after a long period of inactivity, the nsrmmd thread hangs. I would like to write a shell script to kill the nsrmmd thread so that it would restart itself, but I want to make sure I kill the correct one.
 
Hi,
In order to determine which nsrmmd process is using the drive, there are several methods that can be used to obtain this information:

1- fuser Method: Enter the following command:

fuser device_name (Example: fuser /dev/rmt/0hbn)

You will receive output similar to the following:

/dev/rmt/0hbn: 1396

The output shows the PID of the nsrmmd process that is associated with the drive.

2-lsof Method: Enter the following command:

lsof device_name (Example: lsof /dev/rmt/0hbn)

You will receive output similar to the following:

nsrmmd 1396 root 11u VCHR 33,468 0xed60000 97625 /dev/rmt/../../devices/pci@1f,0/pci@1/scsi@1,1/st@5,0:hbn

The output shows the PID (in this case, 1396) of the nsrmmd process that is associated with the drive.

Now, you can run the kill command to kill the nsrmmd process. For example:

kill 1396

I hope this can help you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top