Network and Storage Protocols

Retrieving lock status in cDOT (CIFS/NFSv4)

KecajN
3,127 Views

We implemented simple file lock monitoring on our 7mode filers: A script runs each 5 minut retrieving output from lock status -n command from all vfilers. For example:

 

# ssh [...] vfiler run sngnas100703 lock status -n

CIFS: 0 share locks, 0 byte locks

[...]

NFSV4: 29 share locks, 5 byte locks

[...]

Total Locks: 29 share locks, 5 byte locks

[...]

 

We would like to implement equivalent solution for cDOT but there is no command returning lock status summary (all we need is to count share and byte locks per protocol: CIFS and NFSv4). cDOT documentation and NetApp support suggest using command:

 

vserver locks show

 

But:

  • Command warns that it may affect system performance and we will query clusters each couple of minutes.
  • The script will have to retrieve huge output, parse it and calculate required totals.

 

What is the best and non-intrusive way to retrieve locks status? (other commands? API?)

2 REPLIES 2

J_curl
2,937 Views

I am curious what the use case is for this.  What is the value this data?  Not saying there isn't any.

 

You could use powershell toolkit:

 

 

$query = get-nclock -Template
$query.Protocol = "cifs"
$query.Vserver = "dr1-dr-nas03"
$cifs_locks = get-nclock -Query $query

$cifs_locks.count

 

 

KecajN
2,919 Views

I am not working in operations team so I can tell you only highlevel reason: We implemented such monitoring in one of regions for 7-mode systems and it proved to be good pro-active tool. After recent outage caused by excessive locks we are implementing it in remaining regions.

 

At the same time we are looking if it is possible to implement equivalent solution for cDOT systems. Although we have not encountered such issues yet, we believe that it may be possible as outages are caused by misbehaved clients.

Public