1LIBTRACECMD(3)                 libtracefs Manual                LIBTRACECMD(3)
2
3
4

NAME

6       libtracecmd - trace-cmd library APIs
7

SYNOPSIS

9       #include <trace-cmd.h>
10
11       Open and close trace file:
12               struct tracecmd_input *tracecmd_open(const char *file, int flags);
13               struct tracecmd_input *tracecmd_open_fd(int fd, int flags);
14               struct tracecmd_input *tracecmd_open_head(const char *file, int flags);
15               void tracecmd_close(struct tracecmd_input *handle);
16
17       Read tracing records from a trace file:
18               int tracecmd_init_data(struct tracecmd_input *handle);
19               struct tep_record *tracecmd_read_cpu_first(struct tracecmd_input *handle, int cpu);
20               struct tep_record *tracecmd_read_data(struct tracecmd_input *handle, int cpu);
21               struct tep_record *tracecmd_read_at(struct tracecmd_input *handle, unsigned long long offset, int *cpu);
22               void tracecmd_free_record(struct tep_record *record);
23               struct tep_handle *tracecmd_get_tep(struct tracecmd_input *handle);
24
25       Read tracing instances from a trace file:
26               int tracecmd_buffer_instances(struct tracecmd_input *handle);
27               const char *tracecmd_buffer_instance_name(struct tracecmd_input *handle, int indx);
28               struct tracecmd_input *tracecmd_buffer_instance_handle(struct tracecmd_input *handle, int indx);
29
30       Get traceing peer information from a trace file:
31               unsigned long long tracecmd_get_traceid(struct tracecmd_input *handle);
32               int tracecmd_get_guest_cpumap(struct tracecmd_input *handle, unsigned long long trace_id, const char **name, int *vcpu_count, const int **cpu_pid);
33
34       Control library logs:
35               int tracecmd_set_loglevel(enum tep_loglevel level);
36

DESCRIPTION

38       The libtracecmd(3) library provides APIs to read, parse and write
39       trace-cmd.dat(5) files, recorded with trace-cmd(1) application and
40       containing tracing information from ftrace, the official Linux kernel
41       tracer.
42

FILES

44           trace-cmd.h
45                   Header file to include in order to have access to the library APIs.
46           -ltracecmd
47                   Linker switch to add when building a program that uses the library.
48

SEE ALSO

50       libtraceevent(3) libtracefs(3) trace-cmd(1) trace-cmd.dat(5)
51

AUTHOR

53           Steven Rostedt <rostedt@goodmis.org[1]>
54           Tzvetomir Stoyanov <tz.stoyanov@gmail.com[2]>
55

REPORTING BUGS

57       Report bugs to <linux-trace-devel@vger.kernel.org[3]>
58

LICENSE

60       libtracecmd is Free Software licensed under the GNU LGPL 2.1
61

RESOURCES

63       https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
64

COPYING

66       Copyright (C) 2020 VMware, Inc. Free use of this software is granted
67       under the terms of the GNU Public License (GPL).
68

NOTES

70        1. rostedt@goodmis.org
71           mailto:rostedt@goodmis.org
72
73        2. tz.stoyanov@gmail.com
74           mailto:tz.stoyanov@gmail.com
75
76        3. linux-trace-devel@vger.kernel.org
77           mailto:linux-trace-devel@vger.kernel.org
78
79
80
81libtracefs                        09/08/2022                    LIBTRACECMD(3)
Impressum