LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-28-2004, 07:12 PM   #1
ravalox
Member
 
Registered: Mar 2003
Posts: 41

Rep: Reputation: 15
How do I see what processes are touching specific devices


I am trying to eject my CDROM and I can't because it claims the device is buys, is there a command I can run to see what process is touching the cdrom?
 
Old 02-28-2004, 08:35 PM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,983

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
Here's something that usually, but not always, works. It's a command called "fuser". Open a console and su to root. To see what is tying up your CD drive run:

# fuser -vm <insert mount point for cd drive>

For me that's:

# fuser -vm /mnt/cdrom

You will get a printout of the processes using the device with the PID number of each process. You can then kill the process by running:

# kill <insert PID>

There's even a shorter way though. If you run:

# fuser -km /mnt/cdrom

All processes accessing the cd drive will be killed. After killing the processes tying up the drive, be sure to unmount the drive in your console:

# umount /mnt/cdrom

You should then be able to get the cd out of the drive. For more info on fuser, see man fuser.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bind ETH devices to specific NIC/MAC not_an_expert Slackware 8 10-13-2004 11:00 AM
Debian and W95 - close but not touching! everest Debian 4 08-19-2004 05:16 PM
Why is my Microtouch m150 not responding to any touching Nightbird Linux - Hardware 1 05-27-2004 10:28 AM
Mounting specific hardware devices to specfic mount points tallguy999 Linux - Newbie 3 11-27-2003 02:07 PM
Kate (editor) is touching me up alex.e.c Linux - Software 0 09-05-2003 09:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration