blob: c23ed1cf1dc67958dd8f8a06e925dc1cc2909933 [file] [log] [blame]
Brenden Blanco41d10e22015-06-05 13:28:17 -07001#!/usr/bin/env python
2# Copyright (c) PLUMgrid, Inc.
3# Licensed under the Apache License, Version 2.0 (the "License")
4
Brenden Blanco6bf723d2015-06-18 17:53:31 -07005# run in project examples directory with:
6# sudo ./hello_world.py"
Brendan Gregge845c522015-09-07 14:51:53 -07007# see trace_fields.py for a longer example
Brenden Blanco41d10e22015-06-05 13:28:17 -07008
Brenden Blancoc35989d2015-09-02 18:04:07 -07009from bcc import BPF
Brenden Blanco41d10e22015-06-05 13:28:17 -070010
Brendan Greggaf98a1d2016-07-24 16:19:20 -070011BPF(text='int kprobe__sys_clone(void *ctx) { bpf_trace_printk("Hello, World!\\n"); return 0; }').trace_print()