Operating System - HP-UX
1821189 Members
3452 Online
109631 Solutions
New Discussion юеВ

how to view the files that have been opened

 
zhj_1
Occasional Advisor

how to view the files that have been opened


use sar -v 1 5 find the nfile is very large. i want to view the files that have been opened at present.
can you tell me a command or a method?

thanks.
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor

Re: how to view the files that have been opened

Look for a utility called lsof (list open files); it's available from any of the HP-UX Porting Centre's. A quick search of the Forums for "lsof" will yield yield many results. Another, though less powerful and user tool is fuser. Man fuser for details.
If it ain't broke, I can fix that.
T G Manikandan
Honored Contributor

Re: how to view the files that have been opened

you can use lsof to get that

#lsof -u
#lsof -p pid

If you feel open files are too high you can restrict using the
ulimit -n option

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.70/

Con O'Kelly
Honored Contributor

Re: how to view the files that have been opened

Hi

You can use lsof.
You need to install as it doesn't come with HP-UX.
It can be downloaded form this site.
http://hpux.connect.org.uk/

# lsof

Shows all open files for specified filesystem.

Cheers
Con
T G Manikandan
Honored Contributor

Re: how to view the files that have been opened

T G Manikandan
Honored Contributor

Re: how to view the files that have been opened