"KTROP_CLEARFILE Stop all tracing." "KTRFLAG_DESCEND The tracing change should apply to the"
specified process and all its current children.
The trpoints argument specifies the trace points of interest. The defined trace points are:
"KTRFAC_SYSCALL Trace system calls." "KTRFAC_SYSRET Trace return values from system calls." "KTRFAC_NAMEI Trace name lookup operations." "KTRFAC_GENIO Trace all I/O (note that this option can"
Each tracing event outputs a record composed of a generic header followed by a trace point specific structure. The generic header is:
struct ktr_header {
intktr_len; /* length of buf */
short ktr_type;/* trace record type */
pid_t ktr_pid; /* process id */
char ktr_comm[MAXCOMLEN+1]; /* command name */
struct timeval ktr_time; /* timestamp */
caddr_t ktr_buf;
};
The ktr_len field specifies the length of the ktr_type data that follows this header. The ktr_pid and ktr_comm fields specify the process and command generating the record. The ktr_time field gives the time (with microsecond resolution) that the record was generated. The ktr_buf is an internal kernel pointer and is not useful.
The generic header is followed by ktr_len bytes of a ktr_type record. The type specific records are defined in the .In sys/ktrace.h include file.
A component of the path prefix is not a directory.
[ENAMETOOLONG]
A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 characters.
[ENOENT]
The named tracefile does not exist.
[EACCES]
Search permission is denied for a component of the path prefix.
[ELOOP]
Too many symbolic links were encountered in translating the pathname.
[EIO]
An I/O error occurred while reading from or writing to the file system.
[ENOSYS]
The kernel was not compiled with ktrace support.
A thread may be unable to log one or more tracing events due to a temporary shortage of resources. This condition is remembered by the kernel, and the next tracing request that succeeds will have the flag KTR_DROP set in its ktr_type field.