Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

[patch] typos, misspellings, and a bug fix for ktrace/kdump

From: Brian Poole <raj(at)cerias.purdue.edu>
Date: Tue Feb 18 2003 - 15:06:05 EST


Mostly typos & usage updates. Documented the 'w' option to -t. Fixed the behavior of ktrace when used to disable tracing to a file via 'ktrace -c -f file' which was failing due to an incorrect usage check.

-b

Index: usr.bin/ktrace/ktrace.1



RCS file: /cvs/src/usr.bin/ktrace/ktrace.1,v retrieving revision 1.10
diff -u -r1.10 ktrace.1
--- usr.bin/ktrace/ktrace.1	9 Nov 2000 17:52:15 -0000	1.10
+++ usr.bin/ktrace/ktrace.1	18 Feb 2003 08:17:44 -0000
@@ -107,6 +107,7 @@
 flag is permitted).
.It Fl t Ar trstr
 The string argument represents the kernel trace points, one per letter. +The default flags are c, e, i, n, and s.  The following table equates the letters with the tracepoints:
.Pp
.Bl -tag -width flag -compact
@@ -114,13 +115,15 @@
 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
Index: usr.bin/ktrace/ktrace.c

RCS file: /cvs/src/usr.bin/ktrace/ktrace.c,v retrieving revision 1.14
diff -u -r1.14 ktrace.c
--- usr.bin/ktrace/ktrace.c	25 Mar 2002 16:46:28 -0000	1.14
+++ usr.bin/ktrace/ktrace.c	18 Feb 2003 08:17:44 -0000
@@ -126,7 +126,7 @@
 	argv += optind;
 	argc -= optind;
 	
-	if ((pidset && *argv) || (!pidset && !*argv))
+	if ((pidset && *argv) || (!pidset && !*argv && clear != CLEAR))
 		usage();
 			
 	if (inherit)

@@ -195,7 +195,7 @@
 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 @@

         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);

 }
Index: usr.bin/kdump/kdump.1

RCS file: /cvs/src/usr.bin/kdump/kdump.1,v retrieving revision 1.8
diff -u -r1.8 kdump.1
--- usr.bin/kdump/kdump.1	23 Jun 2002 20:01:25 -0000	1.8
+++ usr.bin/kdump/kdump.1	18 Feb 2003 08:17:44 -0000
@@ -46,7 +46,7 @@
.Op Fl f Ar file
.Op Fl m Ar maxdata
.Op Fl p Ar pid
-.Op Fl t Op cenis
+.Op Fl t Op ceinsw

.Sh DESCRIPTION
.Nm

 displays the kernel trace files produced with @@ -54,7 +54,7 @@
 in human-readable format.
 By default, the file
.Pa ktrace.out

-in the current directory is displayed, unless overriden by the +in the current directory is displayed, unless overridden by the
.Fl f

 option.
.Pp

@@ -101,11 +101,12 @@
 Display relative timestamps (time since previous entry).
.It Fl T

 Display absolute timestamps for each entry (seconds since epoch). -.It Fl t Op cenis
-See the
+.It Fl t Op ceinsw
+Selects which tracepoints to display. See the
.Fl t

 option of
-.Xr ktrace 1 .
+.Xr ktrace 1
+for the definitions of the flags.
.El
.Sh FILES
.Bl -tag -width ktrace.out -compact

Index: usr.bin/kdump/kdump.c

RCS file: /cvs/src/usr.bin/kdump/kdump.c,v retrieving revision 1.19
diff -u -r1.19 kdump.c
--- usr.bin/kdump/kdump.c	17 Oct 2002 17:20:49 -0000	1.19
+++ usr.bin/kdump/kdump.c	18 Feb 2003 08:17:44 -0000
@@ -551,7 +551,7 @@
 	extern char *__progname;
 	fprintf(stderr, "usage: %s "
 	    "[-dnlRT] [-e emulation] [-p pid] [-f trfile] [-m maxdata] "
-	    "[-t [cnis]]\n", __progname);
+	    "[-t [ceinsw]]\n", __progname);
 	exit(1);

 } Received on Tue Feb 18 15:07:25 2003
Do you need help?X

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:29:50 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library