last changes before merger with reno version. cross fingers.
[unix-history] / usr / src / usr.sbin / kgmon / kgmon.8
CommitLineData
c82fa61b
KB
1.\" Copyright (c) 1983 The Regents of the University of California.
2.\" All rights reserved.
01a3eda7 3.\"
68a62424 4.\" %sccs.include.redist.man%
c82fa61b 5.\"
68a62424 6.\" @(#)kgmon.8 6.3 (Berkeley) %G%
01a3eda7 7.\"
43598d14 8.TH KGMON 8 ""
01a3eda7
KM
9.UC 5
10.SH NAME
11kgmon \- generate a dump of the operating system's profile buffers
12.SH SYNOPSIS
68a62424 13.B kgmon
01a3eda7
KM
14[
15.B \-b
16] [
17.B \-h
18] [
19.B \-r
20] [
21.B \-p
22] [ system ] [ memory ]
23.SH DESCRIPTION
24.I Kgmon
25is a tool used when profiling the operating system.
26When no arguments are supplied,
27.I kgmon
28indicates the state of operating system profiling as running,
29off, or not configured.
30(see
31.IR config (8))
32If the
33.B \-p
34flag is specified,
35.I kgmon
36extracts profile data from the operating system and produces a
37.I gmon.out
38file suitable for later analysis by
39.IR gprof (1).
40.PP
41The following options may be specified:
42.TP
43.B \-b
44Resume the collection of profile data.
45.TP
46.B \-h
47Stop the collection of profile data.
48.TP
49.B \-p
50Dump the contents of the profile buffers into a
51.I gmon.out
52file.
53.TP
54.B \-r
55Reset all the profile buffers.
56If the
57.B \-p
58flag is also specified, the
59.I gmon.out
60file is generated before the buffers are reset.
61.PP
62If neither
63.B \-b
64nor
65.B \-h
66is specified, the state of profiling collection remains unchanged.
67For example, if the
68.B \-p
69flag is specified and profile data is being collected,
70profiling will be momentarily suspended,
71the operating system profile buffers will be dumped,
72and profiling will be immediately resumed.
73.SH FILES
74/vmunix \- the default system
75.br
76/dev/kmem \- the default memory
77.SH "SEE ALSO"
78gprof(1),
79config(8)
80.SH DIAGNOSTICS
81Users with only read permission on /dev/kmem cannot change the state
82of profiling collection.
83They can get a
84.I gmon.out
85file with the warning that the data may be
86inconsistent if profiling is in progress.