- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- checking reference count of directory file open
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
02-03-2004 02:32 PM
02-03-2004 02:32 PM
checking reference count of directory file open
I have problem , how can you check , whether one directory is opened by anothere process in
HP-ux
answer expected early
see problem is
I have one directory file /tmp which is opened by one process, when second process tries to open the directory /tmp , it should not allow
How can i check whether directory is opened by other process
cheers
danysis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2004 03:00 PM
02-03-2004 03:00 PM
Re: checking reference count of directory file open
I think you're looking for the fuser command, i.e. :
# fuser -u /tmp
This will list the process ids - check the manpage for full details. There is also an opensource tool called lsof which is a lot more powerful - its available here :
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.70/
cheers,
James.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2004 03:10 PM
02-03-2004 03:10 PM
Re: checking reference count of directory file open
That should list down the processes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2004 03:35 PM
02-03-2004 03:35 PM
Re: checking reference count of directory file open
Thnx for mail
But i want system call which , normal user can use to check , how many instances of directory file is opened by a process
but for fuser commond , you should run as a root , i suppose
My problem is, i want to check whether a directory is opened by another process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2004 04:31 PM
02-03-2004 04:31 PM
Re: checking reference count of directory file open
What you could do is write a daemon process that could do the work (through pstat) and have the user's query this, while having it take care of the authentication. A bit of work but if needs must....
- James.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2004 06:25 PM
02-03-2004 06:25 PM
Re: checking reference count of directory file open
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2004 08:29 PM
02-04-2004 08:29 PM
Re: checking reference count of directory file open
Try this :
lsof +D /tmp
Best regards