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

DESCRIPTION

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

FILES

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

SEE ALSO

47       libtraceevent(3) libtracefs(3) trace-cmd(1) trace-cmd.dat(5)
48

AUTHOR

50           Steven Rostedt <rostedt@goodmis.org[1]>
51           Tzvetomir Stoyanov <tz.stoyanov@gmail.com[2]>
52

REPORTING BUGS

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

LICENSE

57       libtracecmd is Free Software licensed under the GNU LGPL 2.1
58

RESOURCES

60       https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
61

COPYING

63       Copyright (C) 2020 VMware, Inc. Free use of this software is granted
64       under the terms of the GNU Public License (GPL).
65

NOTES

67        1. rostedt@goodmis.org
68           mailto:rostedt@goodmis.org
69
70        2. tz.stoyanov@gmail.com
71           mailto:tz.stoyanov@gmail.com
72
73        3. linux-trace-devel@vger.kernel.org
74           mailto:linux-trace-devel@vger.kernel.org
75
76
77
78libtracefs                        03/29/2021                    LIBTRACECMD(3)
Impressum