xref: /dflybsd-src/share/man/man4/aperf.4 (revision fb3c2c0caaaa0e5d800e088b7dd7983e9ab009ec)
1*d5d72874SSepherosa Ziehau.\"
2*d5d72874SSepherosa Ziehau.\" Copyright (c) 2015 The DragonFly Project.  All rights reserved.
3*d5d72874SSepherosa Ziehau.\"
4*d5d72874SSepherosa Ziehau.\" Redistribution and use in source and binary forms, with or without
5*d5d72874SSepherosa Ziehau.\" modification, are permitted provided that the following conditions
6*d5d72874SSepherosa Ziehau.\" are met:
7*d5d72874SSepherosa Ziehau.\"
8*d5d72874SSepherosa Ziehau.\" 1. Redistributions of source code must retain the above copyright
9*d5d72874SSepherosa Ziehau.\"    notice, this list of conditions and the following disclaimer.
10*d5d72874SSepherosa Ziehau.\" 2. Redistributions in binary form must reproduce the above copyright
11*d5d72874SSepherosa Ziehau.\"    notice, this list of conditions and the following disclaimer in
12*d5d72874SSepherosa Ziehau.\"    the documentation and/or other materials provided with the
13*d5d72874SSepherosa Ziehau.\"    distribution.
14*d5d72874SSepherosa Ziehau.\" 3. Neither the name of The DragonFly Project nor the names of its
15*d5d72874SSepherosa Ziehau.\"    contributors may be used to endorse or promote products derived
16*d5d72874SSepherosa Ziehau.\"    from this software without specific, prior written permission.
17*d5d72874SSepherosa Ziehau.\"
18*d5d72874SSepherosa Ziehau.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19*d5d72874SSepherosa Ziehau.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20*d5d72874SSepherosa Ziehau.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21*d5d72874SSepherosa Ziehau.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
22*d5d72874SSepherosa Ziehau.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23*d5d72874SSepherosa Ziehau.\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
24*d5d72874SSepherosa Ziehau.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25*d5d72874SSepherosa Ziehau.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26*d5d72874SSepherosa Ziehau.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27*d5d72874SSepherosa Ziehau.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
28*d5d72874SSepherosa Ziehau.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29*d5d72874SSepherosa Ziehau.\" SUCH DAMAGE.
30*d5d72874SSepherosa Ziehau.\"
31*d5d72874SSepherosa Ziehau.Dd July 11, 2015
32*d5d72874SSepherosa Ziehau.Dt APERF 4
33*d5d72874SSepherosa Ziehau.Os
34*d5d72874SSepherosa Ziehau.Sh NAME
35*d5d72874SSepherosa Ziehau.Nm aperf
36*d5d72874SSepherosa Ziehau.Nd driver measuring effective CPU frequency via APERF/MPERF MSRs
37*d5d72874SSepherosa Ziehau.Sh SYNOPSIS
38*d5d72874SSepherosa ZiehauTo compile this driver into the kernel,
39*d5d72874SSepherosa Ziehauplace the following lines in your kernel configuration file:
40*d5d72874SSepherosa Ziehau.Bd -ragged -offset indent
41*d5d72874SSepherosa Ziehau.Cd "device aperf"
42*d5d72874SSepherosa Ziehau.Ed
43*d5d72874SSepherosa Ziehau.Pp
44*d5d72874SSepherosa ZiehauAlternatively, to load the driver as a
45*d5d72874SSepherosa Ziehaumodule at boot time, place the following line in
46*d5d72874SSepherosa Ziehau.Xr loader.conf 5 :
47*d5d72874SSepherosa Ziehau.Bd -literal -offset indent
48*d5d72874SSepherosa Ziehauaperf_load="YES"
49*d5d72874SSepherosa Ziehau.Ed
50*d5d72874SSepherosa Ziehau.Sh DESCRIPTION
51*d5d72874SSepherosa ZiehauThe
52*d5d72874SSepherosa Ziehau.Nm
53*d5d72874SSepherosa Ziehaudriver provides support for measuring the effective CPU frequency, using the
54*d5d72874SSepherosa ZiehauAPERF and MPERF MSRs.
55*d5d72874SSepherosa ZiehauThe values are exposed through the
56*d5d72874SSepherosa Ziehau.Dv HW_SENSORS
57*d5d72874SSepherosa Ziehau.Xr sysctl 3
58*d5d72874SSepherosa Ziehautree.
59*d5d72874SSepherosa ZiehauFor example:
60*d5d72874SSepherosa Ziehau.Bd -literal -offset indent
61*d5d72874SSepherosa Ziehau% sysctl hw.sensors
62*d5d72874SSepherosa Ziehauhw.sensors.cpu0.freq0: 2684298000 Hz (cpu0 freq)
63*d5d72874SSepherosa Ziehauhw.sensors.cpu1.freq0: 1418960000 Hz (cpu1 freq)
64*d5d72874SSepherosa Ziehauhw.sensors.cpu2.freq0: 1234898000 Hz (cpu2 freq)
65*d5d72874SSepherosa Ziehauhw.sensors.cpu3.freq0: 1242533000 Hz (cpu3 freq)
66*d5d72874SSepherosa Ziehau.Ed
67*d5d72874SSepherosa Ziehau.Sh HARDWARE
68*d5d72874SSepherosa ZiehauThe
69*d5d72874SSepherosa Ziehau.Nm
70*d5d72874SSepherosa Ziehaudriver supports all AMD and Intel CPUs which provide the APERF and MPERF MSRs:
71*d5d72874SSepherosa Ziehau.Pp
72*d5d72874SSepherosa Ziehau.Bl -bullet -compact
73*d5d72874SSepherosa Ziehau.It
74*d5d72874SSepherosa ZiehauMost AMD CPUs starting at Family 10h
75*d5d72874SSepherosa Ziehau.It
76*d5d72874SSepherosa ZiehauMost Intel CPUs starting from Core series and Atom respectively.
77*d5d72874SSepherosa Ziehau.El
78*d5d72874SSepherosa Ziehau.Sh SEE ALSO
79*d5d72874SSepherosa Ziehau.Xr systat 1 ,
80*d5d72874SSepherosa Ziehau.Xr sysctl 3 ,
81*d5d72874SSepherosa Ziehau.Xr sensorsd 8 ,
82*d5d72874SSepherosa Ziehau.Xr sysctl 8
83*d5d72874SSepherosa Ziehau.Sh HISTORY
84*d5d72874SSepherosa ZiehauThe
85*d5d72874SSepherosa Ziehau.Nm
86*d5d72874SSepherosa Ziehaudriver first appeared in
87*d5d72874SSepherosa Ziehau.Dx 4.3 .
88*d5d72874SSepherosa Ziehau.Sh AUTHORS
89*d5d72874SSepherosa Ziehau.An -nosplit
90*d5d72874SSepherosa ZiehauThe
91*d5d72874SSepherosa Ziehau.Nm
92*d5d72874SSepherosa Ziehaudriver was written by
93*d5d72874SSepherosa Ziehau.An Imre Vadasz Aq Mt imre@vdsz.com .
94