Operating System - HP-UX
1833873 Members
1769 Online
110063 Solutions
New Discussion

Re: How to know which process has opened a specific file.

 
SOLVED
Go to solution
Philippe Martin
New Member

How to know which process has opened a specific file.


I do have a filetable full situation at certain points in time. I know I can reconfigure the system by changing nfile and recompiling the kernel. But I want to know what process does increase the entries of my filetable at some points in time. How can I know this ?

In nominal conditions the file table os far from full.
10:05:52 text-sz ov proc-sz ov inod-sz ov file-sz ov
10:05:53 N/A N/A 149/384 0 584/584 0 760/1093 0

4 REPLIES 4
Andy Monks
Honored Contributor
Solution

Re: How to know which process has opened a specific file.

There is some software called 'lsof' (list open files) which is available to do this.

http://hpux.cs.utah.edu/ftp/hpux/Sysadmin/lsof-4.48/

The version number changes a bit, but that's right today!

Andy
Carlos Fernandez Riera
Honored Contributor

Re: How to know which process has opened a specific file.


Hi:

fuser -cu /FILSYSTEM get a list of open files in filesystem and the pid and user that had opened.

BUT, i think your kernel has MAXUSER parameter too low. Increasing this parameter you will raise process, openfiles, and inode table.

10:05:52 text-sz ov proc-sz ov inod-sz ov file-sz ov
10:05:53 N/A N/A 149/384 0 584/584 0 760/1093 0

unsupported
Alan Riggs
Honored Contributor

Re: How to know which process has opened a specific file.

Carlos is correct that raising maxusers will raise the system process limit. The default is (8*maxusers + 20). You can also raise the limit directly by setting the nproc parameter.
rajsri
Frequent Advisor

Re: How to know which process has opened a specific file.

you also can see the open files from glance ---> select the process --> select open files .