- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: open files - lsof
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2003 11:21 AM
06-12-2003 11:21 AM
open files - lsof
Can anyone tell me how to compare the output of lsof to the nfile usage I see in Glance. I would like to try to tie together the two outputs to determine who/what is opening all of these files.
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2003 11:37 AM
06-12-2003 11:37 AM
Re: open files - lsof
'lsof' has no relation to 'nfile' since 'lsof' is not a systemwide metric and 'nfile' is kernel specific.
If you read the man page listed below most of 'lsof's usage is file system specific.
Here are some examples:
lsof -p pid
lsof -u uid
lsof -i tcp:80
lsof /file_system
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2003 11:38 AM
06-12-2003 11:38 AM
Re: open files - lsof
http://hpux.cict.fr/hppd/hpux/Sysadmin/lsof-4.64/man.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2003 02:09 PM
06-12-2003 02:09 PM
Re: open files - lsof
Glance will show all the files for a selected process but does not have the ability to sort processes by the number of open files.
Another limit to prevent runaway programs from using too many files is to set ulimit -n in /etc/profile (see man sh-posix) or reduce the value for maxfiles in the kernel. maxfiles can be overridden programatically with setrlimit but for casual programs, this is a way to reduce the max files opened per program (default is 60).
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2003 05:24 PM
06-12-2003 05:24 PM
Re: open files - lsof
lsof gives the output based on pid/Directory/File/Filesystem/Ip address. It doesnot give you system wide open file status.
The better way of checking usage on nfile is
#sar -v 3 3
the output look like the below. In that file-sz column represents 517 open files are there out of maximum 1899.
21:17:04 text-sz ov proc-sz ov inod-sz ov file-sz ov
21:17:07 N/A N/A 131/820 0 560/1088 0 517/1899 0
21:17:10 N/A N/A 131/820 0 560/1088 0 517/1899 0
21:17:13 N/A N/A 131/820 0 560/1088 0 517/1899 0
HTH