Solved

Question on output from lsof

Posted on 1997-07-20
5
723 Views
Last Modified: 2013-12-06
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
0
Comment
Question by:mcclure
  • 2
  • 2
5 Comments
 

Expert Comment

by:vkg063097
ID: 2006577
I dono much about lsof and glace. Are they part of HpUX ?

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

0
 

Author Comment

by:mcclure
ID: 2006578
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.
0
 

Accepted Solution

by:
sdwix earned 200 total points
ID: 2006579
Have you looked at monitor?  It's in usr/contrib/bin.  The other option is to browse the HP software site at Liverpool.  Search the interworks site for the URL
0
 

Author Comment

by:mcclure
ID: 2006580
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
0
 

Expert Comment

by:sdwix
ID: 2006581
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
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now