HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- /var/statmon/sm directory
Operating System - HP-UX
1834665
Members
2356
Online
110069
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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-2002 03:48 PM
07-11-2002 03:48 PM
Hello,
I am trying to find out what /var/statmon directory and subdirs sm, sm.bak are related to. Anyone knows and can explain?
thanks,
/Marius
I am trying to find out what /var/statmon directory and subdirs sm, sm.bak are related to. Anyone knows and can explain?
thanks,
/Marius
hi
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 04:10 PM
07-11-2002 04:10 PM
Solution
In a nutshell this directory is used by NFS file locking mechanism particularly rpc.lockd and rpc.statd daemons between the NFS server and clients. In order to understand it fully, you got to understand how the network lock manager works. These sequences of events happening when a NFS client opens a NFS mounted file highlights how /var/statmon is used for this purpose (take note steps 3,8 & 17)
1- Application on client requests a lock on an NFS mounted file & contacts local kernel.
2- Kernel forwards request to local lockd.
3- Client lockd contacts local statd that it's going to perform NFS file locking and statd should add this client to the list of systems it monitors. Statd does this by creating a file in /var/statmon/sm directory.
4- Statd replies to lockd that it has added the client to its list of monitored systems.
5- Client lockd contacts server's portmap "which port number is your lockd running on?"
6- Server portmap replies with the port number.
7- Client lockd sends lock REQUEST to server lockd.
8- Server lockd contacts local statd that client system is going to perform NFS file locking with this server. The server statd add NFS client to /var/statmon/sm.
9 - Server statd replies to server lockd "step 8 done!"
10- Server lockd forward lock request to kernel.
11- Server kernel performs lock request and replies to lockd with the status.
12- Server lockd contacts client portmap "which port number is your lockd running on?"
13- Client portmap replies with the port number.
14- Server lockd sends the lock RESULT back to client lockd.
15- Client lockd forwards result back to kernel.
16- Client kernel forwards result back to requesting application.
17- When NFS server rebooted (or rpc.lockd/statd killed & restarted) the statd daemon will go through a recovery process to try rebuild the queue of locks the server was managing. The recovery process will do this :-
a) Server statd moves all files in /var/statmon/sm into /var/statmon/sm.bak
b) One at a time server statd will attempt to contact client statd whose hostname matches the name of the file in /var/statmon/sm.bak
c) If successful, the file is removed from /var/statmon/sm.bak
d) Statd on client will contact its local lockd and explain that the server crashes and the client must reclaim any locks it had with that server prior to the crash.
1- Application on client requests a lock on an NFS mounted file & contacts local kernel.
2- Kernel forwards request to local lockd.
3- Client lockd contacts local statd that it's going to perform NFS file locking and statd should add this client to the list of systems it monitors. Statd does this by creating a file in /var/statmon/sm directory.
4- Statd replies to lockd that it has added the client to its list of monitored systems.
5- Client lockd contacts server's portmap "which port number is your lockd running on?"
6- Server portmap replies with the port number.
7- Client lockd sends lock REQUEST to server lockd.
8- Server lockd contacts local statd that client system is going to perform NFS file locking with this server. The server statd add NFS client to /var/statmon/sm.
9 - Server statd replies to server lockd "step 8 done!"
10- Server lockd forward lock request to kernel.
11- Server kernel performs lock request and replies to lockd with the status.
12- Server lockd contacts client portmap "which port number is your lockd running on?"
13- Client portmap replies with the port number.
14- Server lockd sends the lock RESULT back to client lockd.
15- Client lockd forwards result back to kernel.
16- Client kernel forwards result back to requesting application.
17- When NFS server rebooted (or rpc.lockd/statd killed & restarted) the statd daemon will go through a recovery process to try rebuild the queue of locks the server was managing. The recovery process will do this :-
a) Server statd moves all files in /var/statmon/sm into /var/statmon/sm.bak
b) One at a time server statd will attempt to contact client statd whose hostname matches the name of the file in /var/statmon/sm.bak
c) If successful, the file is removed from /var/statmon/sm.bak
d) Statd on client will contact its local lockd and explain that the server crashes and the client must reclaim any locks it had with that server prior to the crash.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 04:29 PM
07-11-2002 04:29 PM
Re: /var/statmon/sm directory
Thanks a lot. 10 points.
/Marius
/Marius
hi
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP