mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-17 18:06:59 +02:00
Add alias for bcc tools to run in docker container (#1278)
Add alias for bcc tools to run through Docker
This commit is contained in:
parent
acf6871237
commit
80ef9035b7
@ -16,3 +16,12 @@ fi
|
||||
|
||||
|
||||
# Put your fun stuff here.
|
||||
|
||||
alias_bcc_tool() {
|
||||
local tool="${1}"
|
||||
alias iovisor-${tool}="docker run --rm -it -v /lib/modules:/lib/modules -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/cgroup:/sys/fs/cgroup -v /sys/fs/bpf:/sys/fs/bpf --privileged --net host --pid host quay.io/iovisor/bcc /usr/share/bcc/tools/${tool}"
|
||||
}
|
||||
|
||||
bcc_debug_toolset=( tcpretrans tcpconnect tcpaccept biolatency )
|
||||
|
||||
for t in "${bcc_debug_toolset[@]}"; do alias_bcc_tool "${t}"; done
|
||||
|
Loading…
Reference in New Issue
Block a user