Commit | Line | Data |
---|---|---|
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 | |
11 | kgmon \- 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 | |
25 | is a tool used when profiling the operating system. | |
26 | When no arguments are supplied, | |
27 | .I kgmon | |
28 | indicates the state of operating system profiling as running, | |
29 | off, or not configured. | |
30 | (see | |
31 | .IR config (8)) | |
32 | If the | |
33 | .B \-p | |
34 | flag is specified, | |
35 | .I kgmon | |
36 | extracts profile data from the operating system and produces a | |
37 | .I gmon.out | |
38 | file suitable for later analysis by | |
39 | .IR gprof (1). | |
40 | .PP | |
41 | The following options may be specified: | |
42 | .TP | |
43 | .B \-b | |
44 | Resume the collection of profile data. | |
45 | .TP | |
46 | .B \-h | |
47 | Stop the collection of profile data. | |
48 | .TP | |
49 | .B \-p | |
50 | Dump the contents of the profile buffers into a | |
51 | .I gmon.out | |
52 | file. | |
53 | .TP | |
54 | .B \-r | |
55 | Reset all the profile buffers. | |
56 | If the | |
57 | .B \-p | |
58 | flag is also specified, the | |
59 | .I gmon.out | |
60 | file is generated before the buffers are reset. | |
61 | .PP | |
62 | If neither | |
63 | .B \-b | |
64 | nor | |
65 | .B \-h | |
66 | is specified, the state of profiling collection remains unchanged. | |
67 | For example, if the | |
68 | .B \-p | |
69 | flag is specified and profile data is being collected, | |
70 | profiling will be momentarily suspended, | |
71 | the operating system profile buffers will be dumped, | |
72 | and 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" | |
78 | gprof(1), | |
79 | config(8) | |
80 | .SH DIAGNOSTICS | |
81 | Users with only read permission on /dev/kmem cannot change the state | |
82 | of profiling collection. | |
83 | They can get a | |
84 | .I gmon.out | |
85 | file with the warning that the data may be | |
86 | inconsistent if profiling is in progress. |