Solved

Question on output from lsof

Posted on 1997-07-20
5
719 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

760 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

21 Experts available now in Live!

Get 1:1 Help Now