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