Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nfs_iostat.h
Go to the documentation of this file.
1 /*
2  * User-space visible declarations for NFS client per-mount
3  * point statistics
4  *
5  * Copyright (C) 2005, 2006 Chuck Lever <[email protected]>
6  *
7  * NFS client per-mount statistics provide information about the
8  * health of the NFS client and the health of each NFS mount point.
9  * Generally these are not for detailed problem diagnosis, but
10  * simply to indicate that there is a problem.
11  *
12  * These counters are not meant to be human-readable, but are meant
13  * to be integrated into system monitoring tools such as "sar" and
14  * "iostat". As such, the counters are sampled by the tools over
15  * time, and are never zeroed after a file system is mounted.
16  * Moving averages can be computed by the tools by taking the
17  * difference between two instantaneous samples and dividing that
18  * by the time between the samples.
19  */
20 
21 #ifndef _LINUX_NFS_IOSTAT
22 #define _LINUX_NFS_IOSTAT
23 
24 #define NFS_IOSTAT_VERS "1.1"
25 
26 /*
27  * NFS byte counters
28  *
29  * 1. SERVER - the number of payload bytes read from or written
30  * to the server by the NFS client via an NFS READ or WRITE
31  * request.
32  *
33  * 2. NORMAL - the number of bytes read or written by applications
34  * via the read(2) and write(2) system call interfaces.
35  *
36  * 3. DIRECT - the number of bytes read or written from files
37  * opened with the O_DIRECT flag.
38  *
39  * These counters give a view of the data throughput into and out
40  * of the NFS client. Comparing the number of bytes requested by
41  * an application with the number of bytes the client requests from
42  * the server can provide an indication of client efficiency
43  * (per-op, cache hits, etc).
44  *
45  * These counters can also help characterize which access methods
46  * are in use. DIRECT by itself shows whether there is any O_DIRECT
47  * traffic. NORMAL + DIRECT shows how much data is going through
48  * the system call interface. A large amount of SERVER traffic
49  * without much NORMAL or DIRECT traffic shows that applications
50  * are using mapped files.
51  *
52  * NFS page counters
53  *
54  * These count the number of pages read or written via nfs_readpage(),
55  * nfs_readpages(), or their write equivalents.
56  *
57  * NB: When adding new byte counters, please include the measured
58  * units in the name of each byte counter to help users of this
59  * interface determine what exactly is being counted.
60  */
71 };
72 
73 /*
74  * NFS event counters
75  *
76  * These counters provide a low-overhead way of monitoring client
77  * activity without enabling NFS trace debugging. The counters
78  * show the rate at which VFS requests are made, and how often the
79  * client invalidates its data and attribute caches. This allows
80  * system administrators to monitor such things as how close-to-open
81  * is working, and answer questions such as "why are there so many
82  * GETATTR requests on the wire?"
83  *
84  * They also count anamolous events such as short reads and writes,
85  * silly renames due to close-after-delete, and operations that
86  * change the size of a file (such operations can often be the
87  * source of data corruption if applications aren't using file
88  * locking properly).
89  */
119 };
120 
121 /*
122  * NFS local caching servicing counters
123  */
131 };
132 
133 #endif /* _LINUX_NFS_IOSTAT */