- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- strange fuser output
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
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
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
тАО08-16-2006 08:46 AM
тАО08-16-2006 08:46 AM
strange fuser output
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2006 08:56 AM
тАО08-16-2006 08:56 AM
Re: strange fuser output
Most of the rest of the systems administration world is okay with nailing files of a certain age on /tmp
This check sounds like a nice idea, but the fuser output seems to need a sysadmins eyeballs for interpretation.
You test should work. When you vi a file there is definitely a file handle on it and fuser should show it.
Perhaps your system is short on resources, and that causes the delay.
Overall I think trying to user fuser is overengineering. Can you post some sample code?
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2006 09:01 AM
тАО08-16-2006 09:01 AM
Re: strange fuser output
I assume you're running a find command to locate these files & then piping to fuser.
Try the other direction, i.e. use a simple l command to find all files there. Then,using lsof instead of fuser, find all files *actually* open in that filesystem/dir & rm the ones that aren't.
You'd have to build a file or array of all files there (open or unopen) but it's much likelier that they will be "unopened" when the fuser hits. There's no way to guarantee that open files will still be open when the fuser executes.
Other option is to test for open *immediately* before fuser & a conditional that if the file is not open anymore, move on & don't exit. The nfile table is *very* dynamic & can't be "trusted" for more than a few milliseconds.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2006 09:22 AM
тАО08-16-2006 09:22 AM
Re: strange fuser output
Now, whack your script writers and developers with a baseball bat on account of ain't nobody but the OS supposed to be writing in /tmp; other temporary/scratch files should be written in /var/tmp unless overidden by the TMPDIR environment variable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2006 03:56 PM
тАО08-16-2006 03:56 PM
Re: strange fuser output
I disagree slightly with Clay. vi makes a copy of the file, and put the copy in /var/tmp (at least on my systems). You can easily test this by looking in /var/tmp
I have used a program for many years that examines (st_ctime). If a file has not changed for 12 hours the file gets deleted.
Depending on the system and applications, I have to exclude a few files. I also have to be careful with some directories like lost+found.
Rory