|bashreadline(8)||System Manager's Manual||bashreadline(8)|
bashreadline - Print entered bash commands system wide. Uses Linux eBPF/bcc.
bashreadline [-h] [-s SHARED]
bashreadline traces the return of the readline() function using uprobes, to show the bash commands that were entered interactively, system wide. The entered command may fail: this is just showing what was entered.
This program is also a basic example of eBPF/bcc and uprobes.
This makes use of a Linux 4.4 feature (bpf_perf_event_output()); for kernels older than 4.4, see the version under tools/old, which uses an older mechanism
Since this uses BPF, only the root user can use this tool.
CONFIG_BPF and bcc.
- Trace bash commands system wide:
- # bashreadline
As the rate of interactive bash commands is expected to be very low (<<100/s), the overhead of this program is expected to be negligible.
This is from bcc.
Also look in the bcc distribution for a companion _examples.txt file containing example usage, output, and commentary for this tool.
Unstable - in development.