xref: /freebsd/usr.sbin/boottrace/boottrace.8 (revision 13ec1e3155c7e9bf037b12af186351b7fa9b9450)
1*13ec1e31SMitchell Horne.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD
2*13ec1e31SMitchell Horne.\"
3*13ec1e31SMitchell Horne.\" Copyright (c) 2022 NetApp, Inc.
4*13ec1e31SMitchell Horne.\"
5*13ec1e31SMitchell Horne.\" Redistribution and use in source and binary forms, with or without
6*13ec1e31SMitchell Horne.\" modification, are permitted provided that the following conditions
7*13ec1e31SMitchell Horne.\" are met:
8*13ec1e31SMitchell Horne.\" 1. Redistributions of source code must retain the above copyright
9*13ec1e31SMitchell Horne.\"    notice, this list of conditions and the following disclaimer.
10*13ec1e31SMitchell Horne.\" 2. Redistributions in binary form must reproduce the above copyright
11*13ec1e31SMitchell Horne.\"    notice, this list of conditions and the following disclaimer in the
12*13ec1e31SMitchell Horne.\"    documentation and/or other materials provided with the distribution.
13*13ec1e31SMitchell Horne.\"
14*13ec1e31SMitchell Horne.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15*13ec1e31SMitchell Horne.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16*13ec1e31SMitchell Horne.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17*13ec1e31SMitchell Horne.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18*13ec1e31SMitchell Horne.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19*13ec1e31SMitchell Horne.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20*13ec1e31SMitchell Horne.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21*13ec1e31SMitchell Horne.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22*13ec1e31SMitchell Horne.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23*13ec1e31SMitchell Horne.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24*13ec1e31SMitchell Horne.\" SUCH DAMAGE.
25*13ec1e31SMitchell Horne.\"
26*13ec1e31SMitchell Horne.Dd February 18, 2022
27*13ec1e31SMitchell Horne.Dt BOOTTRACE 8
28*13ec1e31SMitchell Horne.Os
29*13ec1e31SMitchell Horne.Sh NAME
30*13ec1e31SMitchell Horne.Nm boottrace
31*13ec1e31SMitchell Horne.Nd trace command execution with
32*13ec1e31SMitchell Horne.Xr boottrace 4
33*13ec1e31SMitchell Horne.Sh SYNOPSIS
34*13ec1e31SMitchell Horne.Nm
35*13ec1e31SMitchell Horne.Ar utility Op Ar argument ...
36*13ec1e31SMitchell Horne.Sh DESCRIPTION
37*13ec1e31SMitchell HorneThe
38*13ec1e31SMitchell Horne.Nm
39*13ec1e31SMitchell Horneutility
40*13ec1e31SMitchell Horneexecutes the specified
41*13ec1e31SMitchell Horne.Ar utility ,
42*13ec1e31SMitchell Hornecreating two
43*13ec1e31SMitchell Horne.Xr boottrace 4
44*13ec1e31SMitchell Hornetrace entries before and after its execution.
45*13ec1e31SMitchell Horne.Sh ENVIRONMENT
46*13ec1e31SMitchell HorneThe
47*13ec1e31SMitchell Horne.Ev PATH
48*13ec1e31SMitchell Horneenvironment variable is used to locate the requested
49*13ec1e31SMitchell Horne.Ar utility
50*13ec1e31SMitchell Horneif the name contains no
51*13ec1e31SMitchell Horne.Ql /
52*13ec1e31SMitchell Hornecharacters.
53*13ec1e31SMitchell Horne.Sh EXIT STATUS
54*13ec1e31SMitchell HorneIf
55*13ec1e31SMitchell Horne.Ar utility
56*13ec1e31SMitchell Hornewas executed successfully, its exit status is returned.
57*13ec1e31SMitchell Horne.Pp
58*13ec1e31SMitchell HorneIf
59*13ec1e31SMitchell Horne.Ar utility
60*13ec1e31SMitchell Hornewas found but could not be executed, an exit status of 126 is returned.
61*13ec1e31SMitchell HorneIf
62*13ec1e31SMitchell Horne.Ar utility
63*13ec1e31SMitchell Hornecould not be found, an exit status of 127 is returned.
64*13ec1e31SMitchell Horne.Sh EXAMPLES
65*13ec1e31SMitchell HorneExecute the
66*13ec1e31SMitchell Horne.Xr dumpon 8
67*13ec1e31SMitchell Horneutility, logging the trace entries:
68*13ec1e31SMitchell Horne.Bd -literal -offset indent
69*13ec1e31SMitchell Horne$ boottrace dumpon -z /dev/gpt/swap0
70*13ec1e31SMitchell Horne.Ed
71*13ec1e31SMitchell Horne.Pp
72*13ec1e31SMitchell HorneThis will appear in the output of the
73*13ec1e31SMitchell Horne.Va kern.boottrace.log
74*13ec1e31SMitchell Horne.Xr sysctl 8
75*13ec1e31SMitchell Hornenode:
76*13ec1e31SMitchell Horne.Bd -literal
77*13ec1e31SMitchell HorneCPU      msecs    delta process     event                PID CPUtime IBlks OBlks
78*13ec1e31SMitchell Horne  0   63918567        0 kernel      sysinit 0x2100001      0    0.00     0     0
79*13ec1e31SMitchell Horne[...]
80*13ec1e31SMitchell Horne  0   64076940   120605 boottrace   dumpon start        1602    0.00     0     0
81*13ec1e31SMitchell Horne  0   64076942        2 boottrace   dumpon done         1602    0.00     0     0
82*13ec1e31SMitchell Horne.Ed
83*13ec1e31SMitchell Horne.Sh SEE ALSO
84*13ec1e31SMitchell Horne.Xr boottrace 4 ,
85*13ec1e31SMitchell Horne.Xr rc.subr 8
86