1 |
On Fri, 18 Nov 2005 00:48:19 -0800 (PST) |
2 |
michael@×××××××××××××.com wrote: |
3 |
|
4 |
> That was it. Thanks! |
5 |
> M |
6 |
|
7 |
you could also try |
8 |
|
9 |
strace -eopen programname |
10 |
|
11 |
It will give a pretty verbose account of what files are opened by |
12 |
programname. (and of course devices, like everything else, are files) |
13 |
|
14 |
> |
15 |
> |
16 |
> On Fri, 18 Nov 2005, John Myers wrote: |
17 |
> |
18 |
> > On Thursday 17 November 2005 23:54, michael@×××××××××××××.com wrote: |
19 |
> >> I have a custom device driver in /dev/ that can only be used by one |
20 |
> >> program at a time. Since the device is /dev/ttyUSB0, I can see if anyone |
21 |
> >> is using it by: |
22 |
> >> |
23 |
> >> ls -l /proc/*/fd/* | grep ttyUSB0 |
24 |
> >> |
25 |
> >> Is there a utility or other better way I can discover which process, or |
26 |
> >> better, which program, is using a particular device? |
27 |
> >> |
28 |
> >> Thanks, |
29 |
> >> Michael |
30 |
> > try lsof |
31 |
> > |
32 |
> -- |
33 |
> gentoo-user@g.o mailing list |
34 |
> |
35 |
-- |
36 |
gentoo-user@g.o mailing list |