| 1 | .\" Copyright (c) 1983 The Regents of the University of California. |
| 2 | .\" All rights reserved. |
| 3 | .\" |
| 4 | .\" Redistribution and use in source and binary forms are permitted |
| 5 | .\" provided that the above copyright notice and this paragraph are |
| 6 | .\" duplicated in all such forms and that any documentation, |
| 7 | .\" advertising materials, and other materials related to such |
| 8 | .\" distribution and use acknowledge that the software was developed |
| 9 | .\" by the University of California, Berkeley. The name of the |
| 10 | .\" University may not be used to endorse or promote products derived |
| 11 | .\" from this software without specific prior written permission. |
| 12 | .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR |
| 13 | .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED |
| 14 | .\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
| 15 | .\" |
| 16 | .\" @(#)kgmon.8 6.2 (Berkeley) %G% |
| 17 | .\" |
| 18 | .TH KGMON 8 "" |
| 19 | .UC 5 |
| 20 | .SH NAME |
| 21 | kgmon \- generate a dump of the operating system's profile buffers |
| 22 | .SH SYNOPSIS |
| 23 | .B /etc/kgmon |
| 24 | [ |
| 25 | .B \-b |
| 26 | ] [ |
| 27 | .B \-h |
| 28 | ] [ |
| 29 | .B \-r |
| 30 | ] [ |
| 31 | .B \-p |
| 32 | ] [ system ] [ memory ] |
| 33 | .SH DESCRIPTION |
| 34 | .I Kgmon |
| 35 | is a tool used when profiling the operating system. |
| 36 | When no arguments are supplied, |
| 37 | .I kgmon |
| 38 | indicates the state of operating system profiling as running, |
| 39 | off, or not configured. |
| 40 | (see |
| 41 | .IR config (8)) |
| 42 | If the |
| 43 | .B \-p |
| 44 | flag is specified, |
| 45 | .I kgmon |
| 46 | extracts profile data from the operating system and produces a |
| 47 | .I gmon.out |
| 48 | file suitable for later analysis by |
| 49 | .IR gprof (1). |
| 50 | .PP |
| 51 | The following options may be specified: |
| 52 | .TP |
| 53 | .B \-b |
| 54 | Resume the collection of profile data. |
| 55 | .TP |
| 56 | .B \-h |
| 57 | Stop the collection of profile data. |
| 58 | .TP |
| 59 | .B \-p |
| 60 | Dump the contents of the profile buffers into a |
| 61 | .I gmon.out |
| 62 | file. |
| 63 | .TP |
| 64 | .B \-r |
| 65 | Reset all the profile buffers. |
| 66 | If the |
| 67 | .B \-p |
| 68 | flag is also specified, the |
| 69 | .I gmon.out |
| 70 | file is generated before the buffers are reset. |
| 71 | .PP |
| 72 | If neither |
| 73 | .B \-b |
| 74 | nor |
| 75 | .B \-h |
| 76 | is specified, the state of profiling collection remains unchanged. |
| 77 | For example, if the |
| 78 | .B \-p |
| 79 | flag is specified and profile data is being collected, |
| 80 | profiling will be momentarily suspended, |
| 81 | the operating system profile buffers will be dumped, |
| 82 | and profiling will be immediately resumed. |
| 83 | .SH FILES |
| 84 | /vmunix \- the default system |
| 85 | .br |
| 86 | /dev/kmem \- the default memory |
| 87 | .SH "SEE ALSO" |
| 88 | gprof(1), |
| 89 | config(8) |
| 90 | .SH DIAGNOSTICS |
| 91 | Users with only read permission on /dev/kmem cannot change the state |
| 92 | of profiling collection. |
| 93 | They can get a |
| 94 | .I gmon.out |
| 95 | file with the warning that the data may be |
| 96 | inconsistent if profiling is in progress. |