nfsstat.c (194190) | nfsstat.c (194792) |
---|---|
1/* 2 * Copyright (c) 1983, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Rick Macklem at The University of Guelph. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 21 unchanged lines hidden (view full) --- 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 */ 36 37#ifndef lint | 1/* 2 * Copyright (c) 1983, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Rick Macklem at The University of Guelph. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 21 unchanged lines hidden (view full) --- 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 */ 36 37#ifndef lint |
38static char copyright[] = | 38static const char copyright[] = |
39"@(#) Copyright (c) 1983, 1989, 1993\n\ 40 The Regents of the University of California. All rights reserved.\n"; 41#endif /* not lint */ 42 43#ifndef lint 44#if 0 45static char sccsid[] = "@(#)nfsstat.c 8.2 (Berkeley) 3/31/95"; 46#endif 47static const char rcsid[] = | 39"@(#) Copyright (c) 1983, 1989, 1993\n\ 40 The Regents of the University of California. All rights reserved.\n"; 41#endif /* not lint */ 42 43#ifndef lint 44#if 0 45static char sccsid[] = "@(#)nfsstat.c 8.2 (Berkeley) 3/31/95"; 46#endif 47static const char rcsid[] = |
48 "$FreeBSD: head/usr.bin/nfsstat/nfsstat.c 194190 2009-06-14 12:47:27Z ed $"; | 48 "$FreeBSD: head/usr.bin/nfsstat/nfsstat.c 194792 2009-06-23 23:18:19Z delphij $"; |
49#endif /* not lint */ 50 51#include <sys/param.h> 52#include <sys/module.h> 53#include <sys/mount.h> 54#include <sys/time.h> 55#include <sys/sysctl.h> 56#include <nfs/rpcv2.h> --- 15 unchanged lines hidden (view full) --- 72#include <stdio.h> 73#include <stdlib.h> 74#include <string.h> 75#include <paths.h> 76#include <err.h> 77 78struct nlist nl[] = { 79#define N_NFSSTAT 0 | 49#endif /* not lint */ 50 51#include <sys/param.h> 52#include <sys/module.h> 53#include <sys/mount.h> 54#include <sys/time.h> 55#include <sys/sysctl.h> 56#include <nfs/rpcv2.h> --- 15 unchanged lines hidden (view full) --- 72#include <stdio.h> 73#include <stdlib.h> 74#include <string.h> 75#include <paths.h> 76#include <err.h> 77 78struct nlist nl[] = { 79#define N_NFSSTAT 0 |
80 { "nfsstats" }, | 80 { .n_name = "nfsstats" }, |
81#define N_NFSRVSTAT 1 | 81#define N_NFSRVSTAT 1 |
82 { "nfsrvstats" }, 83 "", | 82 { .n_name = "nfsrvstats" }, 83 { .n_name = NULL }, |
84}; 85kvm_t *kd; 86 87static int deadkernel = 0; 88static int widemode = 0; 89static int zflag = 0; 90static int run_v4 = 0; 91static int printtitle = 1; --- 101 unchanged lines hidden (view full) --- 193 } 194 exit(0); 195} 196 197/* 198 * Read the nfs stats using sysctl(3) for live kernels, or kvm_read 199 * for dead ones. 200 */ | 84}; 85kvm_t *kd; 86 87static int deadkernel = 0; 88static int widemode = 0; 89static int zflag = 0; 90static int run_v4 = 0; 91static int printtitle = 1; --- 101 unchanged lines hidden (view full) --- 193 } 194 exit(0); 195} 196 197/* 198 * Read the nfs stats using sysctl(3) for live kernels, or kvm_read 199 * for dead ones. 200 */ |
201void | 201static void |
202readstats(struct nfsstats **stp, struct nfsrvstats **srvstp, int zero) 203{ 204 union { 205 struct nfsstats client; 206 struct nfsrvstats server; 207 } zerostat; 208 size_t buflen; 209 --- 668 unchanged lines hidden --- | 202readstats(struct nfsstats **stp, struct nfsrvstats **srvstp, int zero) 203{ 204 union { 205 struct nfsstats client; 206 struct nfsrvstats server; 207 } zerostat; 208 size_t buflen; 209 --- 668 unchanged lines hidden --- |