From: michael@michaelshiloh.com
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] how to find if a program is using a particular /dev device?
Date: Sat, 19 Nov 2005 13:03:22 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.64.0511191302550.27102@mail.magrittesystems.com> (raw)
In-Reply-To: <20051119103202.580d8ce5.nick@rout.co.nz>
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)
> michael@michaelshiloh.com 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, michael@michaelshiloh.com 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
prev parent reply other threads:[~2005-11-19 21:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-18 7:54 [gentoo-user] how to find if a program is using a particular /dev device? michael
2005-11-18 8:19 ` John Myers
2005-11-18 8:48 ` michael
2005-11-18 21:32 ` Nick Rout
2005-11-19 21:03 ` michael [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0511191302550.27102@mail.magrittesystems.com \
--to=michael@michaelshiloh.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox