summaryrefslogtreecommitdiff
path: root/usr.bin/ktrace
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-02-19 19:30:14 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-02-19 19:30:14 +0000
commit194ec2ac183e92677470f2f7e488b0327aac167d (patch)
tree601b04065d8ab6f6439589d65cc4ef30a18f3af6 /usr.bin/ktrace
parentc0bce137d1afa7f549e4d17d27323fd8c81870cb (diff)
improve docs; raj@cerias.purdue.edu
Diffstat (limited to 'usr.bin/ktrace')
-rw-r--r--usr.bin/ktrace/ktrace.115
-rw-r--r--usr.bin/ktrace/ktrace.c10
2 files changed, 17 insertions, 8 deletions
diff --git a/usr.bin/ktrace/ktrace.1 b/usr.bin/ktrace/ktrace.1
index ac0bd976df0..bc83ad156df 100644
--- a/usr.bin/ktrace/ktrace.1
+++ b/usr.bin/ktrace/ktrace.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ktrace.1,v 1.10 2000/11/09 17:52:15 aaron Exp $
+.\" $OpenBSD: ktrace.1,v 1.11 2003/02/19 19:30:13 deraadt Exp $
.\"
.\" Copyright (c) 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -107,6 +107,13 @@ Enable (disable) tracing on the indicated process ID (only one
flag is permitted).
.It Fl t Ar trstr
The string argument represents the kernel trace points, one per letter.
+The default flags are
+.Cm c Ns ,
+.Cm e Ns ,
+.Cm i Ns ,
+.Cm n Ns ,
+and
+.Cm s Ns .
The following table equates the letters with the tracepoints:
.Pp
.Bl -tag -width flag -compact
@@ -114,13 +121,15 @@ The following table equates the letters with the tracepoints:
trace system calls
.It Cm e
trace emulation changes
-.It Cm n
-trace namei translations
.It Cm i
trace
.Tn I/O
+.It Cm n
+trace namei translations
.It Cm s
trace signal processing
+.It Cm w
+trace context switch points
.El
.It Ar command
Execute
diff --git a/usr.bin/ktrace/ktrace.c b/usr.bin/ktrace/ktrace.c
index 3c953357acc..5a2f3aa1c60 100644
--- a/usr.bin/ktrace/ktrace.c
+++ b/usr.bin/ktrace/ktrace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ktrace.c,v 1.14 2002/03/25 16:46:28 deraadt Exp $ */
+/* $OpenBSD: ktrace.c,v 1.15 2003/02/19 19:30:13 deraadt Exp $ */
/* $NetBSD: ktrace.c,v 1.4 1995/08/31 23:01:44 jtc Exp $ */
/*-
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)ktrace.c 8.2 (Berkeley) 4/28/95";
#endif
-static char *rcsid = "$OpenBSD: ktrace.c,v 1.14 2002/03/25 16:46:28 deraadt Exp $";
+static char *rcsid = "$OpenBSD: ktrace.c,v 1.15 2003/02/19 19:30:13 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -126,7 +126,7 @@ main(argc, argv)
argv += optind;
argc -= optind;
- if ((pidset && *argv) || (!pidset && !*argv))
+ if ((pidset && *argv) || (!pidset && !*argv && clear != CLEAR))
usage();
if (inherit)
@@ -195,7 +195,7 @@ static void
usage()
{
(void)fprintf(stderr,
-"usage:\tktrace [-aCcid] [-f trfile] [-g pgid] [-p pid] [-t [cenis]\n\tktrace [-aCcid] [-f trfile] [-t [cenis] command\n");
+"usage:\tktrace [-aCcdi] [-f trfile] [-g pgid] [-p pid] [-t [ceinsw]]\n\tktrace [-adi] [-f trfile] [-t [ceinsw]] command\n");
exit(1);
}
@@ -206,7 +206,7 @@ no_ktrace(sig)
char buf[8192];
snprintf(buf, sizeof(buf),
-"error:\tktrace() system call not supported in the running kernel\n\tre-compile kernel with 'options KTRACE'\n");
+"error:\tktrace() system call not supported in the running kernel\n\tre-compile kernel with 'option KTRACE'\n");
write(STDERR_FILENO, buf, strlen(buf));
_exit(1);
}