mcclure
asked on
Question on output from lsof
I am currently trying to track down which processes have which files open.
I am using a HP-UX 9 box - and the only program I can find to help me easily to do this is with "lsof" - but the output from this program says that there are several thousdand files open, but this cannot be as the NFILE kernel parameter is set to 2000 (so no more than 2000 files open at once).
I am also using glance, which tells me that there are only 1750 files open.
I am either looking for a way to tell me the info I want easily, or how to interpret the lsof output so that I can tell which are really open files and which aren't
thanks
I am using a HP-UX 9 box - and the only program I can find to help me easily to do this is with "lsof" - but the output from this program says that there are several thousdand files open, but this cannot be as the NFILE kernel parameter is set to 2000 (so no more than 2000 files open at once).
I am also using glance, which tells me that there are only 1750 files open.
I am either looking for a way to tell me the info I want easily, or how to interpret the lsof output so that I can tell which are really open files and which aren't
thanks
ASKER
We originally thought of using fuser, but it works the wrong way around, we would have to poll _every_ file on the system, and then process the output into what we want.
As far as I am aware glance is a HPUX performance tool, but I am sure that lsof exists on many different platforms.
As far as I am aware glance is a HPUX performance tool, but I am sure that lsof exists on many different platforms.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Can I have a bit mroe of a hint as to where to find this product, as the name is so generic ther is no way a net search will reveal it to me (I've tried anyway) and I cannot find this "HP software site at Liverpool"
(The URL of that would be a good start, thanks)
Mike
(The URL of that would be a good start, thanks)
Mike
Two URLs to check out are
1) The HP Interworks site: http://interworks.org
2) The HP software archive at Liverpool:
http://hpux.csc.liv.ac.uk
There are US mirror sites to the Liverpool site.
The monitor tool should be on your machine in /usr/contrib/bin.
Use the find command to locate the file.
find /usr -name "monitor*" -print
Regards
SDW
1) The HP Interworks site: http://interworks.org
2) The HP software archive at Liverpool:
http://hpux.csc.liv.ac.uk
There are US mirror sites to the Liverpool site.
The monitor tool should be on your machine in /usr/contrib/bin.
Use the find command to locate the file.
find /usr -name "monitor*" -print
Regards
SDW
anyway it may be worth investigating fuser command.
fuser -u -c / will give you all the PID and user name
who are using files in / file system.
If you want to list all the open files then you may have to
write one script for this using fuser command.
vinay