Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../sbin/../man/man3lib/libdtrace.3lib
Real path: /usr/share/man/man3lib/libdtrace.3lib
Zurück
'\" te .\" Copyright (c) 2003, 2020, Oracle and/or its affiliates. .TH libdtrace 3LIB "24 Jun 2018" "Oracle Solaris 11.4" "Interface Libraries" .SH NAME libdtrace \- DTrace dynamic tracing software library .SH SYNOPSIS .LP .nf \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-ldtrace\fR [ \fIlibrary\fR... ] #include <dtrace.h> .fi .SH DESCRIPTION .sp .LP Functions in this library define the interface for interacting with the DTrace dynamic tracing software, including the D language compiler and facilities for enabling probes and consuming trace data. .SH INTERFACES .sp .LP The interfaces provided by \fBlibdtrace.so.1\fR are currently private to the implementation of the Oracle Solaris system and DTrace subsystem and are subject to change at any time without notice. Applications using these interfaces might fail to run on future releases. For more information, see the \fIOracle Solaris 11.4 DTrace (Dynamic Tracing) Guide\fR for a description of the public documented interfaces available for the DTrace facility. .sp .in +2 .nf dtrace_addr2str dtrace_lookup_by_type dtrace_aggregate_clear dtrace_object_info dtrace_aggregate_print dtrace_object_iter dtrace_aggregate_snap dtrace_open dtrace_aggregate_walk dtrace_printa_create dtrace_aggregate_walk_joined dtrace_printf_create dtrace_aggregate_walk_keyrevsorted dtrace_printf_format dtrace_aggregate_walk_keysorted dtrace_probe_info dtrace_aggregate_walk_keyvarrevsorted dtrace_probe_iter dtrace_aggregate_walk_keyvarsorted dtrace_proc_continue dtrace_aggregate_walk_sorted dtrace_proc_create dtrace_aggregate_walk_valrevsorted dtrace_proc_grab dtrace_aggregate_walk_valsorted dtrace_proc_release dtrace_aggregate_walk_valvarrevsorted dtrace_program_exec dtrace_aggregate_walk_valvarsorted dtrace_program_fcompile dtrace_attr2str dtrace_program_header dtrace_class_name dtrace_program_info dtrace_close dtrace_program_link dtrace_consume dtrace_program_strcompile dtrace_ctlfd dtrace_provider_modules dtrace_desc2str dtrace_setopt dtrace_dof_create dtrace_sleep dtrace_dof_destroy dtrace_sprintf dtrace_errmsg dtrace_stability_name dtrace_errno dtrace_status dtrace_faultstr dtrace_stmt_action dtrace_fire_extern dtrace_stmt_add dtrace_format_lookup dtrace_stmt_create dtrace_fprinta dtrace_stmt_destroy dtrace_fprintf dtrace_stmt_iter dtrace_freopen dtrace_stop dtrace_getctf_dof dtrace_str2attr dtrace_geterr_dof dtrace_str2desc dtrace_getopt dtrace_subrstr dtrace_getopt_dof dtrace_symbol_type dtrace_go dtrace_system dtrace_handle_buffered dtrace_type_fcompile dtrace_handle_drop dtrace_type_strcompile dtrace_handle_err dtrace_uaddr2str dtrace_handle_proc dtrace_update dtrace_handle_setopt dtrace_vopen dtrace_id2desc dtrace_work dtrace_lookup_by_addr dtrace_xstr2desc dtrace_lookup_by_name .fi .in -2 .sp .SH FILES .sp .ne 2 .mk .na \fB\fB/lib/libdtrace.so.1\fR\fR .ad .RS 26n .rt shared object .RE .sp .ne 2 .mk .na \fB\fB/lib/64/libdtrace.so.1\fR\fR .ad .RS 26n .rt 64-bit shared object .RE .SH EXAMPLES .LP \fBExample 1\fR Simple DTrace Consumer .sp .in +2 .nf #include <dtrace.h> #include <errno.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <strings.h> static dtrace_hdl_t *g_dtp; static void fatal(const char *fmt, ...) { va_list ap; va_start(ap, fmt); (void) vfprintf(stderr, fmt, ap); if (fmt[strlen(fmt) - 1] != '\en') (void) fprintf(stderr, ": %s\en", dtrace_errmsg(g_dtp, dtrace_errno(g_dtp))); exit(EXIT_FAILURE); } static int chewrec(const dtrace_probedata_t *data, const dtrace_recdesc_t *rec, void *arg) { dtrace_actkind_t act; if (rec == NULL) return (DTRACE_CONSUME_NEXT); act = rec->dtrd_action; if (act == DTRACEACT_EXIT) return (DTRACE_CONSUME_NEXT); return (DTRACE_CONSUME_THIS); } static int chew(const dtrace_probedata_t *data, void *arg) { return (DTRACE_CONSUME_THIS); } int main(int argc, char **argv) { dtrace_prog_t *prog; dtrace_proginfo_t info; int err; FILE *fp; if ((g_dtp = dtrace_open(DTRACE_VERSION, 0, &err)) == NULL) fatal("cannot open dtrace library: %s\en", dtrace_errmsg(NULL, err)); if ((fp = fopen(argv[1], "r")) == NULL) fatal("cannot open %s\en", argv[1]); if ((prog = dtrace_program_fcompile(g_dtp, fp, 0, 0, NULL)) == NULL) fatal("invalid program"); if (dtrace_program_exec(g_dtp, prog, &info) == -1) fatal("failed to enable probes"); if (dtrace_setopt(g_dtp, "bufsize", "512k") == -1) fatal("failed to set bufsize"); if (dtrace_setopt(g_dtp, "aggsize", "512k") == -1) fatal("failed to set aggsize"); if (dtrace_go(g_dtp) != 0) fatal("dtrace_go()"); while (1) { int done = 0; dtrace_sleep(g_dtp); switch (dtrace_work(g_dtp, stdout, chew, chewrec, NULL)) { case DTRACE_WORKSTATUS_DONE: done = 1; break; case DTRACE_WORKSTATUS_OKAY: break; default: fatal("processing aborted"); } if (done) break; } if (dtrace_status(g_dtp) == -1) fatal("dtrace_stop()"); if (dtrace_stop(g_dtp) == -1) fatal("dtrace_stop()"); if (dtrace_aggregate_print(g_dtp, stdout, NULL) == -1) fatal("aggregate processing failed"); fclose(fp); dtrace_close(g_dtp); return (0); } .fi .in -2 .sp .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Architecture all _ Availability system/dtrace _ Interface Stability Committed _ MT-Level Safe .TE .sp .SH SEE ALSO .sp .LP \fBdtrace\fR(8), \fBattributes\fR(7), \fBintro\fR(3) .sp .LP \fIOracle Solaris 11.4 DTrace (Dynamic Tracing) Guide\fR