Deleted Added
full compact
devstat.3 (210823) devstat.3 (231564)
1.\"
2.\" Copyright (c) 1998, 1999, 2001 Kenneth D. Merry.
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
1.\"
2.\" Copyright (c) 1998, 1999, 2001 Kenneth D. Merry.
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.\" $FreeBSD: head/lib/libdevstat/devstat.3 210823 2010-08-03 17:40:09Z joel $
28.\" $FreeBSD: head/lib/libdevstat/devstat.3 231564 2012-02-12 18:29:56Z ed $
29.\"
30.Dd March 18, 2003
31.Dt DEVSTAT 3
32.Os
33.Sh NAME
34.Nm devstat ,
35.Nm devstat_getnumdevs ,
36.Nm devstat_getgeneration ,

--- 151 unchanged lines hidden (view full) ---

188after the first call to
189.Fn devstat_getdevs .
190The
191.Va dinfo
192subelement contains the following elements:
193.Bd -literal -offset indent
194struct devinfo {
195 struct devstat *devices;
29.\"
30.Dd March 18, 2003
31.Dt DEVSTAT 3
32.Os
33.Sh NAME
34.Nm devstat ,
35.Nm devstat_getnumdevs ,
36.Nm devstat_getgeneration ,

--- 151 unchanged lines hidden (view full) ---

188after the first call to
189.Fn devstat_getdevs .
190The
191.Va dinfo
192subelement contains the following elements:
193.Bd -literal -offset indent
194struct devinfo {
195 struct devstat *devices;
196 u_int8_t *mem_ptr;
196 uint8_t *mem_ptr;
197 long generation;
198 int numdevs;
199};
200.Ed
201.Pp
202The
203.Va kern.devstat.all
204.Xr sysctl 8

--- 262 unchanged lines hidden (view full) ---

467.Fn devstat_compute_statistics
468will use the total stats in the
469.Fa current
470structure to calculate statistics over
471.Fa etime .
472For each statistics to be calculated, the user should supply the proper
473enumerated type (listed below), and a variable of the indicated type.
474All statistics are either integer values, for which a
197 long generation;
198 int numdevs;
199};
200.Ed
201.Pp
202The
203.Va kern.devstat.all
204.Xr sysctl 8

--- 262 unchanged lines hidden (view full) ---

467.Fn devstat_compute_statistics
468will use the total stats in the
469.Fa current
470structure to calculate statistics over
471.Fa etime .
472For each statistics to be calculated, the user should supply the proper
473enumerated type (listed below), and a variable of the indicated type.
474All statistics are either integer values, for which a
475.Vt u_int64_t
475.Vt uint64_t
476is used,
477or floating point, for which a
478.Vt "long double"
479is used.
480The statistics that may be calculated are:
481.Bl -tag -width ".Dv DSM_TRANSFERS_PER_SECOND_OTHER"
482.It Dv DSM_NONE
483type: N/A
484.Pp
485This
486.Em must
487be the last argument passed to
488.Fn devstat_compute_statistics .
489It is an argument list terminator.
490.It Dv DSM_TOTAL_BYTES
491type:
476is used,
477or floating point, for which a
478.Vt "long double"
479is used.
480The statistics that may be calculated are:
481.Bl -tag -width ".Dv DSM_TRANSFERS_PER_SECOND_OTHER"
482.It Dv DSM_NONE
483type: N/A
484.Pp
485This
486.Em must
487be the last argument passed to
488.Fn devstat_compute_statistics .
489It is an argument list terminator.
490.It Dv DSM_TOTAL_BYTES
491type:
492.Vt "u_int64_t *"
492.Vt "uint64_t *"
493.Pp
494The total number of bytes transferred between the acquisition of
495.Fa previous
496and
497.Fa current .
498.It Dv DSM_TOTAL_BYTES_READ
499.It Dv DSM_TOTAL_BYTES_WRITE
500.It Dv DSM_TOTAL_BYTES_FREE
501type:
493.Pp
494The total number of bytes transferred between the acquisition of
495.Fa previous
496and
497.Fa current .
498.It Dv DSM_TOTAL_BYTES_READ
499.It Dv DSM_TOTAL_BYTES_WRITE
500.It Dv DSM_TOTAL_BYTES_FREE
501type:
502.Vt "u_int64_t *"
502.Vt "uint64_t *"
503.Pp
504The total number of bytes in transactions of the specified type
505between the acquisition of
506.Fa previous
507and
508.Fa current .
509.It Dv DSM_TOTAL_TRANSFERS
510type:
503.Pp
504The total number of bytes in transactions of the specified type
505between the acquisition of
506.Fa previous
507and
508.Fa current .
509.It Dv DSM_TOTAL_TRANSFERS
510type:
511.Vt "u_int64_t *"
511.Vt "uint64_t *"
512.Pp
513The total number of transfers between the acquisition of
514.Fa previous
515and
516.Fa current .
517.It Dv DSM_TOTAL_TRANSFERS_OTHER
518.It Dv DSM_TOTAL_TRANSFERS_READ
519.It Dv DSM_TOTAL_TRANSFERS_WRITE
520.It Dv DSM_TOTAL_TRANSFERS_FREE
521type:
512.Pp
513The total number of transfers between the acquisition of
514.Fa previous
515and
516.Fa current .
517.It Dv DSM_TOTAL_TRANSFERS_OTHER
518.It Dv DSM_TOTAL_TRANSFERS_READ
519.It Dv DSM_TOTAL_TRANSFERS_WRITE
520.It Dv DSM_TOTAL_TRANSFERS_FREE
521type:
522.Vt "u_int64_t *"
522.Vt "uint64_t *"
523.Pp
524The total number of transactions of the specified type between
525the acquisition of
526.Fa previous
527and
528.Fa current .
529.It Dv DSM_TOTAL_BLOCKS
530type:
523.Pp
524The total number of transactions of the specified type between
525the acquisition of
526.Fa previous
527and
528.Fa current .
529.It Dv DSM_TOTAL_BLOCKS
530type:
531.Vt "u_int64_t *"
531.Vt "uint64_t *"
532.Pp
533The total number of blocks transferred between the acquisition of
534.Fa previous
535and
536.Fa current .
537This number is in terms of the blocksize reported by the device.
538If no blocksize has been reported (i.e., the block size is 0), a default
539blocksize of 512 bytes will be used in the calculation.
540.It Dv DSM_TOTAL_BLOCKS_READ
541.It Dv DSM_TOTAL_BLOCKS_WRITE
542.It Dv DSM_TOTAL_BLOCKS_FREE
543type:
532.Pp
533The total number of blocks transferred between the acquisition of
534.Fa previous
535and
536.Fa current .
537This number is in terms of the blocksize reported by the device.
538If no blocksize has been reported (i.e., the block size is 0), a default
539blocksize of 512 bytes will be used in the calculation.
540.It Dv DSM_TOTAL_BLOCKS_READ
541.It Dv DSM_TOTAL_BLOCKS_WRITE
542.It Dv DSM_TOTAL_BLOCKS_FREE
543type:
544.Vt "u_int64_t *"
544.Vt "uint64_t *"
545.Pp
546The total number of blocks of the specified type between the acquisition of
547.Fa previous
548and
549.Fa current .
550This number is in terms of the blocksize reported by the device.
551If no blocksize has been reported (i.e., the block size is 0), a default
552blocksize of 512 bytes will be used in the calculation.

--- 107 unchanged lines hidden (view full) ---

660.Pp
661The percentage of time the device had one or more transactions outstanding
662between the acquisition of
663.Fa previous
664and
665.Fa current .
666.It Dv DSM_QUEUE_LENGTH
667type:
545.Pp
546The total number of blocks of the specified type between the acquisition of
547.Fa previous
548and
549.Fa current .
550This number is in terms of the blocksize reported by the device.
551If no blocksize has been reported (i.e., the block size is 0), a default
552blocksize of 512 bytes will be used in the calculation.

--- 107 unchanged lines hidden (view full) ---

660.Pp
661The percentage of time the device had one or more transactions outstanding
662between the acquisition of
663.Fa previous
664and
665.Fa current .
666.It Dv DSM_QUEUE_LENGTH
667type:
668.Vt "u_int64_t *"
668.Vt "uint64_t *"
669.Pp
670The number of not yet completed transactions at the time when
671.Fa current
672was acquired.
673.It Dv DSM_SKIP
674type: N/A
675.Pp
676If you do not need a result from

--- 119 unchanged lines hidden ---
669.Pp
670The number of not yet completed transactions at the time when
671.Fa current
672was acquired.
673.It Dv DSM_SKIP
674type: N/A
675.Pp
676If you do not need a result from

--- 119 unchanged lines hidden ---