1*387f9dfdSAndroid Build Coastguard Worker# bcc snap 2*387f9dfdSAndroid Build Coastguard Worker 3*387f9dfdSAndroid Build Coastguard WorkerThis is an unconfined snap of the BPF Compiler Collection (BCC), a toolkit for 4*387f9dfdSAndroid Build Coastguard Workercreating efficient kernel tracing and manipulation programs. 5*387f9dfdSAndroid Build Coastguard Worker 6*387f9dfdSAndroid Build Coastguard WorkerFirst, install snapcraft, e.g. on Ubuntu: 7*387f9dfdSAndroid Build Coastguard Worker 8*387f9dfdSAndroid Build Coastguard Workersudo snap install snapcraft --classic 9*387f9dfdSAndroid Build Coastguard Worker 10*387f9dfdSAndroid Build Coastguard WorkerClone the bcc repo (if you haven't done so already) and create the snap: 11*387f9dfdSAndroid Build Coastguard Worker 12*387f9dfdSAndroid Build Coastguard Worker git clone https://github.com/iovisor/bcc.git 13*387f9dfdSAndroid Build Coastguard Worker snapcraft 14*387f9dfdSAndroid Build Coastguard Worker 15*387f9dfdSAndroid Build Coastguard WorkerInstall the snap by running (`--dangerous` is required as the snap is 16*387f9dfdSAndroid Build Coastguard Workernot coming from the Snap Store): 17*387f9dfdSAndroid Build Coastguard Worker 18*387f9dfdSAndroid Build Coastguard Worker sudo snap install --dangerous bcc_*.snap 19*387f9dfdSAndroid Build Coastguard Worker 20*387f9dfdSAndroid Build Coastguard WorkerOne may need to ensure the snap interfaces are connected for the snap 21*387f9dfdSAndroid Build Coastguard Workerusing: 22*387f9dfdSAndroid Build Coastguard Worker 23*387f9dfdSAndroid Build Coastguard Worker sudo snap connect bcc:mount-observe 24*387f9dfdSAndroid Build Coastguard Worker sudo snap connect bcc:system-observe 25*387f9dfdSAndroid Build Coastguard Worker sudo snap connect bcc:system-trace 26*387f9dfdSAndroid Build Coastguard Worker 27*387f9dfdSAndroid Build Coastguard WorkerNow run a bcc tool, for example, to run opensnoop use: 28*387f9dfdSAndroid Build Coastguard Worker 29*387f9dfdSAndroid Build Coastguard Worker sudo bcc.opensnoop 30*387f9dfdSAndroid Build Coastguard Worker 31*387f9dfdSAndroid Build Coastguard WorkerNote that this may fail to build and run if you do not have the kernel 32*387f9dfdSAndroid Build Coastguard Workerheaders installed or perhaps the kernel config is not set up correctly. 33*387f9dfdSAndroid Build Coastguard Worker 34*387f9dfdSAndroid Build Coastguard WorkerThis snap has been tested using the mainly 4.8 and 4.9 kernels built 35*387f9dfdSAndroid Build Coastguard Workerwith the Ubuntu Yakkety and Zesty kernel configs as well as the default 36*387f9dfdSAndroid Build Coastguard WorkerUbuntu 4.8 Yakkey and 4.9 Zesty kernels. 37*387f9dfdSAndroid Build Coastguard Worker 38*387f9dfdSAndroid Build Coastguard WorkerContact Colin Ian King <[email protected]> for support on this 39*387f9dfdSAndroid Build Coastguard Workerbcc snap. 40*387f9dfdSAndroid Build Coastguard Worker 41*387f9dfdSAndroid Build Coastguard WorkerThu 15 Dec 17:08:29 GMT 2016 42