Monitor oplock status

Contributors

You can monitor and display information about oplock status. You can use this information to determine which files have oplocks, what the oplock level and oplock state level are, and whether oplock leasing is used. You can also determine information about locks that you might need to break manually.

About this task

You can display information about all oplocks in summary form or in a detailed list form. You can also use optional parameters to display information about a smaller subset of existing locks. For example, you can specify that the output return only locks with the specified client IP address or with the specified path.

You can display the following information about traditional and lease oplocks:

  • SVM, node, volume, and LIF on which the oplock is established

  • Lock UUID

  • IP address of the client with the oplock

  • Path at which the oplock is established

  • Lock protocol (SMB) and type (oplock)

  • Lock state

  • Oplock level

  • Connection state and SMB expiration time

  • Open Group ID if a lease oplock is granted

See the vserver oplocks show man page for a detailed description of each parameter.

Steps
  1. Display oplock status by using the vserver locks show command.

Examples

The following command displays default information about all locks. The oplock on the displayed file is granted with a read-batch oplock level:

cluster1::> vserver locks show

Vserver: vs0
Volume   Object Path        LIF         Protocol  Lock Type   Client
-------- ------------------ ----------- --------- ----------- ----------
vol1     /vol1/notes.txt    node1_data1
                                        cifs      share-level 192.168.1.5
         Sharelock Mode: read_write-deny_delete
                                                  op-lock     192.168.1.5
         Oplock Level: read-batch

The following example displays more detailed information about the lock on a file with the path /data2/data2_2/intro.pptx. A lease oplock is granted on the file with a batch oplock level to a client with an IP address of 10.3.1.3:

Note

When displaying detailed information, the command provides separate output for oplock and sharelock information. This example only shows the output from the oplock section.

cluster1::> vserver lock show -instance -path /data2/data2_2/intro.pptx

                   Vserver: vs1
                    Volume: data2_2
         Logical Interface: lif2
               Object Path: /data2/data2_2/intro.pptx
                 Lock UUID: ff1cbf29-bfef-4d91-ae06-062bf69212c3
             Lock Protocol: cifs
                 Lock Type: op-lock
   Node Holding Lock State: node3
                Lock State: granted
  Bytelock Starting Offset: -
    Number of Bytes Locked: -
     Bytelock is Mandatory: -
     Bytelock is Exclusive: -
     Bytelock is Superlock: -
          Bytelock is Soft: -
              Oplock Level: batch
   Shared Lock Access Mode: -
       Shared Lock is Soft: -
           Delegation Type: -
            Client Address: 10.3.1.3
             SMB Open Type: -
         SMB Connect State: connected
SMB Expiration Time (Secs): -
         SMB Open Group ID: 78a90c59d45ae211998100059a3c7a00a007f70da0f8ffffcd445b0300000000

Related information