JSON attributes in clustered watch folder
Use this information to learn more about the JSON attributes that are associated with the 12 events that can be specified when enabling a clustered watch and the other events that might be received due to other file system activity.
- WF_JSON
- The version of the record.
- wd
- The watch descriptor.
- cookie
- A unique integer that connects related events. It allows the resulting pair of IN_MOVED_FROM and IN_MOVED_TO events to be connected.
- mask
- A hex value representing the event.
- event
- The event type. One of the following events:
- IN_ACCESS
- IN_ATTRIB
- IN_CLOSE_NOWRITE
- IN_CLOSE_WRITE
- IN_CREATE
- IN_DELETE
- IN_DELETE_SELF
- IN_MODIFY
- IN_MOVED_FROM
- IN_MOVED_TO
- IN_MOVE_SELF
- IN_OPEN
- path
- The path name of the file that is involved in the event.
- clusterName
- The name of the cluster where the event took place.
- nodeName
- The name of the node where the event took place.
- nfsClientIp
- The IP address of the client involved in the event.
- fsName
- The name of the file system that is involved in the event.
- inode
- The inode number of the file that is involved in the event.
- filesetID
- The fileset ID of the file.
- linkCount
- The link count of the file.
- openFlags
- The open flags that are specified during the event (O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, etc.) as defined in fcntl.h.
- poolName
- The pool name where the file resides.
- fileSize
- The current size of the file in bytes.
- ownerUserId
- The owner ID of the file that is involved in the event.
- ownerGroupId
- The group ID of the file that is involved in the event.
- atime
- The time in UTC format of the last access of the file that is involved in the event.
- ctime
- The time in UTC format of the last inode or metadata change of the file that is involved in the event.
- mtime
- The time in UTC format of the last time that the file was modified.
- eventTime
- The time in UTC format of the event.
- clientUserId
- The user ID of the process that is involved in the event.
- clientGroupId
- The group ID of the process that is involved in the event.
- processId
- The process ID that is involved in the event.
- bytesRead1, 2
- The bytes read from a file.
- bytesWritten1, 2
- The bytes written to a file.
- minReadOffset1, 2
- The starting position of bytes read from a file.
- maxReadOffset1, 2
- The ending position of bytes read from a file.
- minWriteOffset1, 2
- The starting position of bytes written to a file.
- maxWriteOffset1, 2
- The ending position of bytes written to a file.
- permissions
- The permissions on the file that is involved in the event.
- acls
- The access control lists that are involved in the event (only in case of an acl change event).
- xattrs
- The extended attributes that are involved in the event (only in case of an Xattr change event).
- subEvent
- None.
You can start a watch with any of the following events:
- IN_OPEN - 0x20
- IN_ACCESS - 0x01
- IN_MODIFY - 0x02
- IN_ATTRIB - 0x04
- IN_CLOSE_WRITE - 0x8
- IN_CLOSE_NOWRITE - 0x10
- IN_CREATE - 0x100
- IN_DELETE - 0x200
- IN_MOVED_FROM - 0x40
- IN_MOVED_TO - 0x80
- IN_DELETE_SELF - 0x400
- IN_MOVE_SELF - 0x800
You might see these events during some of the previously mentioned watch types:
- IN_IGNORED - 0x8000
- IN_UNMOUNT - 0x2000
- IN_OPEN IN_ISDIR - 0x40000020
- IN_ATTRIB IN_ISDIR - 0x40000004
- IN_CLOSE IN_ISDIR - 0x40000010
- IN_CREATE IN_ISDIR - 0x40000100
- IN_DELETE IN_ISDIR - 0x40000200
- IN_MOVE_SELF IN_ISDIR - 0x40000800
- IN_MOVED_FROM - 0x40000040
- IN_MOVED_TO - 0x40000080
- IN_DELETE_SELF - 0x40000400
Note:
1 The attributes are applicable to the IN_CLOSE_WRITE and IN_CLOSE_NO_WRITE events.
2 Results might be inaccurate with mmap IO, mmap IO via SMB, or IO via NFS.