From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.50) id 1Ed1XN-0006YY-M7 for garchives@archives.gentoo.org; Fri, 18 Nov 2005 08:24:02 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.5/8.13.5) with SMTP id jAI8Ma3L013440; Fri, 18 Nov 2005 08:22:36 GMT Received: from smtpauth01.mail.atl.earthlink.net (smtpauth01.mail.atl.earthlink.net [209.86.89.61]) by robin.gentoo.org (8.13.5/8.13.5) with ESMTP id jAI8EJh2017368 for ; Fri, 18 Nov 2005 08:14:19 GMT Received: from [64.166.166.172] (helo=sarge.electronerdia.net) by smtpauth01.mail.atl.earthlink.net with asmtp (Exim 4.34) id 1Ed1Ny-0006LQ-Vg for gentoo-user@lists.gentoo.org; Fri, 18 Nov 2005 03:14:19 -0500 Received: from sheila.electronerdia.net (sheila.electronerdia.net [192.168.1.32]) by sarge.electronerdia.net (Postfix) with ESMTP id 96691FF8C0 for ; Fri, 18 Nov 2005 00:16:38 -0800 (PST) From: John Myers To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] how to find if a program is using a particular /dev device? Date: Fri, 18 Nov 2005 00:19:30 -0800 User-Agent: KMail/1.8.3 References: In-Reply-To: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart18572441.OunOtpARGO"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200511180019.36886.electronerd@electronerdia.net> X-ELNK-Trace: 8839a2c17b2169aa1aa676d7e74259b7b3291a7d08dfec79245641081e65cdb046ede651b7a20ba3350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 64.166.166.172 X-Archives-Salt: aac8fb45-722d-4c5e-8c4d-ea598d870ef7 X-Archives-Hash: 16ab78ae784cafbffde26372b513fe84 --nextPart18572441.OunOtpARGO Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 --nextPart18572441.OunOtpARGO Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2-ecc0.1.6 (GNU/Linux) iD8DBQBDfY6Y61oU2vmzgqgRAlANAKCBLqCt1U4dZ/CdSB40c2rh5yLpEgCggXcA L64I6jqwRlpYPBYdUsKtLBs= =mC1Y -----END PGP SIGNATURE----- --nextPart18572441.OunOtpARGO-- -- gentoo-user@gentoo.org mailing list