# nfs.get_nfs4_clients

Read information about NFSv4 clients from /proc/fs/nfsd/clients.

Sample output:

    [{
        "id": "4",
        "info": {
            "clientid": 6273260596088110000,
            "address": "192.168.40.247:790",
            "status": "confirmed",
            "seconds from last renew": 45,
            "name": "Linux NFSv4.2 debian12-hv",
            "minor version": 2,
            "Implementation domain": "kernel.org",
            "Implementation name": "Linux 6.1.0-12-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.52-1 x86_64",
            "Implementation time": [0, 0],
            "callback state": "UP",
            "callback address": "192.168.40.247:0"
        },
        "states": [
            {
                "94850248556250062041657638912": {
                    "type": "deleg",
                    "access": "r",
                    "superblock": "00:39:5",
                    "filename": "/debian12-hv"
                }
            },
            {
                "94850248556250062041741524992": {
                    "type": "open",
                    "access": "rw",
                    "deny": "--",
                    "superblock": "00:39:137",
                    "filename": "/.debian12-hv.swp",
                    "owner": "open id:8þÀ²3"
                }
            }
        ]
    }]

Description of the fields (all per NFS client):

    'clientid': Hash generated for this client connection
    'address':  The client IP and port. e.g. 10.20.30.40:768

    'status':   The current client status:
        'confirmed' An active connection.
                    The status will convert to 'courtesy' in 90 seconds if not 'confirmed' by the client.
        'courtesy'  A stalled connection from an inactive client.
                    The status will convert to 'expirable' in 24hr.
        'expirable' Waiting to be cleaned up.

    'seconds from last renew':  The session timeout counter.  See 'status' field.
                                Gets reset by confirmation update from the client

    'name': Supplied by the client.
            Linux clients might offer something like 'Linux NFS4.2 clnt_name'.
            FreeBSD clients might supply a UUID like name

    'minor version':    The NFS4.x minor version.  E.G. '2' for NFSv4.2

    'Implementation domain': NFSv4.1 info - e.g. 'kernel.org' or 'freebsd.org'.
    'Implementation name':   NFSv4.1 info - e.g. equivalent to 'uname -a' on the client
    'Implementation time':   NFSv4.1 info - Timestamp (time nfstime4) of client version (maybe unused?)

    'callback state':   Current callback 'service' status for this client: 'UP', 'DOWN', 'FAULT' or 'UNKNOWN'
                        Linux clients usually indicate 'UP'
                        FreeBSD clients may indicate 'DOWN' but are still functional

Type: object

##

Type: array
No Additional Items

#### Tuple Validation

##### Parameter 1: filters

#### filters

Type: array Default: []

List of filters for query results. See API documentation for "Query Methods" for more guidance.

No Additional Items

##### Each item of this array must be:

Type: object
Examples:

    [
        [
            "name",
            "=",
            "bob"
        ]
    ]

    [
        [
            "OR",
            [
                [
                    [
                        "name",
                        "=",
                        "bob"
                    ]
                ],
                [
                    [
                        "name",
                        "=",
                        "larry"
                    ]
                ]
            ]
        ]
    ]

##### Parameter 2: options

#### options

Type: object
Default:
{ "extra": {}, "order_by": [], "select": [], "count": false, "get": false, "offset": 0, "limit": 0, "force_sql_filters": false }

Query options including pagination, ordering, and additional parameters.

No Additional Properties

##

#### Extra

Type: object Default: {}

Extra options are defined on a per-endpoint basis and are described in the documentation for the associated query method.

##

#### Order By

Type: array of string Default: []

An array of field names describing the manner in which query results should be ordered. The field names may also have one of more of the following special prefixes: `-` (reverse sort direction), `nulls_first:` (place any null values at the head of the results list), `nulls_last:` (place any null values at the tail of the results list).

No Additional Items

##### Each item of this array must be:

Type: string
Example:

    [
        "size",
        "-devname",
        "nulls_first:-expiretime"
    ]

##

#### Select

Type: array Default: []

An array of field names specifying the exact fields to include in the query return. The dot character `.` may be used to explicitly select only subkeys of the query result.

No Additional Items

##### Each item of this array must be:

## Any of

Type: string
Type: array
No Additional Items

##### Each item of this array must be:

Type: object
Example:

    [
        "username",
        "Authentication.status"
    ]

##

#### Count

Type: boolean Default: false

Return a numeric value representing the number of items that match the specified `query-filters`.

##

#### Get

Type: boolean Default: false

Return the JSON object of the first result matching the specified `query-filters`. The query fails if there specified `query-filters` return no results.

##

#### Offset

Type: integer Default: 0

This specifies the beginning offset of the results array. When combined with the `limit` query-option it may be used to implement pagination of large results arrays. WARNING: some query methods provide volatile results and the onus is on the developer to understand whether pagination is appropriate for a particular query API method.

Value must be greater or equal to `0`

##

#### Limit

Type: integer Default: 0

This specifies the maximum number of results matching the specified `query-filters` to return. When combined wtih the `offset` query-option it may be used to implement pagination of large results arrays.

WARNING: Some query methods provide volatile results and the onus is on the developer to understand whether pagination is appropriate for a particular query API method.

Value must be greater or equal to `0` and lesser or equal to `10000`

##

#### Force Sql Filters

Type: boolean Default: false

Force use of SQL for result filtering to reduce response time. May not work for all methods.

##

#### Result

## Any of

Type: array of object
No Additional Items

##### Each item of this array must be:

#### NFSGetNfs4ClientsEntry

Type: object
No Additional Properties

##

#### Id

Type: string

Unique identifier for the NFSv4 client.

##

#### Info

Type: object

Client information including connection details and capabilities.

##

#### States

Type: array of object

Array of client state information including open files and locks.

No Additional Items

##### Each item of this array must be:

Type: object

#### NFSGetNfs4ClientsEntry

Type: object
No Additional Properties

##

#### Id

Type: string

Unique identifier for the NFSv4 client.

##

#### Info

Type: object

Client information including connection details and capabilities.

##

#### States

Type: array of object

Array of client state information including open files and locks.

No Additional Items

##### Each item of this array must be:

Type: object
Type: array of object
No Additional Items

##### Each item of this array must be:

Type: object
Type: object
Type: integer

Required roles: READONLY_ADMIN | SHARING_NFS_WRITE