| KTRACE(2) | AerieBSD 1.0 Refernce Manual | KTRACE(2) |
| KTROP_SET | Enable trace points specified in trpoints. |
| KTROP_CLEAR | Disable trace points specified in trpoints. |
| KTROP_CLEARFILE | Stop all tracing. |
| KTRFLAG_DESCEND | The tracing change should apply to the |
| 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 |
| KTRFAC_PSIG | Trace posted signals. |
| KTRFAC_EMUL | Trace emulation changes. |
| KTRFAC_CSW | Trace context switch points. |
| KTRFAC_INHERIT | Inherit tracing to future children. |
struct ktr_header {
size_t ktr_len; /* length of buf */
pid_t ktr_pid; /* process id */
char ktr_comm[MAXCOMLEN+1]; /* command name */
short ktr_type; /* trace record type */
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 sys/ktrace.h include file. The pid parameter refers to a process ID. If it is negative, it refers to a process group ID.
| AerieBSD 1.0 Reference Manual | August 26 2008 | KTRACE(2) |