Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have some process running on my system. I need to list out which of the process at a moment has acquired/is using one or more of these in my system:

  1. Ethernet
  2. Camera
  3. USB
  4. Bluetooth
  5. WiFi
  6. File System

etc.

Is there a way to find this out ?

Platform : Ubuntu/Fedora (Allowed to have SELinux as well if required to implement the above)

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

You should use a combination of lsof (to find out which process opened which file or port) and strace (to attach to and follow a process's system calls). Use the man pages for each to find out how to use them in your case

share|improve this answer
    
Does it help? Or do you need more information? –  Olivier Dulac Dec 15 '12 at 11:12
    
Thanks Olivier that was helpful. –  Amit Tomar Dec 18 '12 at 12:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.