Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > shell command 2 list open files?

shell command 2 list open files?
Thread Tools
Dedicated MacNNer
Join Date: Apr 2001
Location: The Moon
Status: Offline
Reply With Quote
Jun 1, 2004, 05:40 PM
 
Hi,

I recently bought a cube and I am very happy with its silentness - nevertheless I think there are to many hard drive accesses. I stopped already the "long" version of the Firewall log but still. I :wagly: remember that there was a shell command to list all the files which are "open" by the system. Can anybody enlighten my ?

Cheers
.- OS X aDDICTED -.
     
qyn
Dedicated MacNNer
Join Date: Dec 2000
Location: sj ca
Status: Offline
Reply With Quote
Jun 1, 2004, 06:37 PM
 
I think you're looking for the "lsof" command (/usr/sbin/lsof). Lists all open files and ports.

You might also be interested in the "fs_usage" command (/usr/bin/fs_usage, requires root), which lists file operations as they occur. Very handy during "questionable" installs (Office 2004, anyone?).
     
Dedicated MacNNer
Join Date: Apr 2001
Location: The Moon
Status: Offline
Reply With Quote
Jun 3, 2004, 05:20 PM
 
wow thanx !
.- OS X aDDICTED -.
     
Mac Elite
Join Date: Aug 2001
Location: Madison, WI
Status: Offline
Reply With Quote
Jun 4, 2004, 02:53 PM
 
I came here looking for the same sort of info, but either the results I'm looking for aren't provided by lsof and fs_usage, or I'm misinterpreting them. I just had an event where AFP went deaf on my Xserve, although nothing was written to the log. I used Server Settings to cycle it off/on, and while it came back, it claimed that every file that was open on the server when it went deaf was in use by someone. I had to shut it down and boot it back up to get it to reset.

Would there have been a more direct way to ask it "what files do you believe someone has open right now?", and to say "no, that file is not really in use. Take it off your list"?
OS X: Where software installation doesn't require wizards with shields.
     
   
Thread Tools
Forum Links
Forum 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
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 04:31 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2