bashreadline(8) System Manager's Manual bashreadline(8)

# [NAME](#NAME)

bashreadline - Print entered bash commands system wide. Uses Linux eBPF/bcc.

# [SYNOPSIS](#SYNOPSIS)

**bashreadline \[-h] \[-s SHARED]**

# [DESCRIPTION](#DESCRIPTION)

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.

# [REQUIREMENTS](#REQUIREMENTS)

CONFIG\_BPF and bcc.

# [OPTIONS](#OPTIONS)

[-h](#h)

Print usage message.

[-s](#s)

Specify the location of libreadline.so shared library when you failed to run the script directly with error: "Exception: could not determine address of symbol ´readline´". Default value is /lib/libreadline.so.

# [EXAMPLES](#EXAMPLES)

[Trace bash commands system wide:](#Trace)

\# **bashreadline**

# [FIELDS](#FIELDS)

[TIME](#TIME)

Time of the command (HH:MM:SS).

[PID](#PID)

Process ID of the bash shell.

[COMMAND](#COMMAND)

Entered command.

# [OVERHEAD](#OVERHEAD)

As the rate of interactive bash commands is expected to be very low (&lt;&lt;100/s), the overhead of this program is expected to be negligible.

# [SOURCE](#SOURCE)

This is from bcc.

https://github.com/iovisor/bcc

Also look in the bcc distribution for a companion \_examples.txt file containing example usage, output, and commentary for this tool.

# [OS](#OS)

Linux

# [STABILITY](#STABILITY)

Unstable - in development.

# [AUTHOR](#AUTHOR)

Brendan Gregg

# [SEE ALSO](#SEE_ALSO)

[opensnoop(8)](/man/enterprise-packages/bcc/opensnoop.8)

2016-01-28 USER COMMANDS

---

Document: bashreadline(8) from bcc 0.37.0-r3 (Chainguard OS)
Source: https://github.com/iovisor/bcc
