| Updated: October 28, 2024 |
Get statistics about the filesystem event manager
#include <sys/dcmd_fsevmgr.h> #define DCMD_FSEVMGR_STATS __DIOTF(_DCMD_FSEVMGR, 5, fsevmgr_stats_t)
| Argument | Value |
|---|---|
| filedes | A file descriptor that you obtained by opening /dev/fsevents |
| dcmd | DCMD_FSEVMGR_STATS |
| dev_data_ptr | A pointer to a fsevmgr_stats_t |
| n_bytes | sizeof(fsevmgr_stats_t) plus the size of the array of fsevmgr_mbstats_t structures. |
| dev_info_ptr | NULL |
This commands gets statistics about the filesystem event manager.
None.
A filled-in fsevmgr_stats_t structure:
typedef struct fsevmgr_mbstats_s {
uint64_t rxbytes; /* Received total bytes */
uint64_t txbytes; /* Transmitted total bytes */
uint64_t rxevents; /* Received events */
uint64_t txevents; /* Transmitted events */
uint64_t writecalls; /* Number of write calls */
uint64_t readcalls; /* Number of read calls */
uint64_t lostevents; /* Number of lost events */
uint32_t size; /* Mailbox size in bytes */
uint32_t used; /* Mailbox bytes used */
uint32_t maxused; /* Mailbox maximum bytes used */
uint32_t deferred; /* Current deferred read count */
uint32_t maxdeferred; /* Maximum deferred read count */
uint32_t watches; /* Current number of watch filters */
uint32_t maxwatches; /* Maximum number of watch filters */
uint32_t inotifymask; /* Current combination of all inotify masks */
uint32_t maxinotifymask; /* Combination of all watch masks ever used */
pid_t owner; /* Owning process */
} fsevmgr_mbstats_t;
typedef struct fsevmgr_stats_s {
uint32_t mailboxes; /* Number of mailboxes (elements in array) */
fsevmgr_mbstats_t mbstats[1]; /* Array of mailbox stats */
} fsevmgr_stats_t;
The devctl() function can return the following, in addition to the error codes listed in its entry in the C Library Reference: