Annotation of src/usr.bin/vmstat/dkstats.h, Revision 1.10
1.10 ! dlg 1: /* $OpenBSD: dkstats.h,v 1.9 2004/02/15 02:45:47 tedu Exp $ */
1.2 deraadt 2: /* $NetBSD: dkstats.h,v 1.1 1996/05/10 23:19:28 thorpej Exp $ */
1.1 tholo 3:
4: /*
1.2 deraadt 5: * Copyright (c) 1996 John M. Vinopal
1.1 tholo 6: * All rights reserved.
7: *
8: * Redistribution and use in source and binary forms, with or without
9: * modification, are permitted provided that the following conditions
10: * are met:
11: * 1. Redistributions of source code must retain the above copyright
12: * notice, this list of conditions and the following disclaimer.
13: * 2. Redistributions in binary form must reproduce the above copyright
14: * notice, this list of conditions and the following disclaimer in the
15: * documentation and/or other materials provided with the distribution.
16: * 3. All advertising materials mentioning features or use of this software
17: * must display the following acknowledgement:
18: * This product includes software developed for the NetBSD Project
19: * by John M. Vinopal.
20: * 4. The name of the author may not be used to endorse or promote products
21: * derived from this software without specific prior written permission.
22: *
23: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
24: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
25: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
26: * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
27: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28: * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29: * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
30: * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
31: * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33: * SUCH DAMAGE.
34: */
35:
36: #include <sys/time.h>
37: #include <unistd.h>
38:
39: /* poseur disk entry to hold the information we're interested in. */
40: struct _disk {
1.8 tdeval 41: int dk_ndrive; /* # of drives. */
1.1 tholo 42: int *dk_select; /* Display stats for selected disks. */
43: char **dk_name; /* Disk names (sd0, wd1, etc). */
1.9 tedu 44: u_int64_t *dk_rxfer; /* # of read transfers. */
1.10 ! dlg 45: u_int64_t *dk_wxfer; /* # of write transfers. */
1.1 tholo 46: u_int64_t *dk_seek; /* # of seeks (currently unused). */
1.9 tedu 47: u_int64_t *dk_rbytes; /* # of bytes read. */
48: u_int64_t *dk_wbytes; /* # of bytes written. */
1.1 tholo 49: struct timeval *dk_time; /* Time spent in disk i/o. */
1.6 angelos 50: int64_t tk_nin; /* TTY Chars in. */
51: int64_t tk_nout; /* TTY Chars out. */
1.1 tholo 52: long cp_time[CPUSTATES]; /* System timer ticks. */
53: };
1.4 millert 54:
1.7 millert 55: void dkswap(void);
56: void dkreadstats(void);
57: int dkinit(int);