Add a flag to turn on debugging so you don't need to recompile or patch
the binary to turn it on.
This commit is contained in:
parent
4a3f37dd7a
commit
780f68fd71
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: kgmon.8,v 1.10 2000/07/03 05:21:19 enami Exp $
|
||||
.\" $NetBSD: kgmon.8,v 1.11 2000/08/03 21:14:19 eeh Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1983, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -41,7 +41,7 @@
|
||||
.Nd generate a dump of the operating system's profile buffers
|
||||
.Sh SYNOPSIS
|
||||
.Nm kgmon
|
||||
.Op Fl bhpr
|
||||
.Op Fl bdhpr
|
||||
.Op Fl M Ar core
|
||||
.Op Fl N Ar system
|
||||
.Sh DESCRIPTION
|
||||
@ -66,6 +66,8 @@ The options are as follows:
|
||||
.Bl -tag -width Ds
|
||||
.It Fl b
|
||||
Resume the collection of profile data.
|
||||
.It Fl d
|
||||
Enable debug output.
|
||||
.It Fl h
|
||||
Stop the collection of profile data.
|
||||
.It Fl p
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kgmon.c,v 1.11 1997/11/01 06:54:12 lukem Exp $ */
|
||||
/* $NetBSD: kgmon.c,v 1.12 2000/08/03 21:14:20 eeh Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1992, 1993
|
||||
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1992, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "from: @(#)kgmon.c 8.1 (Berkeley) 6/6/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: kgmon.c,v 1.11 1997/11/01 06:54:12 lukem Exp $");
|
||||
__RCSID("$NetBSD: kgmon.c,v 1.12 2000/08/03 21:14:20 eeh Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -96,7 +96,7 @@ main(int argc, char **argv)
|
||||
seteuid(getuid());
|
||||
kmemf = NULL;
|
||||
system = NULL;
|
||||
while ((ch = getopt(argc, argv, "M:N:bhpr")) != -1) {
|
||||
while ((ch = getopt(argc, argv, "M:N:bdhpr")) != -1) {
|
||||
switch((char)ch) {
|
||||
|
||||
case 'M':
|
||||
@ -124,6 +124,10 @@ main(int argc, char **argv)
|
||||
rflag = 1;
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
debug = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
(void)fprintf(stderr,
|
||||
"usage: kgmon [-bhrp] [-M core] [-N system]\n");
|
||||
|
Loading…
Reference in New Issue
Block a user