LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-22-2009, 07:16 AM   #1
linux_newbie79
Member
 
Registered: Apr 2009
Posts: 36

Rep: Reputation: 15
detect process attached to devices


Hi All,

How to find the process's that were attached to devices. For example, if we open ttyS driver from user space application, is it possible to get the process id by examining the /proc of the devices? If yes, how?

Thanks in Advance
 
Old 06-22-2009, 07:56 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,516

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
You can use lsof to find the PID of the process that uses the serial port:
Code:
lsof|grep ttyS
Then under /proc/<PID> you'll find more details about that process.

Regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How th chack teh raid type and attached devices procfs Linux - Hardware 2 08-09-2006 11:44 PM
Xorg can't detect any devices worldgnat Linux - Software 2 06-20-2006 06:06 PM
DHCPD attached devices jspsandhu Linux - Networking 1 06-22-2005 09:26 PM
Can't detect usb devices?? CM019 Debian 5 06-09-2005 02:43 PM
Listing attached devices ITJedi Linux - Hardware 3 09-25-2003 07:15 PM


All times are GMT -5. The time now is 06:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration