Re: [gentoo-user] how to find if a program is using a particular /dev device?

2005-11-19 Thread michael

Excellent. That's very helpful as well.

Michael


On Sat, 19 Nov 2005, Nick Rout wrote:


On Fri, 18 Nov 2005 00:48:19 -0800 (PST)
[EMAIL PROTECTED] wrote:


That was it. Thanks!
M


you could also try

strace -eopen programname

It will give a pretty verbose account of what files are opened by
programname. (and of course devices, like everything else, are files)




On Fri, 18 Nov 2005, John Myers wrote:


On Thursday 17 November 2005 23:54, [EMAIL PROTECTED] wrote:

I have a custom device driver in /dev/ that can only be used by one
program at a time. Since the device is /dev/ttyUSB0, I can see if anyone
is using it by:

ls -l /proc/*/fd/* | grep ttyUSB0

Is there a utility or other better way I can discover which process, or
better, which program, is using a particular device?

Thanks,
Michael

try lsof


--
gentoo-user@gentoo.org mailing list


--
gentoo-user@gentoo.org mailing list



--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] how to find if a program is using a particular /dev device?

2005-11-18 Thread John Myers
On Thursday 17 November 2005 23:54, [EMAIL PROTECTED] wrote:
 I have a custom device driver in /dev/ that can only be used by one
 program at a time. Since the device is /dev/ttyUSB0, I can see if anyone
 is using it by:

   ls -l /proc/*/fd/* | grep ttyUSB0

 Is there a utility or other better way I can discover which process, or
 better, which program, is using a particular device?

 Thanks,
 Michael
try lsof


pgp77FskRrYfa.pgp
Description: PGP signature


Re: [gentoo-user] how to find if a program is using a particular /dev device?

2005-11-18 Thread michael

That was it. Thanks!
M


On Fri, 18 Nov 2005, John Myers wrote:


On Thursday 17 November 2005 23:54, [EMAIL PROTECTED] wrote:

I have a custom device driver in /dev/ that can only be used by one
program at a time. Since the device is /dev/ttyUSB0, I can see if anyone
is using it by:

ls -l /proc/*/fd/* | grep ttyUSB0

Is there a utility or other better way I can discover which process, or
better, which program, is using a particular device?

Thanks,
Michael

try lsof


--
gentoo-user@gentoo.org mailing list