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 1Ed1An-0004iD-Cz for garchives@archives.gentoo.org; Fri, 18 Nov 2005 08:00:41 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.5/8.13.5) with SMTP id jAI7xVMD026699; Fri, 18 Nov 2005 07:59:31 GMT Received: from mail.magrittesystems.com (adsl-64-173-154-114.dsl.snfc21.pacbell.net [64.173.154.114]) by robin.gentoo.org (8.13.5/8.13.5) with ESMTP id jAI7tp17003189 for ; Fri, 18 Nov 2005 07:55:52 GMT Received: by mail.magrittesystems.com (Postfix, from userid 1000) id D0B493C0078; Thu, 17 Nov 2005 23:54:57 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mail.magrittesystems.com (Postfix) with ESMTP id BC6593C0077 for ; Thu, 17 Nov 2005 23:54:57 -0800 (PST) Date: Thu, 17 Nov 2005 23:54:57 -0800 (PST) From: michael@michaelshiloh.com X-X-Sender: michael@mail.magrittesystems.com To: gentoo-user@lists.gentoo.org Subject: [gentoo-user] how to find if a program is using a particular /dev device? Message-ID: 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: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Archives-Salt: 355cb6db-9c64-4f50-b40e-ece3522dbc34 X-Archives-Hash: 574741597d7b4532fda4cd8aa620fa4f 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 -- gentoo-user@gentoo.org mailing list