- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- lsof to find worst offender of open files
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
07-11-2007 06:13 AM
07-11-2007 06:13 AM
lsof to find worst offender of open files
Looking for help to find a combination of switches in lsof that would help ID the worst offender or any other ideas as well.
HPUX 11.11
Thanks to all !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2007 06:19 AM
07-11-2007 06:19 AM
Re: lsof to find worst offender of open files
What would you do with that output? Figure out who you can kill/delay until you change it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2007 06:26 AM
07-11-2007 06:26 AM
Re: lsof to find worst offender of open files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2007 07:09 AM
07-11-2007 07:09 AM
Re: lsof to find worst offender of open files
#!/usr/bin/sh
lsof | awk '{if (!($0 ~ /^COMMAND/)) {print $2, $1}}' | uniq -c | sort -rn
If my logic (and syntax) is correct this should print 1 line for each process listing the number of file descriptors, the PID, and the process name sorted in reverse order from the biggest file descriptor hog to the smallest.
I'm willing to bet that some of the biggest file descriptor hogs are also your most critical applications.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2007 07:16 AM
07-11-2007 07:16 AM
Re: lsof to find worst offender of open files
I pulled the lsof into excel then created a pivot table to count the occurances.
About the same as you suggested.
Using the output to compare agaist some other systems not having issue to see if I can find some really large differences.
This is a case of pulling down vx_ninode too far to save some memory has caused an issue. 8000 descriptors was enough initially but we have since grown. I am setting vx_ninode now to NFILE to cover the contingency.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2007 07:25 AM
07-11-2007 07:25 AM
Re: lsof to find worst offender of open files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2007 07:35 AM
07-11-2007 07:35 AM
Re: lsof to find worst offender of open files
Thanks for the tips..