LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 07-13-2009, 03:15 AM   #1
manoj.linux
Member
 
Registered: Aug 2007
Posts: 284

Rep: Reputation: 17
Question Process id


Hi,

is it possible to find out associate file on the basis of process id?

Regards,

Manoj
 
Old 07-13-2009, 03:21 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
ps ax | grep <process id> ?
 
Old 07-13-2009, 04:47 AM   #3
z-vet
Member
 
Registered: Aug 2004
Location: Israel
Distribution: LMDE 5
Posts: 271

Rep: Reputation: 34
Use 'lsof'?

Code:
lsof +p PID
Will return a list of all files opened by PID.
 
Old 07-13-2009, 04:47 AM   #4
karamarisan
Member
 
Registered: Jul 2009
Location: Illinois, US
Distribution: Fedora 11
Posts: 374

Rep: Reputation: 55
I'm not sure what an 'associate file' is, but if it's not just the pid, maybe lsof is what you want?

Edit: just beat me. : )
 
Old 07-14-2009, 05:45 AM   #5
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Code:
ls -l /proc/PID/fd
 
Old 07-14-2009, 09:02 PM   #6
viGeek
LQ Newbie
 
Registered: Jul 2009
Posts: 28

Rep: Reputation: 17
Use the fuser command, which reports PID/user on particular files that are in use.
 
  


Reply



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
Finding the Process ID of a Process While Initiating the Process senthilmuthiah Linux - Newbie 7 04-02-2009 10:37 AM
scheduler invocation, process selected, process entry and exit linuxdoniv Programming 1 03-14-2008 03:48 AM
child process usses same amount of ram as parent process socialjazz Programming 7 10-19-2006 05:48 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 04:20 PM.

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
Open Source Consulting | Domain Registration