when i run
./hello_world.py
bash-1655 [001] .... 3172.380293: 0x00000001: Hello, World!
this example is ok. but i run ./disksnoop.py (https://github.com/iovisor/bcc/blob/master/examples/tracing/disksnoop.py) an error happend
./disksnoop.py
Traceback (most recent call last):
File "./disksnoop.py", line 15, in <module>
from bcc.utils import printb
ImportError: cannot import name printb
os version:
uname -a
Linux ubuntu-bionic 4.15.0-52-generic #56-Ubuntu SMP Tue Jun 4 22:49:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
bpfcc version:
bpfcc-tools/bionic,now 0.5.0-5ubuntu1 all [installed]
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4052245BD4284CDD
echo "deb https://repo.iovisor.org/apt/$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/iovisor.list
sudo apt-get update
sudo apt-get install bcc-tools libbcc-examples linux-headers-$(uname -r)
fixed
Most helpful comment
fixed