blob: bc68a491c342b552a5008fc460421957f9dd1ceb [file] [log] [blame]
Brendan Greggaa879972016-01-28 22:43:37 -08001.TH bashreadline 8 "2016-01-28" "USER COMMANDS"
2.SH NAME
3bashreadline \- Print entered bash commands system wide. Uses Linux eBPF/bcc.
4.SH SYNOPSIS
JayceCaob26e26b2019-02-18 14:55:12 +08005.B bashreadline [\-h] [\-s SHARED]
Brendan Greggaa879972016-01-28 22:43:37 -08006.SH DESCRIPTION
7bashreadline traces the return of the readline() function using uprobes, to
8show the bash commands that were entered interactively, system wide. The
9entered command may fail: this is just showing what was entered.
10
11This program is also a basic example of eBPF/bcc and uprobes.
12
Paul Chaignon4f0a8872019-12-27 19:24:49 +010013This makes use of a Linux 4.4 feature (bpf_perf_event_output());
14for kernels older than 4.4, see the version under tools/old,
mcaleavyacbe10b52016-02-12 20:10:59 +000015which uses an older mechanism
16
Brendan Greggaa879972016-01-28 22:43:37 -080017Since this uses BPF, only the root user can use this tool.
18.SH REQUIREMENTS
19CONFIG_BPF and bcc.
JayceCaob26e26b2019-02-18 14:55:12 +080020.SH OPTIONS
21.TP
22\-h
23Print usage message.
24.TP
25\-s
26Specify the location of libreadline.so shared library when you failed to run the
27script directly with error: "Exception: could not determine address of symbol
28\'readline\'". Default value is /lib/libreadline.so.
Brendan Greggaa879972016-01-28 22:43:37 -080029.SH EXAMPLES
30.TP
31Trace bash commands system wide:
32#
33.B bashreadline
34.SH FIELDS
35.TP
36TIME
37Time of the command (HH:MM:SS).
38.TP
39PID
40Process ID of the bash shell.
41.TP
42COMMAND
43Entered command.
44.SH OVERHEAD
45As the rate of interactive bash commands is expected to be very low (<<100/s),
46the overhead of this program is expected to be negligible.
47.SH SOURCE
48This is from bcc.
49.IP
50https://github.com/iovisor/bcc
51.PP
52Also look in the bcc distribution for a companion _examples.txt file containing
53example usage, output, and commentary for this tool.
54.SH OS
55Linux
56.SH STABILITY
57Unstable - in development.
58.SH AUTHOR
59Brendan Gregg
60.SH SEE ALSO
61opensnoop(8)