---
name: "stapprobes.nfs"
section: "5"
platform: "linux"
package: "systemtap"
version: "0.0.20080705-1+lenny1"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/stapprobes.nfs"
---

# stapprobes.nfs(5)

systemtap NFS client side probe points

## NAME

stapprobes.nfs - systemtap NFS client side probe points

## DESCRIPTION

This family of probe points is used to probe NFS activities on  client side. It contains the following probe points:

- **nfs.fop.llseek**

  Fires whenever doing a llseek operation on nfs client side

  **Arguments:**

  *dev*\
     device identifier

  *ino*\
     inode number

  *s\_id*\
     the pointer to s\_id

  *devname*\
     the combination of server ip and the name of block device \
     on server

  *maxbyte*\
     Maximum size of the files

  *offset*\
     the offset of file to be repositioned

  *origin*\
     the original position. The possible value could be:\
             SEEK\_SET\
                   The offset is set to offset bytes.\
             SEEK\_CUR\
                   The offset is set to its current location \
                   plus offset bytes.\
             SEEK\_END\
                   The offset is set to the size of the file \
                   plus offset bytes.

- **nfs.fop.llseek.return**

  Fires whenever nfs llseek operation is done

  **Arguments:**

  *retstr*\
      resulting offset location

- **nfs.fop.read**

  Fires whenever doing a read operation on nfs client side

  **Arguments:**

  *dev*\
     device identifier

  *ino*\
     inode number

  *s\_id*\
     the pointer to s\_id

  *devname*\
     the combination of server ip and the name of block device \
     on server

  *len,size*\
     number of bytes to be read

  *pos*\
     current file offset

  *buf*\
     the buf address

- **nfs.fop.read.return**

  Fires whenever nfs read operation is done

  **Arguments:**

  *size*\
     number of bytes read

- **nfs.fop.write**

  Fires whenever doing a write operation on nfs client side

  **Arguments:**

  *dev*\
     device identifier

  *ino*\
     inode number

  *s\_id*\
     the pointer to s\_id

  *devname*\
     the combination of server ip and the name of block device \
     on server

  *len,size*\
     number of bytes to written

  *pos*\
     current file offset

  *buf*\
     the buf address

- **nfs.fop.write.return**

  Fires whenever nfs write operation is done

  **Arguments:**

  *size*\
     number of bytes written

- **nfs.fop.aio\_read**

  Fires whenever doing an aio\_read operation on nfs client side

  **Arguments:**

  *dev*\
     device identifier

  *ino*\
     inode number

  *s\_id*\
     the pointer to s\_id

  *devname*\
     the combination of server ip and the name of block device \
     on server

  *count,size*\
     number of bytes to be read

  *pos*\
     current file offset

  *buf*\
     the buf address

  *parent\_name*\
     parent dir name

  *file\_name*\
     file name

  *cache\_valid*\
     cache related bit mask flag

  *cache\_time*\
     when we started read-caching this inode

  *attrtimeo*\
     how long the cached information is assumed to be valid.

    The cached attrs for this inode needed to be revalidated if\
        jiffies - read\_cache\_jiffies \> attrtime

- **nfs.fop.aio\_read.return**

  Fires whenever nfs aio\_read operation is done

  **Arguments:**

  *size*\
     number of bytes read

- **nfs.fop.aio\_write**

  Fires whenever doing an aio\_write operation on nfs client side

  **Arguments:**

  *dev*\
     device identifier

  *ino*\
     inode number

  *s\_id*\
     the pointer to s\_id

  *devname*\
     the combination of server ip and the name of block device \
     on server

  *count,size*\
     number of bytes to written

  *pos*\
     current file offset

  *buf*\
     the buf address

  *parent\_name*\
     parent dir name

  *file\_name*\
     file name

- **nfs.fop.aio\_write.return**

  Fires whenever nfs aio\_write operation is done

  **Arguments:**

  *size*\
     number of bytes written

- **nfs.fop.mmap**

  Fires whenever doing an mmap operation on nfs client side

  **Arguments:**

  *dev*\
     device identifier

  *ino*\
     inode number

  *s\_id*\
     the pointer to s\_id

  *devname*\
     the combination of server ip and the name of block device \
     on server

  *vm\_start*\
     start address within vm\_mm

  *vm\_end*\
     the first byte after end address within vm\_mm

  *vm\_flag*\
     vm flags

  *parent\_name*\
     parent dir name

  *file\_name*\
     file name

  *cache\_valid*\
     cache related bit mask flag

  *cache\_time*\
     when we started read-caching this inode

  *attrtimeo*\
     how long the cached information is assumed to be valid.

    The cached attrs for this inode needed to be revalidated if\
        jiffies - read\_cache\_jiffies \> attrtime

- **nfs.fop.open**

  Fires whenever doing an open operation on nfs client side

  **Arguments:**

  *dev*\
     device identifier

  *ino*\
     inode number

  *s\_id*\
     the pointer to s\_id

  *devname*\
     the combination of server ip and the name of block device \
     on server

  *file\_name*\
     file name

  *flag*\
     file flag

  *i\_size*\
     file length in bytes

- **nfs.fop.flush**

  Fires whenever doing an flush operation on nfs client side

  **Arguments:**

  *dev*\
     device identifier

  *ino*\
     inode number

  *s\_id*\
     the pointer to s\_id

  *devname*\
     the combination of server ip and the name of block device \
     on server

  *mode*\
     file mode

  *ndirty*\
     number of dirty page to be flushed

- **nfs.fop.release**

  Fires whenever doing a release page operation on nfs client side

  **Arguments:**

  *dev*\
     device identifier

  *ino*\
     inode number

  *s\_id*\
     the pointer to s\_id

  *devname*\
     the combination of server ip and the name of block device \
     on server

  *mode*\
     file mode

- **nfs.fop.fsync**

  Fires whenever doing a fsync operation on nfs client side

  **Arguments:**

  *dev*\
     device identifier

  *ino*\
     inode number

  *s\_id*\
     the pointer to s\_id

  *devname*\
     the combination of server ip and the name of block device \
     on server

  *ndirty*\
     number of dirty page to be flushed

- **nfs.fop.lock**

  Fires whenever doing a file lock operation on nfs client side

  **Arguments:**

  *dev*\
     device identifier

  *ino*\
     inode number

  *s\_id*\
     the pointer to s\_id

  *devname*\
     the combination of server ip and the name of block device \
     on server

  *i\_mode*\
     file type and access rights

  *cmd*\
     cmd arguments

  *fl\_type*\
     lock type

  *fl\_flag*\
     lock flags

  *fl\_start*\
     starting offset of locked region

  *fl\_end*\
     ending offset of locked region

- **nfs.fop.sendfile**

  Fires whenever doing a send file operation on nfs client side

  **Arguments:**

  *dev*\
     device identifier

  *ino*\
     inode number

  *s\_id*\
     the pointer to s\_id

  *devname*\
     the combination of server ip and the name of block device \
     on server

  *count,size*\
     number of bytes to sent

  *ppos*\
     current file offset

  *cache\_valid*\
     cache related bit mask flag

  *cache\_time*\
     when we started read-caching this inode

  *attrtimeo*\
     how long the cached information is assumed to be valid.

    The cached attrs for this inode needed to be revalidated if\
        jiffies - read\_cache\_jiffies \> attrtime

- **nfs.fop.sendfile.return**

  Fires whenever nfs sendfile operation is done

  **Arguments:**

  *size*\
     number of bytes sent

- **nfs.fop.check\_flags**

  Fires whenever doing a check flag operation on nfs client side

  **Arguments:**

  *flags*\
     file flag

- **nfs.aop.readpage**

  Fires when a previous async read operation failed

  **Arguments:**

  *\_\_page*\
     the address of page

  *dev*\
     device identifier

  *ino*\
     inode number

  *i\_flag*\
     file flags

  *i\_size*\
     file length in bytes

  *sb\_flag*\
     super block flags

  *file*\
     file argument

  *page\_index*\
     offset within mapping

  *rsize*\
      read size  (in bytes)

- **nfs.aop.readpages**

  Fies when in readahead way,read several pages once

  **Arguments:**

  *dev*\
     device identifier

  *ino*\
     inode number

  *nr\_pages ,size*\
     number of pages attempted to read in this execution

  *file*\
     filp argument

  *rpages*\
     read size (in pages)

  *rsize*\
     read size (in bytes)

- **nfs.aop.readpages.return**

  Fies whenever a nfs read pages operation is done

  **Arguments:**

  *size*\
     number of pages read

- **nfs.aop.set\_page\_dirty**

  Fies whenever set page dirty on nfs client side

  **Arguments:**

  *\_\_page*\
     the address of page

  *page\_flag*\
     page flags

- **nfs.aop.writepage**

  Fies whenever writing an mapped page to the server from nfs client side

  **Arguments:**

  *\_\_page*\
     the address of page

  *dev*\
     device identifier

  *ino*\
     inode number

  *for\_reclaim*\
     a flag of writeback\_control, indicates if it's invoked from the page allocator

  *for\_kupdate*\
     a flag of writeback\_control, indicates if it's a kupdate writeback\
     The priority of wb is decided by above two flags

  *i\_flag*\
     file flags

  *i\_size*\
     file length in bytes

  *i\_state*\
     inode state flags

  *sb\_flag*\
     super block flags

  *page\_index*\
     offset within mapping

  *wsize*\
     write size

- **nfs.aop.writepages**

  Fies whenever writing several dirty pages to the server from nfs client sides

  **Arguments:**

  *dev*\
     device identifier

  *ino*\
     inode number

  *for\_reclaim*\
     a flag of writeback\_control, indicates if it's invoked from the page allocator

  *for\_kupdate*\
     a flag of writeback\_control, indicates if it's a kupdate writeback\
     The priority of wb is decided by above two flags

  *wpages*\
      write size (in pages)

  *wsize*\
     write size

  *nr\_to\_write ,size*\
     number of pages attempted to be written in this execution

- **nfs.aop.prepare\_write**

  Fies whenever prepare a page for writting on nfs client sides

  **Arguments:**

  *\_\_page*\
     the address of page

  *dev*\
     device identifier

  *ino*\
     inode number

  *offset*\
     start address of this write operation

  *to*\
     end address of this write operation

  *page\_index*\
     offset within mapping

  *size*\
     read bytes

- **nfs.aop.commit\_write**

  Fies often after prepare write operation

  **Arguments:**

  *\_\_page*\
     the address of page

  *dev*\
     device identifier

  *ino*\
     inode number

  *offset*\
     start address of this write operation

  *to*\
     end address of this write operation

  *i\_flag*\
     file flags

  *i\_size*\
     file length in bytes

  *sb\_flag*\
     super block flag

  *page\_index*\
     offset within mapping

  *size*\
     read bytes

- **nfs.aop.release\_page**

  **Arguments:**

  *\_\_page*\
     the address of page

  *dev*\
     device identifier

  *ino*\
     inode number

  *page\_index*\
     offset within mapping

- **nfs.proc.lookup**

  **Arguments:**

  *server\_ip*\
     ip address of server

  *prot*\
     transfer protocol

  *version*\
     nfs version

  *filename*\
     the name of  file which client opens/searchs on server

  *name\_len*\
     the length of file name

  *bitmask0, bitmask1*\
     V4 bitmask representing the set of attributes \
     supported on this filesystem (only in probe nfs.proc4.lookup)

- **nfs.proc.read**

  Fires when client synchronously reads file from server

  **Arguments:**

  *server\_ip*\
     ip address of server

  *prot*\
     transfer protocol

  *version*\
     nfs version

  *flags*\
     used to set task-\>tk\_flags in rpc\_init\_task function

  *size,count*\
     number of bytes to be read in this execution

  *offset*\
     the file offset

- **nfs.proc.read.return**

  Fires when synchronously reading file from server is done

  **Arguments:**

  *size*\
     number of bytes read

- **nfs.proc.write**

  Fires when client synchronously writes file to server

  **Arguments:**

  *server\_ip*\
     ip address of server

  *prot*\
     transfer protocol

  *version*\
     nfs version

  *flags*\
     used to set task-\>tk\_flags in rpc\_init\_task function

  *size,count*\
     number of  bytes to be written in this execution

  *offset*\
     the file offset

  *bitmask0, bitmask1*\
     V4 bitmask representing the set of attributes \
     supported on this filesystem (only in probe nfs.proc4.lookup)

- **nfs.proc.write.return**

  Fires when synchronously writting file from server is done

  **Arguments:**

  *size*\
     number of bytes written

- **nfs.proc.commit**

  Fires when client writes the buffered data to disk,the buffered  data is asynchronously written by client before(not exist in NFSV2)

  **Arguments:**

  *server\_ip*\
     ip address of server

  *prot*\
     transfer protocol

  *version*\
     nfs version

  *size,count*\
     number of  bytes to be written in this execution

  *offset*\
     the file offset

  *bitmask0, bitmask1*\
     V4 bitmask representing the set of attributes \
     supported on this filesystem (only in probe nfs.proc4.lookup)

- **nfs.proc.commit.return**

  Fires when committing operation is done

  **Arguments:**

  *size*\
     number of bytes written

- **nfs.proc.read\_setup**

  Fires when client asynchronously reads file from server, this function is used to setup a read rpc task,not do a real read operation.

  **Arguments:**

  *server\_ip*\
     ip address of server

  *prot*\
     transfer protocol

  *version*\
     nfs version

  *size,count*\
     number of  bytes to be read in this execution

  *offset*\
     the file offset

- **nfs.proc.read\_done**

  Fires when a read reply is received or some read error occur (timeout or socket shutdown)

  **Arguments:**

  *server\_ip*\
     ip address of server

  *prot*\
     transfer protocol

  *version*\
     nfs version

  *status*\
     result of last async read operation

  *count*\
     number of bytes read

  *timestamp*\
     time stamp ,which is used for lease renewal (only \
     in nfs.proc4.read\_done)

- **nfs.proc.write\_setup**

  Fires when client asynchronously write data to server, this function is used to setup a write rpc task,not do a write read operation.

  **Arguments:**

  *server\_ip*\
     ip address of server

  *prot*\
     transfer protocol

  *version*\
     nfs version

  *size,count*\
     number of  bytes to be written in this execution

  *offset*\
     the file offset

  *how*\
     used to set args.stable,The possible value could be:\
             NFS\_UNSTABLE,\
             NFS\_DATA\_SYNC,\
             NFS\_FILE\_SYNC\
             (only in nfs.proc3.write\_setup and nfs.proc4.write\_setup)

  *bitmask0, bitmask1*\
      V4 bitmask representing the set of attributes supported \
      on this filesystem (only in probe nfs.proc4.write\_setup)

- **nfs.proc.write\_done**

  Fires when a write reply is received or some write error occur (timeout or socket shutdown)

  **Arguments:**

  *server\_ip*\
     ip address of server

  *prot*\
     transfer protocol

  *version*\
     nfs version

  *status*\
     result of last async write operation

  *valid*\
     fattr-\>valid ,indicates which fields are valid

  *count*\
     number of bytes written

  *timestamp*\
     time stamp ,which is used for lease renewal (only \
     in nfs.proc4.read\_done)

- **nfs.proc.commit\_setup**

  Fires when client asynchronously do a commit operation, this function is used to setup a commit rpc task,not do a commit read operation.

  **Arguments:**

  *server\_ip*\
     ip address of server

  *prot*\
     transfer protocol

  *version*\
     nfs version

  *size,count*\
     number of  bytes to be written in this execution

  *offset*\
     the file offset

  *bitmask0, bitmask1*\
      V4 bitmask representing the set of attributes supported \
      on this filesystem (only in probe nfs.proc4.commit\_setup)

- **nfs.proc.commit\_done**

  Fires when a commit reply is received or some commit error occur (timeout or socket shutdown)

  **Arguments:**

  *server\_ip*\
     ip address of server

  *prot*\
     transfer protocol

  *version*\
     nfs version

  *status*\
     result of last async write operation

  *valid*\
     fattr-\>valid ,indicates which fields are valid

  *count*\
     number of bytes written

  *timestamp*\
     time stamp ,which is used for lease renewal (only \
     in nfs.proc4.read\_done)

- **nfs.proc.open**

  Fires whenever doing a open operation on nfs client side, the nfs\_open function is used to allocate file read/write context information

  **Arguments:**

  *server\_ip*\
     ip address of server

  *prot*\
     transfer protocol

  *version*\
     nfs version

  *filename*\
     file name

  *flag*\
     file flag

  *mode*\
     file mode

- **nfs.proc.release**

  Fires whenever doing a release operation on nfs client side,

  **Arguments:**

  *server\_ip*\
     ip address of server

  *prot*\
     transfer protocol

  *version*\
     nfs version

  *filename*\
     file name

  *flag*\
     file flag

  *mode*\
     file mode

- **nfs.proc4.handle\_exception**

  Fires whenever doing the error handling, only exist in NFSV4

  *errorcode*\
     error code

- **nfs.proc.create**

  Fires whenever nfs client creates a file on server

  **Arguments:**

  *server\_ip*\
     ip address of server

  *prot*\
     transfer protocol

  *version*\
     nfs version

  *fh*\
     file handler of parent dir

  *filename*\
     file name

  *filelen*\
     length of file name

  *flag*\
     indicates create mode(only for NFSV3 and NFSV4)

- **nfs.proc.remove**

  Fires whenever nfs client removes a file from server

  **Arguments:**

  *server\_ip*\
     ip address of server

  *prot*\
     transfer protocol

  *version*\
     nfs version

  *fh*\
     file handler of parent dir

  *filename*\
     file name

  *filelen*\
     length of file name

- **nfs.proc.rename**

  Fires whenever nfs client renames a file on server

  **Arguments:**

  *server\_ip*\
     ip address of server

  *prot*\
     transfer protocol

  *version*\
     nfs version

  *old\_fh*\
     file handler of old parent dir

  *old\_name*\
     old file name

  *old\_filelen*\
     length of old file name

  *new\_fh*\
     file handler of new parent dir

  *new\_name*\
     new file name

  *new\_filelen*\
     length of new file name

## SEE ALSO

[*stap*(1)](/stap/1.md), [*stapprobes*(5)](/stapprobes/5.md),
