• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python
2# Copyright (c) PLUMgrid, Inc.
3# Licensed under the Apache License, Version 2.0 (the "License")
4
5# run in project examples directory with:
6# sudo ./hello_world.py"
7# see trace_fields.py for a longer example
8
9from bcc import BPF
10
11# This may not work for 4.17 on x64, you need replace kprobe__sys_clone with kprobe____x64_sys_clone
12BPF(text='int kprobe__sys_clone(void *ctx) { bpf_trace_printk("Hello, World!\\n"); return 0; }').trace_print()
13