Commit Graph

51 Commits

Author SHA1 Message Date
kevlo
9304e224e7 Remove duplicated header files 2011-06-24 07:18:44 +00:00
dchagin
d247142d62 Teach kdump to understand sv_flags records in the trace files.
MFC after:	1 Month.
2011-02-25 22:07:23 +00:00
joel
29af67e52c Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with:	imp, rwatson
2010-12-11 08:32:16 +00:00
jhb
68341244bc - Sort list of trace points.
- Note that 'y' (sysctl requests) is in the default set of trace points.

MFC after:	3 days
2010-07-14 18:28:46 +00:00
ed
9b380e30d4 Build usr.bin/ with WARNS=6 by default.
Also add some missing $FreeBSD$ to keep svn happy.
2010-01-02 10:27:05 +00:00
delphij
0842b7d53f Revert most part of 200420 as requested, as more review and polish is
needed.
2009-12-13 03:14:06 +00:00
delphij
b963db4652 Remove unneeded header includes from usr.bin/ except contributed code.
Tested with:	make universe
2009-12-11 23:35:38 +00:00
jhb
2548f05c6c Add a new type of KTRACE record for sysctl(3) invocations. It uses the
internal sysctl_sysctl_name() handler to map the MIB array to a string
name and logs this name in the trace log.  This can be useful to see
exactly which sysctls a thread is invoking.

MFC after:	1 month
2009-03-11 21:48:36 +00:00
ru
2823d2ffd5 Spell -t option's argument by name. 2008-04-02 09:41:29 +00:00
des
3f8f97c6e0 Fix usage string. 2008-03-20 09:53:45 +00:00
des
df26e399aa This patch adds a new ktrace(2) record type, KTR_STRUCT, whose payload
consists of the null-terminated name and the contents of any structure
you wish to record.  A new ktrstruct() function constructs and emits a
KTR_STRUCT record.  It is accompanied by convenience macros for struct
stat and struct sockaddr.

In kdump(1), KTR_STRUCT records are handled by a dispatcher function
that runs stringent sanity checks on its contents before handing it
over to individual decoding funtions for each type of structure.
Currently supported structures are struct stat and struct sockaddr for
the AF_INET, AF_INET6 and AF_UNIX families; support for AF_APPLETALK
and AF_IPX is present but disabled, as I am unable to test it properly.

Since 's' was already taken, the letter 't' is used by ktrace(1) to
enable KTR_STRUCT trace points, and in kdump(1) to enable their
decoding.

Derived from patches by Andrew Li <andrew2.li@citi.com>.

PR:		kern/117836
MFC after:	3 weeks
2008-02-23 01:01:49 +00:00
mpp
1e089266fc Allow the -c -f file options to actually execute. 2007-02-13 00:22:29 +00:00
trhodes
34663c9485 Add needed hyphens, note the KTRACE kernel option, bump doc date.
PR:		85186
Submitted by:	garys
2006-11-06 15:17:50 +00:00
rwatson
476d186675 When opening a trace file, open O_NONBLOCK so that ktrace doesn't stall
if the target is a fifo.  After opening a trace file, check that it is a
regular file, and if not, return an error.

MFC after:	3 days
Reported by:	kris
PR:		94278
2006-03-14 19:32:03 +00:00
ru
7f3c7f0d46 Sort sections. 2005-01-18 13:43:56 +00:00
das
130bed6547 Don't include sys/user.h merely for its side-effect of recursively
including other headers.
2004-11-27 06:51:39 +00:00
charnier
f9143f2eab Do not start err(3) strings with uppercase nor dot terminate them.
Standard sccsid[] area according to style(9).
2003-02-05 14:25:43 +00:00
obrien
bc61fc95d8 Consistently use FBSDID 2002-06-30 05:25:07 +00:00
markm
a735b516eb Warnings fix; ANSIfy, constify, mark unused function parameter(s). 2002-04-28 13:00:16 +00:00
charnier
ad8a79e6a5 Use `The .Nm utility' 2002-04-20 12:18:28 +00:00
dwmalone
766bb4cc90 1) Clean up vendor and ID strings.
2) include stdlib.h for atoi.
3) staticise and constify.
4) add some missing prototypes.
5) add some parens to keep gcc happy.
2002-04-01 10:49:11 +00:00
imp
74d826c7a6 remove __P 2002-03-22 01:22:50 +00:00
keramida
da7415a981 Consistently refer to the trace file of ktrace as 'trfile'.
PR:		docs/35361
Submitted by:	Stefan Farfeleder <e0026813@stud3.tuwien.ac.at>
2002-03-03 01:12:25 +00:00
roam
d89b782d63 Describe the '+' option in the -t trace string.
PR:		34668
Submitted by:	Stefan Farfeleder <e0026813@stud3.tuwien.ac.at>
Reviewed by:	dd
Approved by:	dd
MFC after:	1 week
2002-02-11 09:03:34 +00:00
bde
229c3ac7c3 Compensate for "Compensate for header dethreading" by backing it out. 2001-10-10 17:48:44 +00:00
dd
911ca14c87 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
ru
36f138439b mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 14:16:33 +00:00
ru
c1d8c6e04f mdoc(7) police: add missing .Ar in SYNOPSIS. 2001-07-05 06:11:10 +00:00
mikeh
71ab6ae0a0 Sync manpage and usage. Also fix bug that would always interpret a -c as a
process clear.

PR:	bin/15456
MFC after:	2 weeks
2001-06-27 02:52:57 +00:00
markm
9f745ed9e1 Compensate for header dethreading. 2001-05-01 08:46:02 +00:00
ru
0d1334ca0c mdoc(7) police: use the new features of the Nm macro. 2000-11-20 19:21:22 +00:00
imp
3c95f9ccde getopt and friends are declared in <unistd.h>
getopt returns -1 not EOF.
2000-09-04 06:09:54 +00:00
kris
74a1be3402 Don't call err() with no format string. 2000-07-10 09:14:15 +00:00
peter
3b842d34e8 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
wosch
0ac774a20f Delete truss manpage link. We have now a real truss command. 1997-12-06 23:40:13 +00:00
charnier
e3613c1ac3 Use .Nm ktrace instead of .Nm in SYNOPSIS section: otherwise, a newline is
missing.
1997-11-24 07:23:59 +00:00
charnier
2865fd3c1b Cosmetic in usage string. 1997-07-17 06:45:22 +00:00
jmg
4deb06a037 `appears'' -> `appeared'' (closes PR#3393, Submitted-by: Josh Gilliam)
add missing Id's
other minor clean ups
1997-04-27 08:45:46 +00:00
imp
141381e1cb compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 04:34:07 +00:00
joerg
5f33cfa082 Fix a security problem where the ktrace.out file could have been written
over a file owned by someone else.

Pointed out by:	wosch
Reviewed by:	sef, imp, proff@suburbia.net, bde
1997-03-15 10:39:12 +00:00
peter
f390c26dd9 Revert $FreeBSD$ to $Id$ 1997-02-22 19:58:13 +00:00
jkh
808a36ef65 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
wosch
01588772de Add manual page symlinks
trace.1 -> ktrace.1 and
	truss.1 -> ktrace.1
for SunOS emigrants.
1996-12-08 16:56:40 +00:00
phk
fcdb3184db The userland change to the utrace(2) call. 1996-09-19 19:50:17 +00:00
peter
e1600f46df s/trace -C/ktrace -C/
Pointed out by: zgabor@code.hu (Zahemszky Gabor)  PR#1486
1996-08-10 09:05:17 +00:00
joerg
e6299bb9a7 Do always create ktrace.out with mode 0600, to prevent it from
accidentally compromising information confidential to the user running
ktrace.
1996-06-30 09:40:44 +00:00
jraynard
db063d0d54 Document the fact that it only works if the trace record is a regular file. 1996-06-22 02:15:28 +00:00
jraynard
30b42b6dff Merged in 4.4Lite2 versions, added $Id$'s. The ktrace changes should
fix the garbage error messages printed out under certain circumstances.
1996-06-19 09:56:30 +00:00
rgrimes
a14d555c87 Remove trailing whitespace. 1995-05-30 06:41:30 +00:00
ats
6f4fdb72c1 Reviewed by:
Submitted by:
Put in a signal handler to catch the SIGSYS signal that indicates that
ktrace was not built into the kernel and prevent ktrace to core dump
somewhere.
1994-08-28 15:49:55 +00:00