xref: /OK3568_Linux_fs/kernel/fs/nfsd/stats.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * Statistics for NFS server.
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
6*4882a593Smuzhiyun  */
7*4882a593Smuzhiyun #ifndef _NFSD_STATS_H
8*4882a593Smuzhiyun #define _NFSD_STATS_H
9*4882a593Smuzhiyun 
10*4882a593Smuzhiyun #include <uapi/linux/nfsd/stats.h>
11*4882a593Smuzhiyun 
12*4882a593Smuzhiyun 
13*4882a593Smuzhiyun struct nfsd_stats {
14*4882a593Smuzhiyun 	unsigned int	rchits;		/* repcache hits */
15*4882a593Smuzhiyun 	unsigned int	rcmisses;	/* repcache hits */
16*4882a593Smuzhiyun 	unsigned int	rcnocache;	/* uncached reqs */
17*4882a593Smuzhiyun 	unsigned int	fh_stale;	/* FH stale error */
18*4882a593Smuzhiyun 	unsigned int	fh_lookup;	/* dentry cached */
19*4882a593Smuzhiyun 	unsigned int	fh_anon;	/* anon file dentry returned */
20*4882a593Smuzhiyun 	unsigned int	fh_nocache_dir;	/* filehandle not found in dcache */
21*4882a593Smuzhiyun 	unsigned int	fh_nocache_nondir;	/* filehandle not found in dcache */
22*4882a593Smuzhiyun 	unsigned int	io_read;	/* bytes returned to read requests */
23*4882a593Smuzhiyun 	unsigned int	io_write;	/* bytes passed in write requests */
24*4882a593Smuzhiyun 	unsigned int	th_cnt;		/* number of available threads */
25*4882a593Smuzhiyun 	unsigned int	th_usage[10];	/* number of ticks during which n perdeciles
26*4882a593Smuzhiyun 					 * of available threads were in use */
27*4882a593Smuzhiyun 	unsigned int	th_fullcnt;	/* number of times last free thread was used */
28*4882a593Smuzhiyun 	unsigned int	ra_size;	/* size of ra cache */
29*4882a593Smuzhiyun 	unsigned int	ra_depth[11];	/* number of times ra entry was found that deep
30*4882a593Smuzhiyun 					 * in the cache (10percentiles). [10] = not found */
31*4882a593Smuzhiyun #ifdef CONFIG_NFSD_V4
32*4882a593Smuzhiyun 	unsigned int	nfs4_opcount[LAST_NFS4_OP + 1];	/* count of individual nfsv4 operations */
33*4882a593Smuzhiyun #endif
34*4882a593Smuzhiyun 
35*4882a593Smuzhiyun };
36*4882a593Smuzhiyun 
37*4882a593Smuzhiyun 
38*4882a593Smuzhiyun extern struct nfsd_stats	nfsdstats;
39*4882a593Smuzhiyun extern struct svc_stat		nfsd_svcstats;
40*4882a593Smuzhiyun 
41*4882a593Smuzhiyun void	nfsd_stat_init(void);
42*4882a593Smuzhiyun void	nfsd_stat_shutdown(void);
43*4882a593Smuzhiyun 
44*4882a593Smuzhiyun #endif /* _NFSD_STATS_H */
45