![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0 */ 0002 /* 0003 * User-space visible declarations for NFS client per-mount 0004 * point statistics 0005 * 0006 * Copyright (C) 2005, 2006 Chuck Lever <cel@netapp.com> 0007 * 0008 * NFS client per-mount statistics provide information about the 0009 * health of the NFS client and the health of each NFS mount point. 0010 * Generally these are not for detailed problem diagnosis, but 0011 * simply to indicate that there is a problem. 0012 * 0013 * These counters are not meant to be human-readable, but are meant 0014 * to be integrated into system monitoring tools such as "sar" and 0015 * "iostat". As such, the counters are sampled by the tools over 0016 * time, and are never zeroed after a file system is mounted. 0017 * Moving averages can be computed by the tools by taking the 0018 * difference between two instantaneous samples and dividing that 0019 * by the time between the samples. 0020 */ 0021 0022 #ifndef _LINUX_NFS_IOSTAT 0023 #define _LINUX_NFS_IOSTAT 0024 0025 #define NFS_IOSTAT_VERS "1.1" 0026 0027 /* 0028 * NFS byte counters 0029 * 0030 * 1. SERVER - the number of payload bytes read from or written 0031 * to the server by the NFS client via an NFS READ or WRITE 0032 * request. 0033 * 0034 * 2. NORMAL - the number of bytes read or written by applications 0035 * via the read(2) and write(2) system call interfaces. 0036 * 0037 * 3. DIRECT - the number of bytes read or written from files 0038 * opened with the O_DIRECT flag. 0039 * 0040 * These counters give a view of the data throughput into and out 0041 * of the NFS client. Comparing the number of bytes requested by 0042 * an application with the number of bytes the client requests from 0043 * the server can provide an indication of client efficiency 0044 * (per-op, cache hits, etc). 0045 * 0046 * These counters can also help characterize which access methods 0047 * are in use. DIRECT by itself shows whether there is any O_DIRECT 0048 * traffic. NORMAL + DIRECT shows how much data is going through 0049 * the system call interface. A large amount of SERVER traffic 0050 * without much NORMAL or DIRECT traffic shows that applications 0051 * are using mapped files. 0052 * 0053 * NFS page counters 0054 * 0055 * These count the number of pages read or written via nfs_readpage(), 0056 * nfs_readpages(), or their write equivalents. 0057 * 0058 * NB: When adding new byte counters, please include the measured 0059 * units in the name of each byte counter to help users of this 0060 * interface determine what exactly is being counted. 0061 */ 0062 enum nfs_stat_bytecounters { 0063 NFSIOS_NORMALREADBYTES = 0, 0064 NFSIOS_NORMALWRITTENBYTES, 0065 NFSIOS_DIRECTREADBYTES, 0066 NFSIOS_DIRECTWRITTENBYTES, 0067 NFSIOS_SERVERREADBYTES, 0068 NFSIOS_SERVERWRITTENBYTES, 0069 NFSIOS_READPAGES, 0070 NFSIOS_WRITEPAGES, 0071 __NFSIOS_BYTESMAX, 0072 }; 0073 0074 /* 0075 * NFS event counters 0076 * 0077 * These counters provide a low-overhead way of monitoring client 0078 * activity without enabling NFS trace debugging. The counters 0079 * show the rate at which VFS requests are made, and how often the 0080 * client invalidates its data and attribute caches. This allows 0081 * system administrators to monitor such things as how close-to-open 0082 * is working, and answer questions such as "why are there so many 0083 * GETATTR requests on the wire?" 0084 * 0085 * They also count anamolous events such as short reads and writes, 0086 * silly renames due to close-after-delete, and operations that 0087 * change the size of a file (such operations can often be the 0088 * source of data corruption if applications aren't using file 0089 * locking properly). 0090 */ 0091 enum nfs_stat_eventcounters { 0092 NFSIOS_INODEREVALIDATE = 0, 0093 NFSIOS_DENTRYREVALIDATE, 0094 NFSIOS_DATAINVALIDATE, 0095 NFSIOS_ATTRINVALIDATE, 0096 NFSIOS_VFSOPEN, 0097 NFSIOS_VFSLOOKUP, 0098 NFSIOS_VFSACCESS, 0099 NFSIOS_VFSUPDATEPAGE, 0100 NFSIOS_VFSREADPAGE, 0101 NFSIOS_VFSREADPAGES, 0102 NFSIOS_VFSWRITEPAGE, 0103 NFSIOS_VFSWRITEPAGES, 0104 NFSIOS_VFSGETDENTS, 0105 NFSIOS_VFSSETATTR, 0106 NFSIOS_VFSFLUSH, 0107 NFSIOS_VFSFSYNC, 0108 NFSIOS_VFSLOCK, 0109 NFSIOS_VFSRELEASE, 0110 NFSIOS_CONGESTIONWAIT, 0111 NFSIOS_SETATTRTRUNC, 0112 NFSIOS_EXTENDWRITE, 0113 NFSIOS_SILLYRENAME, 0114 NFSIOS_SHORTREAD, 0115 NFSIOS_SHORTWRITE, 0116 NFSIOS_DELAY, 0117 NFSIOS_PNFS_READ, 0118 NFSIOS_PNFS_WRITE, 0119 __NFSIOS_COUNTSMAX, 0120 }; 0121 0122 /* 0123 * NFS local caching servicing counters 0124 */ 0125 enum nfs_stat_fscachecounters { 0126 NFSIOS_FSCACHE_PAGES_READ_OK, 0127 NFSIOS_FSCACHE_PAGES_READ_FAIL, 0128 NFSIOS_FSCACHE_PAGES_WRITTEN_OK, 0129 NFSIOS_FSCACHE_PAGES_WRITTEN_FAIL, 0130 NFSIOS_FSCACHE_PAGES_UNCACHED, 0131 __NFSIOS_FSCACHEMAX, 0132 }; 0133 0134 #endif /* _LINUX_NFS_IOSTAT */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |