DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 31st August 2011
jsmith6134 jsmith6134 is offline
Port Guard
 
Join Date: May 2009
Posts: 10
Thanked 0 Times in 0 Posts
Default list open files - fstat?

I am trying to find the list of open files for a process. I did a search and found:

http://lserinol.blogspot.com/2009/01...n-freebsd.html

I figure that I should be able to use fstat. However, it does not display the file's name. According to the name page there should be a 'NAME' column. From the man page:

...
The following fields are printed:
...
NAME If filename arguments are specified and the -f flag is not, then
this field is present and is the name associated with the given
file. Normally the name cannot be determined since there is no
mapping from an open file back to the directory entry that was
used to open that file. Also, since different directory entries
may reference the same file (via ln(1)), the name printed may not
be the actual name that the process originally used to open that
file.
...

Not sure how to get it to display any file names. I tried using "-f" and a mount point or directory, but does not make a difference; no name column is displayed. I also tried as root, to ensure that there is no permission problem.

I also used the search for the forums here, but nothing came up. Am I misreading the man page?
Reply With Quote
 

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
List of 4.7 packages? guitarscn OpenBSD Packages and Ports 5 23rd August 2010 05:37 PM
Can't open PDF files, FBSD 7.2-release Mantazz FreeBSD Ports and Packages 7 24th December 2009 01:10 PM
How to get a list of volumes? PeterSteele Programming 12 17th July 2008 09:32 AM
How to view & open DOCX files in Ubuntu/OpenOffice. unixdude Other BSD and UNIX/UNIX-like 0 11th July 2008 08:38 AM
fstat | grep internet | grep -v -e '>' -e '<' mfaridi OpenBSD General 4 10th June 2008 09:58 PM


All times are GMT. The time now is 02:24 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick