1833753 Members
2241 Online
110063 Solutions
New Discussion

List or count open files

 
SOLVED
Go to solution
Ed Hon
Regular Advisor

List or count open files

How do I list or at least count the files a process has open?
2 REPLIES 2
John Poff
Honored Contributor
Solution

Re: List or count open files

Hi,

You can see them with Glance, or you can use a tool like 'lsof', which you can find here:

http://gatekeep.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.70/

or here:



JP
D Block 2
Respected Contributor

Re: List or count open files

to confirm, LSOF (LiSt Open Files) is a great tool to have. Keep in mind, that a process-id might have many threads open to a file. LSOF shows all the files open per process, but also a file can be shared-open.

so to make a point. if you compare the open files on the system network:

netstat -an

and compared to

lsof

then lsof may show you more open files.

Golf is a Good Walk Spoiled, Mark Twain.