xref: /freebsd/lib/libdevstat/devstat.3 (revision 3a5146d9e27e4472cb615d1d5e7027d0e331bec3)
128fb27baSJustin T. Gibbs.\"
2c4a5ef6eSThomas Moestl.\" Copyright (c) 1998, 1999, 2001 Kenneth D. Merry.
328fb27baSJustin T. Gibbs.\" All rights reserved.
428fb27baSJustin T. Gibbs.\"
528fb27baSJustin T. Gibbs.\" Redistribution and use in source and binary forms, with or without
628fb27baSJustin T. Gibbs.\" modification, are permitted provided that the following conditions
728fb27baSJustin T. Gibbs.\" are met:
828fb27baSJustin T. Gibbs.\" 1. Redistributions of source code must retain the above copyright
928fb27baSJustin T. Gibbs.\"    notice, this list of conditions and the following disclaimer.
1028fb27baSJustin T. Gibbs.\" 2. Redistributions in binary form must reproduce the above copyright
1128fb27baSJustin T. Gibbs.\"    notice, this list of conditions and the following disclaimer in the
1228fb27baSJustin T. Gibbs.\"    documentation and/or other materials provided with the distribution.
1328fb27baSJustin T. Gibbs.\" 3. The name of the author may not be used to endorse or promote products
1428fb27baSJustin T. Gibbs.\"    derived from this software without specific prior written permission.
1528fb27baSJustin T. Gibbs.\"
1628fb27baSJustin T. Gibbs.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1728fb27baSJustin T. Gibbs.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1828fb27baSJustin T. Gibbs.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1928fb27baSJustin T. Gibbs.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2028fb27baSJustin T. Gibbs.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2128fb27baSJustin T. Gibbs.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2228fb27baSJustin T. Gibbs.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2328fb27baSJustin T. Gibbs.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2428fb27baSJustin T. Gibbs.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2528fb27baSJustin T. Gibbs.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2628fb27baSJustin T. Gibbs.\" SUCH DAMAGE.
2728fb27baSJustin T. Gibbs.\"
287f3dea24SPeter Wemm.\" $FreeBSD$
2928fb27baSJustin T. Gibbs.\"
30c4a5ef6eSThomas Moestl.Dd July 15, 2001
3128fb27baSJustin T. Gibbs.Dt DEVSTAT 3
32a307d598SRuslan Ermilov.Os
3328fb27baSJustin T. Gibbs.Sh NAME
34b27e4ff3SAlexey Zelkin.Nm devstat ,
35c4a5ef6eSThomas Moestl.Nm devstat_getnumdevs ,
36c4a5ef6eSThomas Moestl.Nm devstat_getgeneration ,
37c4a5ef6eSThomas Moestl.Nm devstat_getversion ,
38c4a5ef6eSThomas Moestl.Nm devstat_checkversion ,
39c4a5ef6eSThomas Moestl.Nm devstat_getdevs ,
40c4a5ef6eSThomas Moestl.Nm devstat_selectdevs ,
41c4a5ef6eSThomas Moestl.Nm devstat_buildmatch ,
42c4a5ef6eSThomas Moestl.Nm devstat_compute_statistics ,
433a5146d9SRuslan Ermilov.Nm devstat_compute_etime
4428fb27baSJustin T. Gibbs.Nd device statistics utility library
459d5b4f83SAlexey Zelkin.Sh LIBRARY
469d5b4f83SAlexey Zelkin.Lb libdevstat
4728fb27baSJustin T. Gibbs.Sh SYNOPSIS
4832eef9aeSRuslan Ermilov.In devstat.h
4928fb27baSJustin T. Gibbs.Ft int
50c4a5ef6eSThomas Moestl.Fo devstat_getnumdevs
51c4a5ef6eSThomas Moestl.Fa "kvm_t *kd"
52c4a5ef6eSThomas Moestl.Fc
53c4a5ef6eSThomas Moestl.Ft long
54c4a5ef6eSThomas Moestl.Fo devstat_getgeneration
55c4a5ef6eSThomas Moestl.Fa "kvm_t *kd"
56c4a5ef6eSThomas Moestl.Fc
57c4a5ef6eSThomas Moestl.Ft int
58c4a5ef6eSThomas Moestl.Fo devstat_getversion
59c4a5ef6eSThomas Moestl.Fa "kvm_t *kd"
60c4a5ef6eSThomas Moestl.Fc
61c4a5ef6eSThomas Moestl.Ft int
62c4a5ef6eSThomas Moestl.Fo devstat_checkversion
63c4a5ef6eSThomas Moestl.Fa "kvm_t *kd"
64c4a5ef6eSThomas Moestl.Fc
65c4a5ef6eSThomas Moestl.Ft int
66c4a5ef6eSThomas Moestl.Fo devstat_getdevs
67c4a5ef6eSThomas Moestl.Fa "kvm_t *kd"
68c4a5ef6eSThomas Moestl.Fa "struct statinfo *stats"
69c4a5ef6eSThomas Moestl.Fc
70c4a5ef6eSThomas Moestl.Ft int
71c4a5ef6eSThomas Moestl.Fo devstat_selectdevs
72c4a5ef6eSThomas Moestl.Fa "struct device_selection **dev_select"
73c4a5ef6eSThomas Moestl.Fa "int *num_selected"
74c4a5ef6eSThomas Moestl.Fa "int *num_selections"
75c4a5ef6eSThomas Moestl.Fa "long *select_generation"
76c4a5ef6eSThomas Moestl.Fa "long current_generation"
77c4a5ef6eSThomas Moestl.Fa "struct devstat *devices"
78c4a5ef6eSThomas Moestl.Fa "int numdevs"
79c4a5ef6eSThomas Moestl.Fa "struct devstat_match *matches"
80c4a5ef6eSThomas Moestl.Fa "int num_matches"
81c4a5ef6eSThomas Moestl.Fa "char **dev_selections"
82c4a5ef6eSThomas Moestl.Fa "int num_dev_selections"
83c4a5ef6eSThomas Moestl.Fa "devstat_select_mode select_mode"
84c4a5ef6eSThomas Moestl.Fa "int maxshowdevs"
85c4a5ef6eSThomas Moestl.Fa "int perf_select"
86c4a5ef6eSThomas Moestl.Fc
87c4a5ef6eSThomas Moestl.Ft int
88c4a5ef6eSThomas Moestl.Fo devstat_buildmatch
89c4a5ef6eSThomas Moestl.Fa "char *match_str"
90c4a5ef6eSThomas Moestl.Fa "struct devstat_match **matches"
91c4a5ef6eSThomas Moestl.Fa "int *num_matches"
92c4a5ef6eSThomas Moestl.Fc
93c4a5ef6eSThomas Moestl.Ft int
94c4a5ef6eSThomas Moestl.Fo devstat_compute_statistics
95c4a5ef6eSThomas Moestl.Fa "struct devstat *current"
96c4a5ef6eSThomas Moestl.Fa "struct devstat *previous"
970f393d5cSBruce Evans.Fa "long double etime"
98c4a5ef6eSThomas Moestl.Fa "..."
99c4a5ef6eSThomas Moestl.Fc
100c4a5ef6eSThomas Moestl.Ft long double
101c4a5ef6eSThomas Moestl.Fo devstat_compute_etime
102b193011aSPoul-Henning Kamp.Fa "struct bintime cur_time"
103b193011aSPoul-Henning Kamp.Fa "struct bintime prev_time"
10428fb27baSJustin T. Gibbs.Fc
10528fb27baSJustin T. Gibbs.Sh DESCRIPTION
10628fb27baSJustin T. GibbsThe
10728fb27baSJustin T. Gibbs.Nm
10828fb27baSJustin T. Gibbslibrary is a library of helper functions for dealing with the kernel
10928fb27baSJustin T. Gibbs.Xr devstat 9
11028fb27baSJustin T. Gibbsinterface, which is accessible to users via
111c4a5ef6eSThomas Moestl.Xr sysctl 3
112c4a5ef6eSThomas Moestland
113c4a5ef6eSThomas Moestl.Xr kvm 3 .
114b9154997SKenneth D. MerryAll functions that take a
115c4a5ef6eSThomas Moestl.Vt kvm_t *
116c4a5ef6eSThomas Moestlas first argument can be passed
117c4a5ef6eSThomas Moestl.Dv NULL
118c4a5ef6eSThomas Moestlinstead of a kvm handle as this argument,
119c4a5ef6eSThomas Moestlwhich causes the data to be read via
12028fb27baSJustin T. Gibbs.Xr sysctl 3 .
121c4a5ef6eSThomas MoestlOtherwise, it is read via
122c4a5ef6eSThomas Moestl.Xr kvm 3
123c4a5ef6eSThomas Moestlusing the supplied handle.
124c4a5ef6eSThomas Moestl.Fn devstat_checkversion
125c4a5ef6eSThomas Moestlshould be called with each kvm handle that is going to be used (or with
126c4a5ef6eSThomas Moestl.Dv NULL
127c4a5ef6eSThomas Moestlif
128c4a5ef6eSThomas Moestl.Xr sysctl 3
129c4a5ef6eSThomas Moestlis going to be used).
13028fb27baSJustin T. Gibbs.Pp
131c4a5ef6eSThomas Moestl.Fn devstat_getnumdevs
13228fb27baSJustin T. Gibbsreturns the number of devices registered with the
1333b8ecdbbSRuslan Ermilov.Nm
13428fb27baSJustin T. Gibbssubsystem in the kernel.
13528fb27baSJustin T. Gibbs.Pp
136c4a5ef6eSThomas Moestl.Fn devstat_getgeneration
13728fb27baSJustin T. Gibbsreturns the current generation of the
1383b8ecdbbSRuslan Ermilov.Nm
13928fb27baSJustin T. Gibbslist of devices in the kernel.
14028fb27baSJustin T. Gibbs.Pp
141c4a5ef6eSThomas Moestl.Fn devstat_getversion
14228fb27baSJustin T. Gibbsreturns the current kernel
1433b8ecdbbSRuslan Ermilov.Nm
14428fb27baSJustin T. Gibbsversion.
14528fb27baSJustin T. Gibbs.Pp
146c4a5ef6eSThomas Moestl.Fn devstat_checkversion
147c4a5ef6eSThomas Moestlchecks the userland devstat version against the kernel devstat version.
148c4a5ef6eSThomas MoestlIf the two are identical, it returns zero.
149c4a5ef6eSThomas MoestlOtherwise, it prints an appropriate error in
15028fb27baSJustin T. Gibbs.Va devstat_errbuf
15128fb27baSJustin T. Gibbsand returns -1.
15228fb27baSJustin T. Gibbs.Pp
153c4a5ef6eSThomas Moestl.Fn devstat_getdevs
15428fb27baSJustin T. Gibbsfetches the current list of devices and statistics into the supplied
15528fb27baSJustin T. Gibbs.Va statinfo
156c4a5ef6eSThomas Moestlstructure.
157c4a5ef6eSThomas MoestlThe
15828fb27baSJustin T. Gibbs.Va statinfo
15928fb27baSJustin T. Gibbsstructure can be found in
16028fb27baSJustin T. Gibbs.Aq Pa devstat.h :
16128fb27baSJustin T. Gibbs.Bd -literal -offset indent
16228fb27baSJustin T. Gibbsstruct statinfo {
16328fb27baSJustin T. Gibbs	long            cp_time[CPUSTATES];
16428fb27baSJustin T. Gibbs	long            tk_nin;
16528fb27baSJustin T. Gibbs	long            tk_nout;
16628fb27baSJustin T. Gibbs	struct devinfo  *dinfo;
167b193011aSPoul-Henning Kamp	long double     snap_time;
16828fb27baSJustin T. Gibbs};
16928fb27baSJustin T. Gibbs.Ed
17028fb27baSJustin T. Gibbs.Pp
171c4a5ef6eSThomas Moestl.Fn devstat_getdevs
17228fb27baSJustin T. Gibbsexpects the
17328fb27baSJustin T. Gibbs.Va statinfo
17428fb27baSJustin T. Gibbsstructure to be allocated, and it also expects the
17528fb27baSJustin T. Gibbs.Va dinfo
1766f83979dSKenneth D. Merrysubelement to be allocated and zeroed prior to the first invocation of
177c4a5ef6eSThomas Moestl.Fn devstat_getdevs .
1786f83979dSKenneth D. MerryThe
1796f83979dSKenneth D. Merry.Va dinfo
1806f83979dSKenneth D. Merrysubelement is used to store state between calls, and should not be modified
1816f83979dSKenneth D. Merryafter the first call to
182c4a5ef6eSThomas Moestl.Fn devstat_getdevs .
1836f83979dSKenneth D. MerryThe
18428fb27baSJustin T. Gibbs.Va dinfo
18528fb27baSJustin T. Gibbssubelement contains the following elements:
18628fb27baSJustin T. Gibbs.Bd -literal -offset indent
18728fb27baSJustin T. Gibbsstruct devinfo {
18828fb27baSJustin T. Gibbs	struct devstat	*devices;
18928fb27baSJustin T. Gibbs	u_int8_t	*mem_ptr;
190bcc6a3daSKenneth D. Merry	long		generation;
19128fb27baSJustin T. Gibbs	int		numdevs;
19228fb27baSJustin T. Gibbs};
19328fb27baSJustin T. Gibbs.Ed
19428fb27baSJustin T. Gibbs.Pp
19528fb27baSJustin T. GibbsThe
19628fb27baSJustin T. Gibbs.Va kern.devstat.all
19728fb27baSJustin T. Gibbs.Nm sysctl
19828fb27baSJustin T. Gibbsvariable contains an array of
1993b8ecdbbSRuslan Ermilov.Nm
20028fb27baSJustin T. Gibbsstructures, but at the head of the array is the current
2013b8ecdbbSRuslan Ermilov.Nm
202c4a5ef6eSThomas Moestlgeneration.
203c4a5ef6eSThomas MoestlThe reason the generation is at the head of the buffer is so that userland
204c4a5ef6eSThomas Moestlsoftware accessing the devstat statistics information can atomically get
205c4a5ef6eSThomas Moestlboth the statistics information and the corresponding generation number.
206c4a5ef6eSThomas MoestlIf client software were forced to get the generation number via a separate
20728fb27baSJustin T. Gibbs.Nm sysctl
20828fb27baSJustin T. Gibbsvariable (which is available for convenience), the list of devices could
20928fb27baSJustin T. Gibbschange between the time the client gets the generation and the time the
21028fb27baSJustin T. Gibbsclient gets the device list.
21128fb27baSJustin T. Gibbs.Pp
21228fb27baSJustin T. GibbsThe
21328fb27baSJustin T. Gibbs.Va mem_ptr
21428fb27baSJustin T. Gibbssubelement of the
21528fb27baSJustin T. Gibbs.Va devinfo
21628fb27baSJustin T. Gibbsstructure is a pointer to memory that is allocated, and resized if
21728fb27baSJustin T. Gibbsnecessary, by
218c4a5ef6eSThomas Moestl.Fn devstat_getdevs .
21928fb27baSJustin T. GibbsThe devices subelement of the
22028fb27baSJustin T. Gibbs.Va devinfo
22128fb27baSJustin T. Gibbsstructure is basically a pointer to the beginning of the array of devstat
22228fb27baSJustin T. Gibbsstructures from the
22328fb27baSJustin T. Gibbs.Va kern.devstat.all
22428fb27baSJustin T. Gibbs.Nm sysctl
225c4a5ef6eSThomas Moestlvariable (or the corresponding values read via
226c4a5ef6eSThomas Moestl.Xr kvm 3 ) .
227c4a5ef6eSThomas MoestlThe generation subelement of the
2283b8ecdbbSRuslan Ermilov.Va devinfo
229c4a5ef6eSThomas Moestlstructure contains the corresponding generation number.
23028fb27baSJustin T. GibbsThe
23128fb27baSJustin T. Gibbs.Va numdevs
23228fb27baSJustin T. Gibbssubelement of the
23328fb27baSJustin T. Gibbs.Va devinfo
23428fb27baSJustin T. Gibbsstructure contains the current
23528fb27baSJustin T. Gibbsnumber of devices registered with the kernel
2363b8ecdbbSRuslan Ermilov.Nm
23728fb27baSJustin T. Gibbssubsystem.
23828fb27baSJustin T. Gibbs.Pp
239c4a5ef6eSThomas Moestl.Fn devstat_selectdevs
24028fb27baSJustin T. Gibbsselects devices to display based upon a number of criteria:
24128fb27baSJustin T. Gibbs.Bl -tag -width flag
24228fb27baSJustin T. Gibbs.It specified devices
243c4a5ef6eSThomas MoestlSpecified devices are the first selection priority.
244c4a5ef6eSThomas MoestlThese are generally devices specified by name by the user e.g. da0, da1, cd0.
24528fb27baSJustin T. Gibbs.It match patterns
24628fb27baSJustin T. GibbsThese are pattern matching expressions generated by
247c4a5ef6eSThomas Moestl.Fn devstat_buildmatch
24828fb27baSJustin T. Gibbsfrom user input.
24928fb27baSJustin T. Gibbs.It performance
25028fb27baSJustin T. GibbsIf performance mode is enabled, devices will be sorted based on the
25128fb27baSJustin T. Gibbs.Va bytes
25228fb27baSJustin T. Gibbsfield in the
25328fb27baSJustin T. Gibbs.Va device_selection
25428fb27baSJustin T. Gibbsstructure passed in to
255c4a5ef6eSThomas Moestl.Fn devstat_selectdevs .
25628fb27baSJustin T. GibbsThe
25728fb27baSJustin T. Gibbs.Va bytes
258c4a5ef6eSThomas Moestlvalue currently must be maintained by the user.
259c4a5ef6eSThomas MoestlIn the future, this may be done for him in a
26028fb27baSJustin T. Gibbs.Nm
26128fb27baSJustin T. Gibbslibrary routine.
26228fb27baSJustin T. GibbsIf no devices have been selected by name or by pattern, the performance
26328fb27baSJustin T. Gibbstracking code will select every device in the system, and sort them by
264c4a5ef6eSThomas Moestlperformance.
265c4a5ef6eSThomas MoestlIf devices have been selected by name or pattern, the performance tracking
266c4a5ef6eSThomas Moestlcode will honor those selections and will only sort among the selected
267c4a5ef6eSThomas Moestldevices.
26828fb27baSJustin T. Gibbs.It order in the devstat list
26928fb27baSJustin T. GibbsIf the selection mode is set to DS_SELECT_ADD, and if there are still less
27028fb27baSJustin T. Gibbsthan
27128fb27baSJustin T. Gibbs.Va maxshowdevs
27228fb27baSJustin T. Gibbsdevices selected,
273c4a5ef6eSThomas Moestl.Fn devstat_selectdevs
27428fb27baSJustin T. Gibbswill automatically select up to
27528fb27baSJustin T. Gibbs.Va maxshowdevs
27628fb27baSJustin T. Gibbsdevices.
27728fb27baSJustin T. Gibbs.El
27828fb27baSJustin T. Gibbs.Pp
279c4a5ef6eSThomas Moestl.Fn devstat_selectdevs
28028fb27baSJustin T. Gibbsperforms selections in four different modes:
28128fb27baSJustin T. Gibbs.Bl -tag -width DS_SELECT_ADDONLY
28228fb27baSJustin T. Gibbs.It DS_SELECT_ADD
28328fb27baSJustin T. GibbsIn add mode,
284c4a5ef6eSThomas Moestl.Fn devstat_selectdevs
28528fb27baSJustin T. Gibbswill select any unselected devices specified by name or matching pattern.
28628fb27baSJustin T. GibbsIt will also select more devices, in devstat list order, until the number
28728fb27baSJustin T. Gibbsof selected devices is equal to
28828fb27baSJustin T. Gibbs.Va maxshowdevs
28928fb27baSJustin T. Gibbsor until all devices are
29028fb27baSJustin T. Gibbsselected.
29128fb27baSJustin T. Gibbs.It DS_SELECT_ONLY
29228fb27baSJustin T. GibbsIn only mode,
293c4a5ef6eSThomas Moestl.Fn devstat_selectdevs
29428fb27baSJustin T. Gibbswill clear all current selections, and will only select devices specified
29528fb27baSJustin T. Gibbsby name or by matching pattern.
29628fb27baSJustin T. Gibbs.It DS_SELECT_REMOVE
29728fb27baSJustin T. GibbsIn remove mode,
298c4a5ef6eSThomas Moestl.Fn devstat_selectdevs
299c4a5ef6eSThomas Moestlwill remove devices specified by name or by matching pattern.
300c4a5ef6eSThomas MoestlIt will not select any additional devices.
30128fb27baSJustin T. Gibbs.It DS_SELECT_ADDONLY
30228fb27baSJustin T. GibbsIn add only mode,
303c4a5ef6eSThomas Moestl.Fn devstat_selectdevs
30428fb27baSJustin T. Gibbswill select any unselected devices specified by name or matching pattern.
305c4a5ef6eSThomas MoestlIn this respect it is identical to add mode.
306c4a5ef6eSThomas MoestlIt will not, however, select any devices other than those specified.
30728fb27baSJustin T. Gibbs.El
30828fb27baSJustin T. Gibbs.Pp
30928fb27baSJustin T. GibbsIn all selection modes,
310c4a5ef6eSThomas Moestl.Fn devstat_selectdevs
31128fb27baSJustin T. Gibbswill not select any more than
31228fb27baSJustin T. Gibbs.Va maxshowdevs
313c4a5ef6eSThomas Moestldevices.
314c4a5ef6eSThomas MoestlOne exception to this is when you are in
31528fb27baSJustin T. Gibbs.Dq top
316c4a5ef6eSThomas Moestlmode and no devices have been selected.
317c4a5ef6eSThomas MoestlIn this case,
318c4a5ef6eSThomas Moestl.Fn devstat_selectdevs
319c4a5ef6eSThomas Moestlwill select every device in the system.
320c4a5ef6eSThomas MoestlClient programs must pay attention to selection order when deciding whether
321c4a5ef6eSThomas Moestlto pay attention to a particular device.
322c4a5ef6eSThomas MoestlThis may be the wrong behavior, and probably requires additional thought.
32328fb27baSJustin T. Gibbs.Pp
324c4a5ef6eSThomas Moestl.Fn devstat_selectdevs
32528fb27baSJustin T. Gibbshandles allocation and resizing of the
32628fb27baSJustin T. Gibbs.Va dev_select
32728fb27baSJustin T. Gibbsstructure passed in
32828fb27baSJustin T. Gibbsby the client.
329c4a5ef6eSThomas Moestl.Fn devstat_selectdevs
33028fb27baSJustin T. Gibbsuses the
33128fb27baSJustin T. Gibbs.Va numdevs
33228fb27baSJustin T. Gibbsand
33328fb27baSJustin T. Gibbs.Va current_generation
33428fb27baSJustin T. Gibbsfields to track the
33528fb27baSJustin T. Gibbscurrent
33628fb27baSJustin T. Gibbs.Nm
337c4a5ef6eSThomas Moestlgeneration and number of devices.
338c4a5ef6eSThomas MoestlIf
33928fb27baSJustin T. Gibbs.Va num_selections
34028fb27baSJustin T. Gibbsis not the same
34128fb27baSJustin T. Gibbsas
34228fb27baSJustin T. Gibbs.Va numdevs
34328fb27baSJustin T. Gibbsor if
34428fb27baSJustin T. Gibbs.Va select_generation
34528fb27baSJustin T. Gibbsis not the same as
34628fb27baSJustin T. Gibbs.Va current_generation ,
347c4a5ef6eSThomas Moestl.Fn devstat_selectdevs
34828fb27baSJustin T. Gibbswill resize the selection list as necessary, and re-initialize the
34928fb27baSJustin T. Gibbsselection array.
35028fb27baSJustin T. Gibbs.Pp
351c4a5ef6eSThomas Moestl.Fn devstat_buildmatch
352c4a5ef6eSThomas Moestltake a comma separated match string and compile it into a
35328fb27baSJustin T. Gibbs\fBdevstat_match\fR structure that is understood by
35428fb27baSJustin T. Gibbs.Fn selectdevs .
35528fb27baSJustin T. GibbsMatch strings have the following format:
35628fb27baSJustin T. Gibbs.Pp
35728fb27baSJustin T. Gibbs.Bd -literal -offset indent
35828fb27baSJustin T. Gibbsdevice,type,if
35928fb27baSJustin T. Gibbs.Ed
36028fb27baSJustin T. Gibbs.Pp
361c4a5ef6eSThomas Moestl.Fn devstat_buildmatch
36228fb27baSJustin T. Gibbstakes care of allocating and reallocating the match list as necessary.
36328fb27baSJustin T. GibbsCurrently known match types include:
36428fb27baSJustin T. Gibbs.Pp
36528fb27baSJustin T. Gibbs.Bl -tag -width indent -compact
36628fb27baSJustin T. Gibbs.It device type:
36742635956SRuslan Ermilov.Bl -tag -width 9n -compact
36828fb27baSJustin T. Gibbs.It da
36928fb27baSJustin T. GibbsDirect Access devices
37028fb27baSJustin T. Gibbs.It sa
37128fb27baSJustin T. GibbsSequential Access devices
37228fb27baSJustin T. Gibbs.It printer
37328fb27baSJustin T. GibbsPrinters
37428fb27baSJustin T. Gibbs.It proc
37528fb27baSJustin T. GibbsProcessor devices
37628fb27baSJustin T. Gibbs.It worm
37728fb27baSJustin T. GibbsWrite Once Read Multiple devices
37828fb27baSJustin T. Gibbs.It cd
37928fb27baSJustin T. GibbsCD devices
38028fb27baSJustin T. Gibbs.It scanner
38128fb27baSJustin T. GibbsScanner devices
38228fb27baSJustin T. Gibbs.It optical
38328fb27baSJustin T. GibbsOptical Memory devices
38428fb27baSJustin T. Gibbs.It changer
38528fb27baSJustin T. GibbsMedium Changer devices
38628fb27baSJustin T. Gibbs.It comm
38728fb27baSJustin T. GibbsCommunication devices
38828fb27baSJustin T. Gibbs.It array
38928fb27baSJustin T. GibbsStorage Array devices
39028fb27baSJustin T. Gibbs.It enclosure
39128fb27baSJustin T. GibbsEnclosure Services devices
39228fb27baSJustin T. Gibbs.It floppy
39328fb27baSJustin T. GibbsFloppy devices
39428fb27baSJustin T. Gibbs.El
39528fb27baSJustin T. Gibbs.Pp
39628fb27baSJustin T. Gibbs.It interface:
39742635956SRuslan Ermilov.Bl -tag -width 9n -compact
39828fb27baSJustin T. Gibbs.It IDE
39928fb27baSJustin T. GibbsIntegrated Drive Electronics devices
40028fb27baSJustin T. Gibbs.It SCSI
40128fb27baSJustin T. GibbsSmall Computer System Interface devices
40228fb27baSJustin T. Gibbs.It other
40328fb27baSJustin T. GibbsAny other device interface
40428fb27baSJustin T. Gibbs.El
40528fb27baSJustin T. Gibbs.Pp
40628fb27baSJustin T. Gibbs.It passthrough:
40742635956SRuslan Ermilov.Bl -tag -width 9n -compact
40828fb27baSJustin T. Gibbs.It pass
40928fb27baSJustin T. GibbsPassthrough devices
41028fb27baSJustin T. Gibbs.El
41128fb27baSJustin T. Gibbs.El
41228fb27baSJustin T. Gibbs.Pp
413c4a5ef6eSThomas Moestl.Fn devstat_compute_statistics
414c4a5ef6eSThomas Moestlis an updated version of
41528fb27baSJustin T. Gibbs.Fn compute_stats
416c4a5ef6eSThomas Moestlthat provides more complete statistics calculation.
417c4a5ef6eSThomas MoestlThere are four arguments for which values \fBmust\fR be supplied:
418c4a5ef6eSThomas Moestl.Va current ,
419c4a5ef6eSThomas Moestl.Va previous ,
420c4a5ef6eSThomas Moestl.Va etime ,
421c4a5ef6eSThomas Moestland the terminating argument for the varargs list,
422c4a5ef6eSThomas Moestl.Va DSM_NONE .
423c4a5ef6eSThomas MoestlFor most applications, the user will want to supply valid devstat
424c4a5ef6eSThomas Moestlstructures for both
425c4a5ef6eSThomas Moestl.Va current
426c4a5ef6eSThomas Moestland
427c4a5ef6eSThomas Moestl.Va previous .
428c4a5ef6eSThomas MoestlIn some instances, for instance when calculating statistics since system
429c4a5ef6eSThomas Moestlboot, the user may pass in a NULL pointer for the
430c4a5ef6eSThomas Moestl.Va previous
431c4a5ef6eSThomas Moestlargument.
432c4a5ef6eSThomas MoestlIn that case,
433c4a5ef6eSThomas Moestl.Fn devstat_compute_statistics
434c4a5ef6eSThomas Moestlwill use the total stats in the
435c4a5ef6eSThomas Moestl.Va current
436c4a5ef6eSThomas Moestlstructure to calculate statistics over
437c4a5ef6eSThomas Moestl.Va etime .
438c4a5ef6eSThomas MoestlFor each statistic to be calculated, the user should supply the proper
439c4a5ef6eSThomas Moestlenumerated type (listed below), and a variable of the indicated type.
440c4a5ef6eSThomas MoestlAll statistics are either integer values, for which a u_int64_t is used,
441c4a5ef6eSThomas Moestlor floating point, for which a long double is used.
442c4a5ef6eSThomas MoestlThe statistics that may be calculated are:
443c4a5ef6eSThomas Moestl.Bl -tag -width DSM_TRANSFERS_PER_SECOND_OTHER
444c4a5ef6eSThomas Moestl.It DSM_NONE
445c4a5ef6eSThomas Moestltype: N/A
446c4a5ef6eSThomas Moestl.Pp
447c4a5ef6eSThomas MoestlThis \fBmust\fR
448c4a5ef6eSThomas Moestlbe the last argument passed to
449c4a5ef6eSThomas Moestl.Fn devstat_compute_statistics .
450c4a5ef6eSThomas MoestlIt is an argument list terminator.
451c4a5ef6eSThomas Moestl.It DSM_TOTAL_BYTES
452c4a5ef6eSThomas Moestltype: u_int64_t *
453c4a5ef6eSThomas Moestl.Pp
454c4a5ef6eSThomas MoestlThe total number of bytes transferred between the acquisition of
455c4a5ef6eSThomas Moestl.Va previous
456c4a5ef6eSThomas Moestland
457c4a5ef6eSThomas Moestl.Va current .
458c4a5ef6eSThomas Moestl.It DSM_TOTAL_BYTES_READ
459c4a5ef6eSThomas Moestl.It DSM_TOTAL_BYTES_WRITE
460b193011aSPoul-Henning Kamp.It DSM_TOTAL_BYTES_FREE
461c4a5ef6eSThomas Moestltype: u_int64_t *
462c4a5ef6eSThomas Moestl.Pp
463b193011aSPoul-Henning KampThe total number of bytes in transactions of the specified type
464b193011aSPoul-Henning Kampbetween the acquisition of
465c4a5ef6eSThomas Moestl.Va previous
466c4a5ef6eSThomas Moestland
467c4a5ef6eSThomas Moestl.Va current .
468c4a5ef6eSThomas Moestl.It DSM_TOTAL_TRANSFERS
469c4a5ef6eSThomas Moestltype: u_int64_t *
470c4a5ef6eSThomas Moestl.Pp
471c4a5ef6eSThomas MoestlThe total number of transfers between the acquisition of
472c4a5ef6eSThomas Moestl.Va previous
473c4a5ef6eSThomas Moestland
474c4a5ef6eSThomas Moestl.Va current .
475c4a5ef6eSThomas Moestl.It DSM_TOTAL_TRANSFERS_OTHER
476b193011aSPoul-Henning Kamp.It DSM_TOTAL_TRANSFERS_READ
477b193011aSPoul-Henning Kamp.It DSM_TOTAL_TRANSFERS_WRITE
478b193011aSPoul-Henning Kamp.It DSM_TOTAL_TRANSFERS_FREE
479c4a5ef6eSThomas Moestltype: u_int64_t *
480c4a5ef6eSThomas Moestl.Pp
481b193011aSPoul-Henning KampThe total number of transactions of the specified type between
482b193011aSPoul-Henning Kampthe acquisition of
483c4a5ef6eSThomas Moestl.Va previous
484c4a5ef6eSThomas Moestland
485c4a5ef6eSThomas Moestl.Va current .
486c4a5ef6eSThomas Moestl.It DSM_TOTAL_BLOCKS
487c4a5ef6eSThomas Moestltype: u_int64_t *
488c4a5ef6eSThomas Moestl.Pp
489c4a5ef6eSThomas MoestlThe total number of blocks transferred between the acquisition of
490c4a5ef6eSThomas Moestl.Va previous
491c4a5ef6eSThomas Moestland
492c4a5ef6eSThomas Moestl.Va current .
493c4a5ef6eSThomas MoestlThis number is in terms of the blocksize reported by the device.
494c4a5ef6eSThomas MoestlIf no blocksize has been reported (i.e. the block size is 0), a default
495c4a5ef6eSThomas Moestlblocksize of 512 bytes will be used in the calculation.
496c4a5ef6eSThomas Moestl.It DSM_TOTAL_BLOCKS_READ
497c4a5ef6eSThomas Moestl.It DSM_TOTAL_BLOCKS_WRITE
498b193011aSPoul-Henning Kamp.It DSM_TOTAL_BLOCKS_FREE
499c4a5ef6eSThomas Moestltype: u_int64_t *
500c4a5ef6eSThomas Moestl.Pp
501b193011aSPoul-Henning KampThe total number of blocks of the specified type between the acquisition of
502c4a5ef6eSThomas Moestl.Va previous
503c4a5ef6eSThomas Moestland
504c4a5ef6eSThomas Moestl.Va current .
505c4a5ef6eSThomas MoestlThis number is in terms of the blocksize reported by the device.
506c4a5ef6eSThomas MoestlIf no blocksize has been reported (i.e. the block size is 0), a default
507c4a5ef6eSThomas Moestlblocksize of 512 bytes will be used in the calculation.
508c4a5ef6eSThomas Moestl.It DSM_KB_PER_TRANSFER
509c4a5ef6eSThomas Moestltype: long double *
510c4a5ef6eSThomas Moestl.Pp
511c4a5ef6eSThomas MoestlThe average number of kilobytes per transfer between the acquisition of
512c4a5ef6eSThomas Moestl.Va previous
513c4a5ef6eSThomas Moestland
514c4a5ef6eSThomas Moestl.Va current .
515c4a5ef6eSThomas Moestl.It DSM_KB_PER_TRANSFER_READ
516c4a5ef6eSThomas Moestl.It DSM_KB_PER_TRANSFER_WRITE
517b193011aSPoul-Henning Kamp.It DSM_KB_PER_TRANSFER_FREE
518c4a5ef6eSThomas Moestltype: long double *
519c4a5ef6eSThomas Moestl.Pp
520b193011aSPoul-Henning KampThe average number of kilobytes in the specified type transaction between
521b193011aSPoul-Henning Kampthe acquisition of
522c4a5ef6eSThomas Moestl.Va previous
523c4a5ef6eSThomas Moestland
524c4a5ef6eSThomas Moestl.Va current .
525c4a5ef6eSThomas Moestl.It DSM_TRANSFERS_PER_SECOND
526c4a5ef6eSThomas Moestltype: long double *
527c4a5ef6eSThomas Moestl.Pp
528c4a5ef6eSThomas MoestlThe average number of transfers per second between the acquisition of
529c4a5ef6eSThomas Moestl.Va previous
530c4a5ef6eSThomas Moestland
531c4a5ef6eSThomas Moestl.Va current .
532c4a5ef6eSThomas Moestl.It DSM_TRANSFERS_PER_SECOND_OTHER
533b193011aSPoul-Henning Kamp.It DSM_TRANSFERS_PER_SECOND_READ
534b193011aSPoul-Henning Kamp.It DSM_TRANSFERS_PER_SECOND_WRITE
535b193011aSPoul-Henning Kamp.It DSM_TRANSFERS_PER_SECOND_FREE
536c4a5ef6eSThomas Moestltype: long double *
537c4a5ef6eSThomas Moestl.Pp
538b193011aSPoul-Henning KampThe average number of transactions of the specified type per second
539b193011aSPoul-Henning Kampbetween the acquisition of
540c4a5ef6eSThomas Moestl.Va previous
541c4a5ef6eSThomas Moestland
542c4a5ef6eSThomas Moestl.Va current .
543c4a5ef6eSThomas Moestl.It DSM_MB_PER_SECOND
544c4a5ef6eSThomas Moestltype: long double *
545c4a5ef6eSThomas Moestl.Pp
546c4a5ef6eSThomas MoestlThe average number of megabytes transferred per second between the
547c4a5ef6eSThomas Moestlacquisition of
548c4a5ef6eSThomas Moestl.Va previous
549c4a5ef6eSThomas Moestland
550c4a5ef6eSThomas Moestl.Va current .
551c4a5ef6eSThomas Moestl.It DSM_MB_PER_SECOND_READ
552c4a5ef6eSThomas Moestl.It DSM_MB_PER_SECOND_WRITE
553b193011aSPoul-Henning Kamp.It DSM_MB_PER_SECOND_FREE
554c4a5ef6eSThomas Moestltype: long double *
555c4a5ef6eSThomas Moestl.Pp
556b193011aSPoul-Henning KampThe average number of megabytes per second in the specified type of
557b193011aSPoul-Henning Kamptransaction between the acquisition of
558c4a5ef6eSThomas Moestl.Va previous
559c4a5ef6eSThomas Moestland
560c4a5ef6eSThomas Moestl.Va current .
561c4a5ef6eSThomas Moestl.It DSM_BLOCKS_PER_SECOND
562c4a5ef6eSThomas Moestltype: long double *
563c4a5ef6eSThomas Moestl.Pp
564c4a5ef6eSThomas MoestlThe average number of blocks transferred per second between the acquisition of
565c4a5ef6eSThomas Moestl.Va previous
566c4a5ef6eSThomas Moestland
567c4a5ef6eSThomas Moestl.Va current .
568c4a5ef6eSThomas MoestlThis number is in terms of the blocksize reported by the device.
569c4a5ef6eSThomas MoestlIf no blocksize has been reported (i.e. the block size is 0), a default
570c4a5ef6eSThomas Moestlblocksize of 512 bytes will be used in the calculation.
571c4a5ef6eSThomas Moestl.It DSM_BLOCKS_PER_SECOND_READ
572c4a5ef6eSThomas Moestl.It DSM_BLOCKS_PER_SECOND_WRITE
573b193011aSPoul-Henning Kamp.It DSM_BLOCKS_PER_SECOND_FREE
574c4a5ef6eSThomas Moestltype: long double *
575c4a5ef6eSThomas Moestl.Pp
576b193011aSPoul-Henning KampThe average number of blocks per second in the specificed type of transaction
577b193011aSPoul-Henning Kampbetween the acquisition of
578c4a5ef6eSThomas Moestl.Va previous
579c4a5ef6eSThomas Moestland
580c4a5ef6eSThomas Moestl.Va current .
581c4a5ef6eSThomas MoestlThis number is in terms of the blocksize reported by the device.
582c4a5ef6eSThomas MoestlIf no blocksize has been reported (i.e. the block size is 0), a default
583c4a5ef6eSThomas Moestlblocksize of 512 bytes will be used in the calculation.
584c4a5ef6eSThomas Moestl.It DSM_MS_PER_TRANSACTION
585c4a5ef6eSThomas Moestltype: long double *
586c4a5ef6eSThomas Moestl.Pp
587b193011aSPoul-Henning KampThe average duration of transactions between the acquisition of
588c4a5ef6eSThomas Moestl.Va previous
589c4a5ef6eSThomas Moestland
590c4a5ef6eSThomas Moestl.Va current .
591b193011aSPoul-Henning Kamp.It DSM_MS_PER_TRANSACTION_OTHER
592c4a5ef6eSThomas Moestl.It DSM_MS_PER_TRANSACTION_READ
593c4a5ef6eSThomas Moestl.It DSM_MS_PER_TRANSACTION_WRITE
594b193011aSPoul-Henning Kamp.It DSM_MS_PER_TRANSACTION_FREE
595c4a5ef6eSThomas Moestltype: long double *
596c4a5ef6eSThomas Moestl.Pp
597b193011aSPoul-Henning KampThe average duration of transactions of the specified type between the
598b193011aSPoul-Henning Kampacquisition of
599c4a5ef6eSThomas Moestl.Va previous
600c4a5ef6eSThomas Moestland
601c4a5ef6eSThomas Moestl.Va current .
602b193011aSPoul-Henning Kamp.It DSM_BUSY_PCT
6033a5146d9SRuslan Ermilovtype: long double *
604b193011aSPoul-Henning Kamp.Pp
605b193011aSPoul-Henning KampThe percentage of time the device had one or more transactions outstanding
606b193011aSPoul-Henning Kampbetween the acquisition of
607b193011aSPoul-Henning Kamp.Va previous
608b193011aSPoul-Henning Kampand
609b193011aSPoul-Henning Kamp.Va current .
610b193011aSPoul-Henning Kamp.It DSM_QUEUE_LENGTH
611b193011aSPoul-Henning Kamptype: u_int64_t *
612b193011aSPoul-Henning Kamp.Pp
613b193011aSPoul-Henning KampThe number of not yet completed transactions at the time when
614b193011aSPoul-Henning Kamp.Va current
615b193011aSPoul-Henning Kampwas acquired.
616884539f7SKenneth D. Merry.It DSM_SKIP
617884539f7SKenneth D. Merrytype: N/A
618884539f7SKenneth D. Merry.Pp
619884539f7SKenneth D. MerryIf you do not need a result from
620884539f7SKenneth D. Merry.Fn devstat_compute_statistics ,
621884539f7SKenneth D. Merryjust put
622884539f7SKenneth D. Merry.Va DSM_SKIP
623884539f7SKenneth D. Merryas first (type) parameter and
624884539f7SKenneth D. Merry.Va NULL
625884539f7SKenneth D. Merryas second parameter.
626884539f7SKenneth D. MerryThis can be useful in scenarios where the statistics to be calculated
627884539f7SKenneth D. Merryare determined at run time.
628c4a5ef6eSThomas Moestl.El
629c4a5ef6eSThomas Moestl.Pp
630c4a5ef6eSThomas Moestl.Fn devstat_compute_etime
63128fb27baSJustin T. Gibbsprovides an easy way to find the difference in seconds between two
632b193011aSPoul-Henning Kamp.Va bintime
633c4a5ef6eSThomas Moestlstructures.
634c4a5ef6eSThomas MoestlThis is most commonly used in conjunction with the time recorded by the
635c4a5ef6eSThomas Moestl.Fn devstat_getdevs
63628fb27baSJustin T. Gibbsfunction (in struct
63728fb27baSJustin T. Gibbs.Va statinfo )
63828fb27baSJustin T. Gibbseach time it fetches the current
63928fb27baSJustin T. Gibbs.Nm
64028fb27baSJustin T. Gibbslist.
64128fb27baSJustin T. Gibbs.Sh RETURN VALUES
642c4a5ef6eSThomas Moestl.Fn devstat_getnumdevs ,
643c4a5ef6eSThomas Moestl.Fn devstat_getgeneration ,
64428fb27baSJustin T. Gibbsand
645c4a5ef6eSThomas Moestl.Fn devstat_getversion
64628fb27baSJustin T. Gibbsreturn the indicated \fBsysctl\fR variable, or -1 if there is an error
64728fb27baSJustin T. Gibbsfetching the variable.
64828fb27baSJustin T. Gibbs.Pp
649c4a5ef6eSThomas Moestl.Fn devstat_checkversion
65028fb27baSJustin T. Gibbsreturns 0 if the kernel and userland
6513b8ecdbbSRuslan Ermilov.Nm
652c4a5ef6eSThomas Moestlversions match.
653c4a5ef6eSThomas MoestlIf they do not match, it returns -1.
65428fb27baSJustin T. Gibbs.Pp
655c4a5ef6eSThomas Moestl.Fn devstat_getdevs
65628fb27baSJustin T. Gibbsand
657c4a5ef6eSThomas Moestl.Fn devstat_selectdevs
65828fb27baSJustin T. Gibbsreturn -1 in case of an error, 0 if there is no error and 1 if the device
659c4a5ef6eSThomas Moestllist or selected devices have changed.
660c4a5ef6eSThomas MoestlA return value of 1 from
661c4a5ef6eSThomas Moestl.Fn devstat_getdevs
66228fb27baSJustin T. Gibbsis usually a hint to re-run
663c4a5ef6eSThomas Moestl.Fn devstat_selectdevs
66428fb27baSJustin T. Gibbsbecause the device list has changed.
66528fb27baSJustin T. Gibbs.Pp
666c4a5ef6eSThomas Moestl.Fn devstat_buildmatch
66728fb27baSJustin T. Gibbsreturns -1 for error, and 0 if there is no error.
66828fb27baSJustin T. Gibbs.Pp
669c4a5ef6eSThomas Moestl.Fn devstat_compute_etime
67028fb27baSJustin T. Gibbsreturns the computed elapsed time.
67128fb27baSJustin T. Gibbs.Pp
672c4a5ef6eSThomas Moestl.Fn devstat_compute_statistics
673c4a5ef6eSThomas Moestlreturns -1 for error, and 0 for success.
674c4a5ef6eSThomas Moestl.Pp
67528fb27baSJustin T. GibbsIf an error is returned from one of the
67628fb27baSJustin T. Gibbs.Nm
67728fb27baSJustin T. Gibbslibrary functions, the reason for the error is generally printed in
67828fb27baSJustin T. Gibbsthe global string
67928fb27baSJustin T. Gibbs.Va devstat_errbuf
68028fb27baSJustin T. Gibbswhich is
68128fb27baSJustin T. Gibbs.Dv DEVSTAT_ERRBUF_SIZE
68228fb27baSJustin T. Gibbscharacters long.
68328fb27baSJustin T. Gibbs.Sh SEE ALSO
68428fb27baSJustin T. Gibbs.Xr systat 1 ,
685c4a5ef6eSThomas Moestl.Xr kvm 3 ,
686c4a5ef6eSThomas Moestl.Xr sysctl 3 ,
68728fb27baSJustin T. Gibbs.Xr iostat 8 ,
68828fb27baSJustin T. Gibbs.Xr rpc.rstatd 8 ,
689265c01dfSRuslan Ermilov.Xr sysctl 8 ,
69028fb27baSJustin T. Gibbs.Xr vmstat 8 ,
69128fb27baSJustin T. Gibbs.Xr devstat 9
69228fb27baSJustin T. Gibbs.Sh HISTORY
69328fb27baSJustin T. GibbsThe
69428fb27baSJustin T. Gibbs.Nm
69528fb27baSJustin T. Gibbsstatistics system first appeared in
69628fb27baSJustin T. Gibbs.Fx 3.0 .
697c4a5ef6eSThomas MoestlThe new interface (the functions prefixed with devstat_) first appeared in
698c4a5ef6eSThomas Moestl.Fx 5.0 .
69928fb27baSJustin T. Gibbs.Sh AUTHORS
700d0353b83SRuslan Ermilov.An Kenneth Merry Aq ken@FreeBSD.org
70128fb27baSJustin T. Gibbs.Sh BUGS
70228fb27baSJustin T. GibbsThere should probably be an interface to de-allocate memory allocated by
703c4a5ef6eSThomas Moestl.Fn devstat_getdevs ,
704c4a5ef6eSThomas Moestl.Fn devstat_selectdevs ,
70528fb27baSJustin T. Gibbsand
706c4a5ef6eSThomas Moestl.Fn devstat_buildmatch .
70728fb27baSJustin T. Gibbs.Pp
708c4a5ef6eSThomas Moestl.Fn devstat_selectdevs
70928fb27baSJustin T. Gibbsshould probably not select more than
71028fb27baSJustin T. Gibbs.Va maxshowdevs
71128fb27baSJustin T. Gibbsdevices in
71228fb27baSJustin T. Gibbs.Dq top
71328fb27baSJustin T. Gibbsmode when no devices have been selected previously.
71428fb27baSJustin T. Gibbs.Pp
71528fb27baSJustin T. GibbsThere should probably be functions to perform the statistics buffer
71628fb27baSJustin T. Gibbsswapping that goes on in most of the clients of this library.
71728fb27baSJustin T. Gibbs.Pp
71828fb27baSJustin T. GibbsThe
71928fb27baSJustin T. Gibbs.Va statinfo
72028fb27baSJustin T. Gibbsand
72128fb27baSJustin T. Gibbs.Va devinfo
72228fb27baSJustin T. Gibbsstructures should probably be cleaned up and thought out a little more.
723