File bcc-python3.patch of Package bcc.13112
From d1de8de6459b00f311a66acc775d32eb77e58942 Mon Sep 17 00:00:00 2001
From: Gary Lin <glin@suse.com>
Date: Thu, 8 Feb 2018 11:37:57 +0800
Subject: [PATCH] Use python3 by default
Based on the patch from manfred.h@gmx.net
Signed-off-by: Gary Lin <glin@suse.com>
---
docs/reference_guide.md | 4 ++--
examples/hello_world.py | 2 +-
examples/networking/distributed_bridge/main.py | 6 +++---
examples/networking/distributed_bridge/tunnel.py | 2 +-
examples/networking/distributed_bridge/tunnel_mesh.py | 2 +-
examples/networking/dns_matching/dns_matching.py | 2 +-
examples/networking/http_filter/README.md | 6 +++---
examples/networking/http_filter/http-parse-complete.py | 2 +-
examples/networking/http_filter/http-parse-simple.py | 2 +-
examples/networking/neighbor_sharing/tc_neighbor_sharing.py | 2 +-
examples/networking/simple_tc.py | 2 +-
examples/networking/tc_perf_event.py | 2 +-
examples/networking/tunnel_monitor/README.md | 2 +-
examples/networking/tunnel_monitor/main.py | 4 ++--
examples/networking/tunnel_monitor/monitor.py | 2 +-
examples/networking/vlan_learning/vlan_learning.py | 4 ++--
examples/networking/xdp/xdp_drop_count.py | 2 +-
examples/tracing/bitehist.py | 2 +-
examples/tracing/disksnoop.py | 2 +-
examples/tracing/hello_fields.py | 2 +-
examples/tracing/hello_perf_output.py | 2 +-
examples/tracing/kvm_hypercall.py | 2 +-
examples/tracing/mallocstacks.py | 2 +-
examples/tracing/mysqld_query.py | 2 +-
examples/tracing/nodejs_http_server.py | 2 +-
examples/tracing/stacksnoop.py | 2 +-
examples/tracing/strlen_count.py | 2 +-
examples/tracing/strlen_hist.py | 2 +-
examples/tracing/strlen_snoop.py | 2 +-
examples/tracing/sync_timing.py | 2 +-
examples/tracing/task_switch.py | 2 +-
examples/tracing/tcpv4connect.py | 2 +-
examples/tracing/trace_fields.py | 2 +-
examples/tracing/trace_perf_output.py | 2 +-
examples/tracing/urandomread-explicit.py | 2 +-
examples/tracing/urandomread.py | 2 +-
examples/tracing/vfsreadlat.py | 2 +-
examples/usdt_sample/usdt_sample.md | 10 +++++-----
snapcraft/wrapper | 2 +-
src/python/bcc/__init__.py | 2 +-
tests/lua/test_uprobes.lua | 6 +++---
tests/python/test_array.py | 2 +-
tests/python/test_bpf_log.py | 2 +-
tests/python/test_brb.py | 2 +-
tests/python/test_brb2.py | 2 +-
tests/python/test_call1.py | 2 +-
tests/python/test_callchain.py | 2 +-
tests/python/test_clang.py | 2 +-
tests/python/test_debuginfo.py | 2 +-
tests/python/test_dump_func.py | 2 +-
tests/python/test_flags.py | 2 +-
tests/python/test_histogram.py | 2 +-
tests/python/test_lpm_trie.py | 2 +-
tests/python/test_lru.py | 2 +-
tests/python/test_percpu.py | 2 +-
tests/python/test_perf_event.py | 2 +-
tests/python/test_probe_count.py | 2 +-
tests/python/test_shared_table.py | 2 +-
tests/python/test_stackid.py | 2 +-
tests/python/test_stat1.py | 2 +-
tests/python/test_tools_memleak.py | 2 +-
tests/python/test_tools_smoke.py | 2 +-
tests/python/test_trace1.py | 2 +-
tests/python/test_trace2.py | 2 +-
tests/python/test_trace3.py | 2 +-
tests/python/test_trace4.py | 2 +-
tests/python/test_tracepoint.py | 2 +-
tests/python/test_uprobes.py | 12 ++++++------
tests/python/test_usdt.py | 2 +-
tests/python/test_usdt2.py | 2 +-
tests/python/test_utils.py | 2 +-
tests/python/test_xlate1.py | 2 +-
tools/argdist.py | 2 +-
tools/bashreadline.py | 2 +-
tools/biolatency.py | 2 +-
tools/biosnoop.py | 2 +-
tools/biotop.py | 2 +-
tools/bitesize.py | 2 +-
tools/bpflist.py | 2 +-
tools/btrfsdist.py | 2 +-
tools/btrfsslower.py | 2 +-
tools/cachestat.py | 2 +-
tools/cachetop.py | 2 +-
tools/capable.py | 2 +-
tools/cpudist.py | 2 +-
tools/cpuunclaimed.py | 2 +-
tools/dbslower.py | 2 +-
tools/dbstat.py | 2 +-
tools/dcsnoop.py | 2 +-
tools/dcstat.py | 2 +-
tools/deadlock_detector.py | 2 +-
tools/execsnoop.py | 2 +-
tools/ext4dist.py | 2 +-
tools/ext4slower.py | 2 +-
tools/filelife.py | 2 +-
tools/fileslower.py | 2 +-
tools/filetop.py | 2 +-
tools/funccount.py | 2 +-
tools/funclatency.py | 2 +-
tools/funcslower.py | 2 +-
tools/gethostlatency.py | 2 +-
tools/hardirqs.py | 2 +-
tools/killsnoop.py | 2 +-
tools/lib/ucalls.py | 2 +-
tools/lib/uflow.py | 2 +-
tools/lib/ugc.py | 2 +-
tools/lib/uobjnew.py | 2 +-
tools/lib/ustat.py | 2 +-
tools/lib/uthreads.py | 2 +-
tools/llcstat.py | 2 +-
tools/mdflush.py | 2 +-
tools/memleak.py | 2 +-
tools/mountsnoop.py | 2 +-
tools/mysqld_qslower.py | 2 +-
tools/nfsdist.py | 2 +-
tools/nfsslower.py | 2 +-
tools/offcputime.py | 2 +-
tools/offwaketime.py | 2 +-
tools/old/bashreadline.py | 2 +-
tools/old/biosnoop.py | 2 +-
tools/old/filelife.py | 2 +-
tools/old/gethostlatency.py | 2 +-
tools/old/killsnoop.py | 2 +-
tools/old/memleak.py | 2 +-
tools/old/offcputime.py | 2 +-
tools/old/offwaketime.py | 2 +-
tools/old/opensnoop.py | 2 +-
tools/old/profile.py | 2 +-
tools/old/softirqs.py | 2 +-
tools/old/stackcount.py | 2 +-
tools/old/stacksnoop.py | 2 +-
tools/old/statsnoop.py | 2 +-
tools/old/syncsnoop.py | 2 +-
tools/old/tcpaccept.py | 2 +-
tools/old/tcpconnect.py | 2 +-
tools/old/wakeuptime.py | 2 +-
tools/oomkill.py | 2 +-
tools/opensnoop.py | 2 +-
tools/pidpersec.py | 2 +-
tools/profile.py | 2 +-
tools/runqlat.py | 2 +-
tools/runqlen.py | 2 +-
tools/slabratetop.py | 2 +-
tools/softirqs.py | 2 +-
tools/solisten.py | 2 +-
tools/sslsniff.py | 2 +-
tools/stackcount.py | 2 +-
tools/statsnoop.py | 2 +-
tools/syncsnoop.py | 2 +-
tools/syscount.py | 2 +-
tools/tcpaccept.py | 2 +-
tools/tcpconnect.py | 2 +-
tools/tcpconnlat.py | 2 +-
tools/tcplife.py | 2 +-
tools/tcpretrans.py | 2 +-
tools/tcptop.py | 2 +-
tools/tcptracer.py | 2 +-
tools/tplist.py | 2 +-
tools/trace.py | 2 +-
tools/ttysnoop.py | 2 +-
tools/vfscount.py | 2 +-
tools/vfsstat.py | 2 +-
tools/wakeuptime.py | 2 +-
tools/xfsdist.py | 2 +-
tools/xfsslower.py | 2 +-
tools/zfsdist.py | 2 +-
tools/zfsslower.py | 2 +-
167 files changed, 185 insertions(+), 185 deletions(-)
diff --git a/docs/reference_guide.md b/docs/reference_guide.md
index b4c056b..f9963a6 100644
--- a/docs/reference_guide.md
+++ b/docs/reference_guide.md
@@ -802,7 +802,7 @@ Other examples:
```Python
b.attach_uprobe(name="c", sym="getaddrinfo", fn_name="do_entry")
-b.attach_uprobe(name="/usr/bin/python", sym="main", fn_name="do_main")
+b.attach_uprobe(name="/usr/bin/python3", sym="main", fn_name="do_main")
```
You can call attach_uprobe() more than once, and attach your BPF function to multiple user-level functions.
@@ -831,7 +831,7 @@ Other examples:
```Python
b.attach_uprobe(name="c", sym="getaddrinfo", fn_name="do_entry")
-b.attach_uprobe(name="/usr/bin/python", sym="main", fn_name="do_main")
+b.attach_uprobe(name="/usr/bin/python3", sym="main", fn_name="do_main")
```
You can call attach_uretprobe() more than once, and attach your BPF function to multiple user-level functions.
diff --git a/examples/hello_world.py b/examples/hello_world.py
index c23ed1c..1c52097 100755
--- a/examples/hello_world.py
+++ b/examples/hello_world.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/examples/networking/distributed_bridge/main.py b/examples/networking/distributed_bridge/main.py
index 056443e..10fe357 100755
--- a/examples/networking/distributed_bridge/main.py
+++ b/examples/networking/distributed_bridge/main.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
@@ -45,9 +45,9 @@ class TunnelSimulation(Simulation):
host_info.append(self._create_ns("host%d" % i, ipaddr=ipaddr,
disable_ipv6=True))
if multicast:
- cmd = ["python", "tunnel.py", str(i)]
+ cmd = ["python3", "tunnel.py", str(i)]
else:
- cmd = ["python", "tunnel_mesh.py", str(num_hosts), str(i), str(dhcp), str(gretap)]
+ cmd = ["python3", "tunnel_mesh.py", str(num_hosts), str(i), str(dhcp), str(gretap)]
p = NSPopen(host_info[i][0].nl.netns, cmd, stdin=PIPE)
self.processes.append(p)
with self.ipdb.create(ifname="br-fabric", kind="bridge") as br:
diff --git a/examples/networking/distributed_bridge/tunnel.py b/examples/networking/distributed_bridge/tunnel.py
index ef94292..e0e333d 100755
--- a/examples/networking/distributed_bridge/tunnel.py
+++ b/examples/networking/distributed_bridge/tunnel.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/examples/networking/distributed_bridge/tunnel_mesh.py b/examples/networking/distributed_bridge/tunnel_mesh.py
index f111ac9..98995b9 100644
--- a/examples/networking/distributed_bridge/tunnel_mesh.py
+++ b/examples/networking/distributed_bridge/tunnel_mesh.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/examples/networking/dns_matching/dns_matching.py b/examples/networking/dns_matching/dns_matching.py
index 943dca5..47d9945 100755
--- a/examples/networking/dns_matching/dns_matching.py
+++ b/examples/networking/dns_matching/dns_matching.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from __future__ import print_function
from bcc import BPF
diff --git a/examples/networking/http_filter/README.md b/examples/networking/http_filter/README.md
index 8e1daf1..c40be73 100644
--- a/examples/networking/http_filter/README.md
+++ b/examples/networking/http_filter/README.md
@@ -7,7 +7,7 @@ eBPF application that parses HTTP packets and extracts (and prints on screen) th
## Usage Example
- $ sudo python http-parse-complete.py
+ $ sudo python3 http-parse-complete.py
GET /pipermail/iovisor-dev/ HTTP/1.1
HTTP/1.1 200 OK
GET /favicon.ico HTTP/1.1
@@ -43,5 +43,5 @@ Two versions of this code are available in this repository:
This sample can be executed by typing either one the two commands below:
- $ sudo python http-parse-simple.py
- $ sudo python http-parse-complete.py
+ $ sudo python3 http-parse-simple.py
+ $ sudo python3 http-parse-complete.py
diff --git a/examples/networking/http_filter/http-parse-complete.py b/examples/networking/http_filter/http-parse-complete.py
index f1e5e0a..e364d9a 100644
--- a/examples/networking/http_filter/http-parse-complete.py
+++ b/examples/networking/http_filter/http-parse-complete.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
#Bertrone Matteo - Polytechnic of Turin
#November 2015
diff --git a/examples/networking/http_filter/http-parse-simple.py b/examples/networking/http_filter/http-parse-simple.py
index b702393..78745ee 100644
--- a/examples/networking/http_filter/http-parse-simple.py
+++ b/examples/networking/http_filter/http-parse-simple.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
#Bertrone Matteo - Polytechnic of Turin
#November 2015
diff --git a/examples/networking/neighbor_sharing/tc_neighbor_sharing.py b/examples/networking/neighbor_sharing/tc_neighbor_sharing.py
index 43799c9..b9d227f 100755
--- a/examples/networking/neighbor_sharing/tc_neighbor_sharing.py
+++ b/examples/networking/neighbor_sharing/tc_neighbor_sharing.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/examples/networking/simple_tc.py b/examples/networking/simple_tc.py
index ec0a3e7..7068516 100755
--- a/examples/networking/simple_tc.py
+++ b/examples/networking/simple_tc.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/examples/networking/tc_perf_event.py b/examples/networking/tc_perf_event.py
index f181a4b..ef560d6 100755
--- a/examples/networking/tc_perf_event.py
+++ b/examples/networking/tc_perf_event.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# tc_perf_event.py Output skb and meta data through perf event
#
diff --git a/examples/networking/tunnel_monitor/README.md b/examples/networking/tunnel_monitor/README.md
index 92cb467..5b3e239 100644
--- a/examples/networking/tunnel_monitor/README.md
+++ b/examples/networking/tunnel_monitor/README.md
@@ -40,7 +40,7 @@ fastclick#1.0.6 bower_components/fastclick
Then, start the simulation by running main.py:
```
-[root@bcc-dev tunnel_monitor]# python main.py
+[root@bcc-dev tunnel_monitor]# python3 main.py
Launching host 1 of 9
Launching host 2 of 9
...
diff --git a/examples/networking/tunnel_monitor/main.py b/examples/networking/tunnel_monitor/main.py
index d3359ef..f665e14 100755
--- a/examples/networking/tunnel_monitor/main.py
+++ b/examples/networking/tunnel_monitor/main.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
@@ -61,7 +61,7 @@ class TunnelSimulation(Simulation):
# pick one host to start the monitor in
host = host_info[0]
- cmd = ["python", "monitor.py"]
+ cmd = ["python3", "monitor.py"]
p = NSPopen(host[0].nl.netns, cmd)
self.processes.append(p)
diff --git a/examples/networking/tunnel_monitor/monitor.py b/examples/networking/tunnel_monitor/monitor.py
index bac3420..47365c0 100644
--- a/examples/networking/tunnel_monitor/monitor.py
+++ b/examples/networking/tunnel_monitor/monitor.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/examples/networking/vlan_learning/vlan_learning.py b/examples/networking/vlan_learning/vlan_learning.py
index a902320..052394c 100755
--- a/examples/networking/vlan_learning/vlan_learning.py
+++ b/examples/networking/vlan_learning/vlan_learning.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
@@ -33,7 +33,7 @@ class VlanSimulation(Simulation):
for i in range(0, num_clients):
httpmod = ("SimpleHTTPServer" if sys.version_info[0] < 3
else "http.server")
- cmd = ["python", "-m", httpmod, "80"]
+ cmd = ["python3", "-m", httpmod, "80"]
self._create_ns("worker%d" % i, cmd=cmd, fn=virt_fn, action="drop",
ipaddr="172.16.1.5/24")
diff --git a/examples/networking/xdp/xdp_drop_count.py b/examples/networking/xdp/xdp_drop_count.py
index ff0af0f..45af2f9 100755
--- a/examples/networking/xdp/xdp_drop_count.py
+++ b/examples/networking/xdp/xdp_drop_count.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# xdp_drop_count.py Drop incoming packets on XDP layer and count for which
# protocol type
diff --git a/examples/tracing/bitehist.py b/examples/tracing/bitehist.py
index 1dee5dc..7a63aaf 100755
--- a/examples/tracing/bitehist.py
+++ b/examples/tracing/bitehist.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# bitehist.py Block I/O size histogram.
# For Linux, uses BCC, eBPF. Embedded C.
diff --git a/examples/tracing/disksnoop.py b/examples/tracing/disksnoop.py
index ed3dd81..f24e749 100755
--- a/examples/tracing/disksnoop.py
+++ b/examples/tracing/disksnoop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# disksnoop.py Trace block device I/O: basic version of iosnoop.
# For Linux, uses BCC, eBPF. Embedded C.
diff --git a/examples/tracing/hello_fields.py b/examples/tracing/hello_fields.py
index 1525f04..b5000e7 100755
--- a/examples/tracing/hello_fields.py
+++ b/examples/tracing/hello_fields.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# This is a Hello World example that formats output as fields.
diff --git a/examples/tracing/hello_perf_output.py b/examples/tracing/hello_perf_output.py
index cfff264..6ddf54a 100755
--- a/examples/tracing/hello_perf_output.py
+++ b/examples/tracing/hello_perf_output.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# This is a Hello World example that uses BPF_PERF_OUTPUT.
diff --git a/examples/tracing/kvm_hypercall.py b/examples/tracing/kvm_hypercall.py
index 322bb8e..0ffe926 100755
--- a/examples/tracing/kvm_hypercall.py
+++ b/examples/tracing/kvm_hypercall.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# kvm_hypercall.py
#
diff --git a/examples/tracing/mallocstacks.py b/examples/tracing/mallocstacks.py
index 36a0a7f..64751c8 100644
--- a/examples/tracing/mallocstacks.py
+++ b/examples/tracing/mallocstacks.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# mallocstacks Trace malloc() calls in a process and print the full
# stack trace for all callsites.
diff --git a/examples/tracing/mysqld_query.py b/examples/tracing/mysqld_query.py
index 15ff297..59f4c9d 100755
--- a/examples/tracing/mysqld_query.py
+++ b/examples/tracing/mysqld_query.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# mysqld_query Trace MySQL server queries. Example of USDT tracing.
# For Linux, uses BCC, BPF. Embedded C.
diff --git a/examples/tracing/nodejs_http_server.py b/examples/tracing/nodejs_http_server.py
index 1017de5..8c39706 100755
--- a/examples/tracing/nodejs_http_server.py
+++ b/examples/tracing/nodejs_http_server.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# nodejs_http_server Basic example of node.js USDT tracing.
# For Linux, uses BCC, BPF. Embedded C.
diff --git a/examples/tracing/stacksnoop.py b/examples/tracing/stacksnoop.py
index e4bbb51..9d53dc7 100755
--- a/examples/tracing/stacksnoop.py
+++ b/examples/tracing/stacksnoop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# stacksnoop Trace a kernel function and print all kernel stack traces.
# For Linux, uses BCC, eBPF, and currently x86_64 only. Inline C.
diff --git a/examples/tracing/strlen_count.py b/examples/tracing/strlen_count.py
index 7d2db89..982ca51 100755
--- a/examples/tracing/strlen_count.py
+++ b/examples/tracing/strlen_count.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# strlen_count Trace strlen() and print a frequency count of strings.
# For Linux, uses BCC, eBPF. Embedded C.
diff --git a/examples/tracing/strlen_hist.py b/examples/tracing/strlen_hist.py
index dda1cb2..fce4df0 100755
--- a/examples/tracing/strlen_hist.py
+++ b/examples/tracing/strlen_hist.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# strlen_hist.py Histogram of system-wide strlen return values
diff --git a/examples/tracing/strlen_snoop.py b/examples/tracing/strlen_snoop.py
index c3c7199..d4331b5 100755
--- a/examples/tracing/strlen_snoop.py
+++ b/examples/tracing/strlen_snoop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# strlen_snoop Trace strlen() library function for a given PID.
# For Linux, uses BCC, eBPF. Embedded C.
diff --git a/examples/tracing/sync_timing.py b/examples/tracing/sync_timing.py
index 4fdcb6d..4acc376 100755
--- a/examples/tracing/sync_timing.py
+++ b/examples/tracing/sync_timing.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# sync_timing.py Trace time between syncs.
# For Linux, uses BCC, eBPF. Embedded C.
diff --git a/examples/tracing/task_switch.py b/examples/tracing/task_switch.py
index 7a73d8b..9f093c7 100755
--- a/examples/tracing/task_switch.py
+++ b/examples/tracing/task_switch.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/examples/tracing/tcpv4connect.py b/examples/tracing/tcpv4connect.py
index 8a89469..b426a59 100755
--- a/examples/tracing/tcpv4connect.py
+++ b/examples/tracing/tcpv4connect.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# tcpv4connect Trace TCP IPv4 connect()s.
# For Linux, uses BCC, eBPF. Embedded C.
diff --git a/examples/tracing/trace_fields.py b/examples/tracing/trace_fields.py
index 173f21f..35ce043 100755
--- a/examples/tracing/trace_fields.py
+++ b/examples/tracing/trace_fields.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/examples/tracing/trace_perf_output.py b/examples/tracing/trace_perf_output.py
index 62cb7a8..1b02e46 100755
--- a/examples/tracing/trace_perf_output.py
+++ b/examples/tracing/trace_perf_output.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/examples/tracing/urandomread-explicit.py b/examples/tracing/urandomread-explicit.py
index 17049c7..1e4d516 100755
--- a/examples/tracing/urandomread-explicit.py
+++ b/examples/tracing/urandomread-explicit.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# urandomread-explicit Example of instrumenting a kernel tracepoint.
# For Linux, uses BCC, BPF. Embedded C.
diff --git a/examples/tracing/urandomread.py b/examples/tracing/urandomread.py
index 2f46bda..c0c894a 100755
--- a/examples/tracing/urandomread.py
+++ b/examples/tracing/urandomread.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# urandomread Example of instrumenting a kernel tracepoint.
# For Linux, uses BCC, BPF. Embedded C.
diff --git a/examples/tracing/vfsreadlat.py b/examples/tracing/vfsreadlat.py
index bd16dd5..fd634c2 100755
--- a/examples/tracing/vfsreadlat.py
+++ b/examples/tracing/vfsreadlat.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# vfsreadlat.py VFS read latency distribution.
# For Linux, uses BCC, eBPF. See .c file.
diff --git a/examples/usdt_sample/usdt_sample.md b/examples/usdt_sample/usdt_sample.md
index c6b5a07..7fdef28 100644
--- a/examples/usdt_sample/usdt_sample.md
+++ b/examples/usdt_sample/usdt_sample.md
@@ -25,7 +25,7 @@ $ popd
After building, you should see the available probes:
```bash
-$ python tools/tplist.py -l examples/usdt_sample/build/usdt_sample_lib1/libusdt_sample_lib1.so
+$ python3 tools/tplist.py -l examples/usdt_sample/build/usdt_sample_lib1/libusdt_sample_lib1.so
examples/usdt_sample/build/usdt_sample_lib1/libusdt_sample_lib1.so usdt_sample_lib1:operation_end
examples/usdt_sample/build/usdt_sample_lib1/libusdt_sample_lib1.so usdt_sample_lib1:operation_start
$ readelf -n examples/usdt_sample/build/usdt_sample_lib1/libusdt_sample_lib1.so
@@ -64,7 +64,7 @@ Press ctrl-c to exit.
Use argdist.py on the individual probes:
```bash
-$ sudo python tools/argdist.py -p 25433 -i 5 -C 'u:usdt_sample_lib1:operation_start():char*:arg2#input' -z 32
+$ sudo python3 tools/argdist.py -p 25433 -i 5 -C 'u:usdt_sample_lib1:operation_start():char*:arg2#input' -z 32
[11:18:29]
input
COUNT EVENT
@@ -97,7 +97,7 @@ input
Use latency.py to trace the operation latencies:
```bash
-$ sudo python examples/usdt_sample/scripts/latency.py -p=25433 -f="pf_2"
+$ sudo python3 examples/usdt_sample/scripts/latency.py -p=25433 -f="pf_2"
Attaching probes to pid 25433
Tracing... Hit Ctrl-C to end.
time(s) id input output start (ns) end (ns) duration (us)
@@ -121,7 +121,7 @@ time(s) id input output
Use lat_dist.py to trace the latency distribution:
```bash
-$ sudo python examples/usdt_sample/scripts/lat_dist.py -p=25433 -i=30 -f="pf_20"
+$ sudo python3 examples/usdt_sample/scripts/lat_dist.py -p=25433 -i=30 -f="pf_20"
Attaching probes to pid 25433
[11:23:47]
@@ -147,7 +147,7 @@ Bucket ptr = 'pf_20'
Use lat_avg.py to trace the moving average of the latencies:
```bash
-$ sudo python examples/usdt_sample/scripts/lat_avg.py -p=25433 -i=5 -c=10 -f="pf_2"
+$ sudo python3 examples/usdt_sample/scripts/lat_avg.py -p=25433 -i=5 -c=10 -f="pf_2"
Attaching probes to pid 25433
Tracing... Hit Ctrl-C to end.
[11:28:32]
diff --git a/snapcraft/wrapper b/snapcraft/wrapper
index 0256962..ab24687 100755
--- a/snapcraft/wrapper
+++ b/snapcraft/wrapper
@@ -7,7 +7,7 @@
cmd="$1"
if [ `id -u` = 0 ] ; then
shift
- stdbuf -oL $SNAP/usr/bin/python "$SNAP/usr/share/bcc/tools/$cmd" $@
+ stdbuf -oL $SNAP/usr/bin/python3 "$SNAP/usr/share/bcc/tools/$cmd" $@
else
echo "Need to run $cmd as root (use sudo $@)"
exit 1
diff --git a/src/python/bcc/__init__.py b/src/python/bcc/__init__.py
index 97cc70d..8e38bee 100644
--- a/src/python/bcc/__init__.py
+++ b/src/python/bcc/__init__.py
@@ -813,7 +813,7 @@ class BPF(object):
version of the library used by the process.
Example: BPF(text).attach_uprobe("c", "malloc")
- BPF(text).attach_uprobe("/usr/bin/python", "main")
+ BPF(text).attach_uprobe("/usr/bin/python3", "main")
"""
name = str(name)
diff --git a/tests/lua/test_uprobes.lua b/tests/lua/test_uprobes.lua
index 059486e..b969cb6 100644
--- a/tests/lua/test_uprobes.lua
+++ b/tests/lua/test_uprobes.lua
@@ -54,10 +54,10 @@ int count(struct pt_regs *ctx) {
}]]
local b = BPF:new{text=text}
- b:attach_uprobe{name="/usr/bin/python", sym="main", fn_name="count"}
- b:attach_uprobe{name="/usr/bin/python", sym="main", fn_name="count", retprobe=true}
+ b:attach_uprobe{name="/usr/bin/python3", sym="main", fn_name="count"}
+ b:attach_uprobe{name="/usr/bin/python3", sym="main", fn_name="count", retprobe=true}
- os.spawn("/usr/bin/python -V")
+ os.spawn("/usr/bin/python3 -V")
local stats = b:get_table("stats")
assert_true(tonumber(stats:get(0)) >= 2)
diff --git a/tests/python/test_array.py b/tests/python/test_array.py
index 9a78656..36d5178 100755
--- a/tests/python/test_array.py
+++ b/tests/python/test_array.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_bpf_log.py b/tests/python/test_bpf_log.py
index cb3d003..e38c5ea 100755
--- a/tests/python/test_bpf_log.py
+++ b/tests/python/test_bpf_log.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_brb.py b/tests/python/test_brb.py
index 9a05a14..8ebf075 100755
--- a/tests/python/test_brb.py
+++ b/tests/python/test_brb.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_brb2.py b/tests/python/test_brb2.py
index a0a0ecc..112bc48 100755
--- a/tests/python/test_brb2.py
+++ b/tests/python/test_brb2.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_call1.py b/tests/python/test_call1.py
index 68d68de..201944a 100755
--- a/tests/python/test_call1.py
+++ b/tests/python/test_call1.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_callchain.py b/tests/python/test_callchain.py
index 8dc90e9..735b100 100755
--- a/tests/python/test_callchain.py
+++ b/tests/python/test_callchain.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_clang.py b/tests/python/test_clang.py
index bd882d1..ebe9011 100755
--- a/tests/python/test_clang.py
+++ b/tests/python/test_clang.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_debuginfo.py b/tests/python/test_debuginfo.py
index 23ff760..01dc1ab 100755
--- a/tests/python/test_debuginfo.py
+++ b/tests/python/test_debuginfo.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) Sasha Goldshtein
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_dump_func.py b/tests/python/test_dump_func.py
index 6fd3b49..56872f5 100755
--- a/tests/python/test_dump_func.py
+++ b/tests/python/test_dump_func.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_flags.py b/tests/python/test_flags.py
index a5d2b42..1e0cb5a 100644
--- a/tests/python/test_flags.py
+++ b/tests/python/test_flags.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_histogram.py b/tests/python/test_histogram.py
index 1e95ef3..5a128e6 100755
--- a/tests/python/test_histogram.py
+++ b/tests/python/test_histogram.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_lpm_trie.py b/tests/python/test_lpm_trie.py
index 560cb4b..6a7dc31 100644
--- a/tests/python/test_lpm_trie.py
+++ b/tests/python/test_lpm_trie.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) 2017 Facebook, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_lru.py b/tests/python/test_lru.py
index f900bcb..d39d0ba 100644
--- a/tests/python/test_lru.py
+++ b/tests/python/test_lru.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_percpu.py b/tests/python/test_percpu.py
index 5ab3691..4dd2846 100755
--- a/tests/python/test_percpu.py
+++ b/tests/python/test_percpu.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_perf_event.py b/tests/python/test_perf_event.py
index a7c8721..d911d9d 100755
--- a/tests/python/test_perf_event.py
+++ b/tests/python/test_perf_event.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) 2016 PLUMgrid
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_probe_count.py b/tests/python/test_probe_count.py
index 3c3001c..a9392af 100755
--- a/tests/python/test_probe_count.py
+++ b/tests/python/test_probe_count.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) Suchakra Sharma <suchakrapani.sharma@polymtl.ca>
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_shared_table.py b/tests/python/test_shared_table.py
index 10dd63f..7b8f9d5 100644
--- a/tests/python/test_shared_table.py
+++ b/tests/python/test_shared_table.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) 2016 Facebook, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_stackid.py b/tests/python/test_stackid.py
index 481adbd..0becad0 100755
--- a/tests/python/test_stackid.py
+++ b/tests/python/test_stackid.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_stat1.py b/tests/python/test_stat1.py
index 23b3a29..5bf1714 100755
--- a/tests/python/test_stat1.py
+++ b/tests/python/test_stat1.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_tools_memleak.py b/tests/python/test_tools_memleak.py
index acdc6f6..f551c0f 100755
--- a/tests/python/test_tools_memleak.py
+++ b/tests/python/test_tools_memleak.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from unittest import main, skipUnless, TestCase
import distutils.version
diff --git a/tests/python/test_tools_smoke.py b/tests/python/test_tools_smoke.py
index 92d2262..ecf8502 100755
--- a/tests/python/test_tools_smoke.py
+++ b/tests/python/test_tools_smoke.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) Sasha Goldshtein, 2017
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_trace1.py b/tests/python/test_trace1.py
index 685c946..9b7b94a 100755
--- a/tests/python/test_trace1.py
+++ b/tests/python/test_trace1.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_trace2.py b/tests/python/test_trace2.py
index 4e3cfaa..04e29a3 100755
--- a/tests/python/test_trace2.py
+++ b/tests/python/test_trace2.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_trace3.py b/tests/python/test_trace3.py
index f4cb554..10e6266 100755
--- a/tests/python/test_trace3.py
+++ b/tests/python/test_trace3.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_trace4.py b/tests/python/test_trace4.py
index 49e3d23..af2d9c9 100755
--- a/tests/python/test_trace4.py
+++ b/tests/python/test_trace4.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_tracepoint.py b/tests/python/test_tracepoint.py
index 3bc576a..c92bec0 100755
--- a/tests/python/test_tracepoint.py
+++ b/tests/python/test_tracepoint.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) Sasha Goldshtein
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_uprobes.py b/tests/python/test_uprobes.py
index 62a370f..db14feb 100755
--- a/tests/python/test_uprobes.py
+++ b/tests/python/test_uprobes.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
@@ -56,13 +56,13 @@ int count(struct pt_regs *ctx) {
return 0;
}"""
b = bcc.BPF(text=text)
- b.attach_uprobe(name="/usr/bin/python", sym="main", fn_name="count")
- b.attach_uretprobe(name="/usr/bin/python", sym="main", fn_name="count")
- with os.popen("/usr/bin/python -V") as f:
+ b.attach_uprobe(name="/usr/bin/python3", sym="main", fn_name="count")
+ b.attach_uretprobe(name="/usr/bin/python3", sym="main", fn_name="count")
+ with os.popen("/usr/bin/python3 -V") as f:
pass
self.assertGreater(b["stats"][ctypes.c_int(0)].value, 0)
- b.detach_uretprobe(name="/usr/bin/python", sym="main")
- b.detach_uprobe(name="/usr/bin/python", sym="main")
+ b.detach_uretprobe(name="/usr/bin/python3", sym="main")
+ b.detach_uprobe(name="/usr/bin/python3", sym="main")
def test_mount_namespace(self):
text = """
diff --git a/tests/python/test_usdt.py b/tests/python/test_usdt.py
index d1f0ca0..b2577b5 100755
--- a/tests/python/test_usdt.py
+++ b/tests/python/test_usdt.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# USAGE: test_usdt.py
#
diff --git a/tests/python/test_usdt2.py b/tests/python/test_usdt2.py
index 5408b42..a966cd6 100755
--- a/tests/python/test_usdt2.py
+++ b/tests/python/test_usdt2.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# USAGE: test_usdt2.py
#
diff --git a/tests/python/test_utils.py b/tests/python/test_utils.py
index 2959482..60fdd51 100755
--- a/tests/python/test_utils.py
+++ b/tests/python/test_utils.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# Copyright (c) Catalysts GmbH
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tests/python/test_xlate1.py b/tests/python/test_xlate1.py
index 5183e2a..3057c45 100755
--- a/tests/python/test_xlate1.py
+++ b/tests/python/test_xlate1.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) PLUMgrid, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
diff --git a/tools/argdist.py b/tools/argdist.py
index 61f8e00..8e68a31 100755
--- a/tools/argdist.py
+++ b/tools/argdist.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# argdist Trace a function and display a distribution of its
# parameter values as a histogram or frequency count.
diff --git a/tools/bashreadline.py b/tools/bashreadline.py
index 0be8b26..1aaaa11 100755
--- a/tools/bashreadline.py
+++ b/tools/bashreadline.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# bashreadline Print entered bash commands from all running shells.
# For Linux, uses BCC, eBPF. Embedded C.
diff --git a/tools/biolatency.py b/tools/biolatency.py
index 46bebc4..76c386b 100755
--- a/tools/biolatency.py
+++ b/tools/biolatency.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# biolatency Summarize block device I/O latency as a histogram.
diff --git a/tools/biosnoop.py b/tools/biosnoop.py
index 314a19e..e507b34 100755
--- a/tools/biosnoop.py
+++ b/tools/biosnoop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# biosnoop Trace block device I/O and print details including issuing PID.
diff --git a/tools/biotop.py b/tools/biotop.py
index 8da9255..26df0a2 100755
--- a/tools/biotop.py
+++ b/tools/biotop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# biotop block device (disk) I/O by process.
diff --git a/tools/bitesize.py b/tools/bitesize.py
index f70f091..d70d668 100755
--- a/tools/bitesize.py
+++ b/tools/bitesize.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# bitehist.py Block I/O size histogram.
# For Linux, uses BCC, eBPF. See .c file.
diff --git a/tools/bpflist.py b/tools/bpflist.py
index 5fd109c..6f80b89 100755
--- a/tools/bpflist.py
+++ b/tools/bpflist.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# bpflist Display processes currently using BPF programs and maps,
# pinned BPF programs and maps, and enabled probes.
diff --git a/tools/btrfsdist.py b/tools/btrfsdist.py
index fe5a2bf..a822ec3 100755
--- a/tools/btrfsdist.py
+++ b/tools/btrfsdist.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# btrfsdist Summarize btrfs operation latency.
diff --git a/tools/btrfsslower.py b/tools/btrfsslower.py
index f145dcf..07e7555 100755
--- a/tools/btrfsslower.py
+++ b/tools/btrfsslower.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# btrfsslower Trace slow btrfs operations.
diff --git a/tools/cachestat.py b/tools/cachestat.py
index 868b370..65e5389 100755
--- a/tools/cachestat.py
+++ b/tools/cachestat.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# cachestat Count cache kernel function calls.
# For Linux, uses BCC, eBPF. See .c file.
diff --git a/tools/cachetop.py b/tools/cachetop.py
index bb5f6d8..5afd3fa 100755
--- a/tools/cachetop.py
+++ b/tools/cachetop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# @lint-avoid-python-3-compatibility-imports
#
# cachetop Count cache kernel function calls per processes
diff --git a/tools/capable.py b/tools/capable.py
index 83bfd98..0238e57 100755
--- a/tools/capable.py
+++ b/tools/capable.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# capable Trace security capabilitiy checks (cap_capable()).
diff --git a/tools/cpudist.py b/tools/cpudist.py
index 47658c0..b616be5 100755
--- a/tools/cpudist.py
+++ b/tools/cpudist.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# cpudist Summarize on- and off-CPU time per task as a histogram.
diff --git a/tools/cpuunclaimed.py b/tools/cpuunclaimed.py
index 58b8e4a..b146097 100755
--- a/tools/cpuunclaimed.py
+++ b/tools/cpuunclaimed.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# cpuunclaimed Sample CPU run queues and calculate unclaimed idle CPU.
diff --git a/tools/dbslower.py b/tools/dbslower.py
index d6f36cc..c351577 100755
--- a/tools/dbslower.py
+++ b/tools/dbslower.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# dbslower Trace MySQL and PostgreSQL queries slower than a threshold.
#
diff --git a/tools/dbstat.py b/tools/dbstat.py
index a89b097..f8c612f 100755
--- a/tools/dbstat.py
+++ b/tools/dbstat.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# dbstat Display a histogram of MySQL and PostgreSQL query latencies.
#
diff --git a/tools/dcsnoop.py b/tools/dcsnoop.py
index 45fc6be..040083b 100755
--- a/tools/dcsnoop.py
+++ b/tools/dcsnoop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# dcsnoop Trace directory entry cache (dcache) lookups.
diff --git a/tools/dcstat.py b/tools/dcstat.py
index 5ecddd1..d2db8d4 100755
--- a/tools/dcstat.py
+++ b/tools/dcstat.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# dcstat Directory entry cache (dcache) stats.
diff --git a/tools/deadlock_detector.py b/tools/deadlock_detector.py
index d356cf5..a788faa 100755
--- a/tools/deadlock_detector.py
+++ b/tools/deadlock_detector.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# deadlock_detector Detects potential deadlocks (lock order inversions)
# on a running process. For Linux, uses BCC, eBPF.
diff --git a/tools/execsnoop.py b/tools/execsnoop.py
index db4e0ba..5bb1246 100755
--- a/tools/execsnoop.py
+++ b/tools/execsnoop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# execsnoop Trace new processes via exec() syscalls.
diff --git a/tools/ext4dist.py b/tools/ext4dist.py
index 4b9142f..9502016 100755
--- a/tools/ext4dist.py
+++ b/tools/ext4dist.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# ext4dist Summarize ext4 operation latency.
diff --git a/tools/ext4slower.py b/tools/ext4slower.py
index 09e8572..c08ed33 100755
--- a/tools/ext4slower.py
+++ b/tools/ext4slower.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# ext4slower Trace slow ext4 operations.
diff --git a/tools/filelife.py b/tools/filelife.py
index 9405af3..bd32f32 100755
--- a/tools/filelife.py
+++ b/tools/filelife.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# filelife Trace the lifespan of short-lived files.
diff --git a/tools/fileslower.py b/tools/fileslower.py
index 996ab58..b2290c1 100755
--- a/tools/fileslower.py
+++ b/tools/fileslower.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# fileslower Trace slow synchronous file reads and writes.
diff --git a/tools/filetop.py b/tools/filetop.py
index c8122ce..17412f9 100755
--- a/tools/filetop.py
+++ b/tools/filetop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# filetop file reads and writes by process.
diff --git a/tools/funccount.py b/tools/funccount.py
index 99654f2..822c662 100755
--- a/tools/funccount.py
+++ b/tools/funccount.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# funccount Count functions, tracepoints, and USDT probes.
diff --git a/tools/funclatency.py b/tools/funclatency.py
index d2e65f2..1921463 100755
--- a/tools/funclatency.py
+++ b/tools/funclatency.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# funclatency Time functions and print latency as a histogram.
diff --git a/tools/funcslower.py b/tools/funcslower.py
index a807458..205d86c 100755
--- a/tools/funcslower.py
+++ b/tools/funcslower.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# funcslower Trace slow kernel or user function calls.
diff --git a/tools/gethostlatency.py b/tools/gethostlatency.py
index 77a8b81..4a82314 100755
--- a/tools/gethostlatency.py
+++ b/tools/gethostlatency.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# gethostlatency Show latency for getaddrinfo/gethostbyname[2] calls.
# For Linux, uses BCC, eBPF. Embedded C.
diff --git a/tools/hardirqs.py b/tools/hardirqs.py
index 0690f09..227877d 100755
--- a/tools/hardirqs.py
+++ b/tools/hardirqs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# hardirqs Summarize hard IRQ (interrupt) event time.
diff --git a/tools/killsnoop.py b/tools/killsnoop.py
index 2ca1586..d12fd6e 100755
--- a/tools/killsnoop.py
+++ b/tools/killsnoop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# killsnoop Trace signals issued by the kill() syscall.
diff --git a/tools/lib/ucalls.py b/tools/lib/ucalls.py
index 491565c..5aa9e4b 100755
--- a/tools/lib/ucalls.py
+++ b/tools/lib/ucalls.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# ucalls Summarize method calls in high-level languages and/or system calls.
diff --git a/tools/lib/uflow.py b/tools/lib/uflow.py
index 1b59bca..68bd840 100755
--- a/tools/lib/uflow.py
+++ b/tools/lib/uflow.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# uflow Trace method execution flow in high-level languages.
diff --git a/tools/lib/ugc.py b/tools/lib/ugc.py
index 2da265b..8875427 100755
--- a/tools/lib/ugc.py
+++ b/tools/lib/ugc.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# ugc Summarize garbage collection events in high-level languages.
diff --git a/tools/lib/uobjnew.py b/tools/lib/uobjnew.py
index bcd69b4..9594fcd 100755
--- a/tools/lib/uobjnew.py
+++ b/tools/lib/uobjnew.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# uobjnew Summarize object allocations in high-level languages.
diff --git a/tools/lib/ustat.py b/tools/lib/ustat.py
index 34cc019..0c9ae11 100755
--- a/tools/lib/ustat.py
+++ b/tools/lib/ustat.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# ustat Activity stats from high-level languages, including exceptions,
diff --git a/tools/lib/uthreads.py b/tools/lib/uthreads.py
index b5bed53..12f76be 100755
--- a/tools/lib/uthreads.py
+++ b/tools/lib/uthreads.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# uthreads Trace thread creation/destruction events in high-level languages.
diff --git a/tools/llcstat.py b/tools/llcstat.py
index eb32a22..d181144 100755
--- a/tools/llcstat.py
+++ b/tools/llcstat.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# llcstat.py Summarize cache references and cache misses by PID.
# Cache reference and cache miss are corresponding events defined in
diff --git a/tools/mdflush.py b/tools/mdflush.py
index 35ed31a..7283f1d 100755
--- a/tools/mdflush.py
+++ b/tools/mdflush.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# mdflush Trace md flush events.
diff --git a/tools/memleak.py b/tools/memleak.py
index 5788e32..1858e93 100755
--- a/tools/memleak.py
+++ b/tools/memleak.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# memleak Trace and display outstanding allocations to detect
# memory leaks in user-mode processes and the kernel.
diff --git a/tools/mountsnoop.py b/tools/mountsnoop.py
index 223b2f8..db0db33 100755
--- a/tools/mountsnoop.py
+++ b/tools/mountsnoop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# mountsnoop Trace mount() and umount syscalls.
# For Linux, uses BCC, eBPF. Embedded C.
diff --git a/tools/mysqld_qslower.py b/tools/mysqld_qslower.py
index 3ed18ec..d6083eb 100755
--- a/tools/mysqld_qslower.py
+++ b/tools/mysqld_qslower.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# mysqld_qslower MySQL server queries slower than a threshold.
# For Linux, uses BCC, BPF. Embedded C.
diff --git a/tools/nfsdist.py b/tools/nfsdist.py
index c38c053..af31f66 100755
--- a/tools/nfsdist.py
+++ b/tools/nfsdist.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# nfsdist Summarize NFS operation latency
diff --git a/tools/nfsslower.py b/tools/nfsslower.py
index cacd473..a2bca34 100755
--- a/tools/nfsslower.py
+++ b/tools/nfsslower.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# nfsslower Trace slow NFS operations
diff --git a/tools/offcputime.py b/tools/offcputime.py
index 1f47459..f31119c 100755
--- a/tools/offcputime.py
+++ b/tools/offcputime.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# offcputime Summarize off-CPU time by stack trace
# For Linux, uses BCC, eBPF.
diff --git a/tools/offwaketime.py b/tools/offwaketime.py
index 964f062..c775683 100755
--- a/tools/offwaketime.py
+++ b/tools/offwaketime.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# offwaketime Summarize blocked time by kernel off-CPU stack + waker stack
# For Linux, uses BCC, eBPF.
diff --git a/tools/old/bashreadline.py b/tools/old/bashreadline.py
index 464dfda..007fe16 100755
--- a/tools/old/bashreadline.py
+++ b/tools/old/bashreadline.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# bashreadline Print entered bash commands from all running shells.
# For Linux, uses BCC, eBPF. Embedded C.
diff --git a/tools/old/biosnoop.py b/tools/old/biosnoop.py
index 37ee3f9..7eddf51 100755
--- a/tools/old/biosnoop.py
+++ b/tools/old/biosnoop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# biosnoop Trace block device I/O and print details including issuing PID.
diff --git a/tools/old/filelife.py b/tools/old/filelife.py
index 075be08..733ff86 100755
--- a/tools/old/filelife.py
+++ b/tools/old/filelife.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# filelife Trace the lifespan of short-lived files.
diff --git a/tools/old/gethostlatency.py b/tools/old/gethostlatency.py
index 7d32cb8..52ca436 100755
--- a/tools/old/gethostlatency.py
+++ b/tools/old/gethostlatency.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# gethostlatency Show latency for getaddrinfo/gethostbyname[2] calls.
# For Linux, uses BCC, eBPF. Embedded C.
diff --git a/tools/old/killsnoop.py b/tools/old/killsnoop.py
index ddf9d5a..0b0b1d5 100755
--- a/tools/old/killsnoop.py
+++ b/tools/old/killsnoop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# killsnoop Trace signals issued by the kill() syscall.
diff --git a/tools/old/memleak.py b/tools/old/memleak.py
index b962c99..3e91b6f 100755
--- a/tools/old/memleak.py
+++ b/tools/old/memleak.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# memleak Trace and display outstanding allocations to detect
# memory leaks in user-mode processes and the kernel.
diff --git a/tools/old/offcputime.py b/tools/old/offcputime.py
index 680d924..253786a 100755
--- a/tools/old/offcputime.py
+++ b/tools/old/offcputime.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# offcputime Summarize off-CPU time by kernel stack trace
# For Linux, uses BCC, eBPF.
diff --git a/tools/old/offwaketime.py b/tools/old/offwaketime.py
index 3b5bb36..225a877 100755
--- a/tools/old/offwaketime.py
+++ b/tools/old/offwaketime.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# offwaketime Summarize blocked time by kernel off-CPU stack + waker stack
# For Linux, uses BCC, eBPF.
diff --git a/tools/old/opensnoop.py b/tools/old/opensnoop.py
index 5df3b41..2eabd50 100755
--- a/tools/old/opensnoop.py
+++ b/tools/old/opensnoop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# opensnoop Trace open() syscalls.
diff --git a/tools/old/profile.py b/tools/old/profile.py
index 7dbc246..fc0e3f3 100755
--- a/tools/old/profile.py
+++ b/tools/old/profile.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# profile Profile CPU usage by sampling stack traces at a timed interval.
diff --git a/tools/old/softirqs.py b/tools/old/softirqs.py
index 3b40b1a..a949bbe 100755
--- a/tools/old/softirqs.py
+++ b/tools/old/softirqs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# softirqs Summarize soft IRQ (interrupt) event time.
diff --git a/tools/old/stackcount.py b/tools/old/stackcount.py
index 108c800..27b7520 100755
--- a/tools/old/stackcount.py
+++ b/tools/old/stackcount.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# stackcount Count kernel function calls and their stack traces.
# For Linux, uses BCC, eBPF.
diff --git a/tools/old/stacksnoop.py b/tools/old/stacksnoop.py
index 9fcc12b..de3debf 100755
--- a/tools/old/stacksnoop.py
+++ b/tools/old/stacksnoop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# stacksnoop Trace a kernel function and print all kernel stack traces.
# For Linux, uses BCC, eBPF, and currently x86_64 only. Inline C.
diff --git a/tools/old/statsnoop.py b/tools/old/statsnoop.py
index ad54ac7..9284110 100755
--- a/tools/old/statsnoop.py
+++ b/tools/old/statsnoop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# statsnoop Trace stat() syscalls.
diff --git a/tools/old/syncsnoop.py b/tools/old/syncsnoop.py
index cae57ea..27fbc87 100755
--- a/tools/old/syncsnoop.py
+++ b/tools/old/syncsnoop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# syncsnoop Trace sync() syscall.
diff --git a/tools/old/tcpaccept.py b/tools/old/tcpaccept.py
index 2fda8a7..fe8de02 100755
--- a/tools/old/tcpaccept.py
+++ b/tools/old/tcpaccept.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# tcpaccept Trace TCP accept()s.
diff --git a/tools/old/tcpconnect.py b/tools/old/tcpconnect.py
index 2fb5307..4ba1dc4 100755
--- a/tools/old/tcpconnect.py
+++ b/tools/old/tcpconnect.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# tcpconnect Trace TCP connect()s.
diff --git a/tools/old/wakeuptime.py b/tools/old/wakeuptime.py
index e09840a..7691da3 100644
--- a/tools/old/wakeuptime.py
+++ b/tools/old/wakeuptime.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# wakeuptime Summarize sleep to wakeup time by waker kernel stack
# For Linux, uses BCC, eBPF.
diff --git a/tools/oomkill.py b/tools/oomkill.py
index f0837f0..9dd3394 100755
--- a/tools/oomkill.py
+++ b/tools/oomkill.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# oomkill Trace oom_kill_process(). For Linux, uses BCC, eBPF.
#
diff --git a/tools/opensnoop.py b/tools/opensnoop.py
index 112c56a..0834086 100755
--- a/tools/opensnoop.py
+++ b/tools/opensnoop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# opensnoop Trace open() syscalls.
diff --git a/tools/pidpersec.py b/tools/pidpersec.py
index c449004..38f4196 100755
--- a/tools/pidpersec.py
+++ b/tools/pidpersec.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# pidpersec Count new processes (via fork).
diff --git a/tools/profile.py b/tools/profile.py
index 687a162..af317fb 100755
--- a/tools/profile.py
+++ b/tools/profile.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# profile Profile CPU usage by sampling stack traces at a timed interval.
diff --git a/tools/runqlat.py b/tools/runqlat.py
index 1eb5d9a..66df74a 100755
--- a/tools/runqlat.py
+++ b/tools/runqlat.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# runqlat Run queue (scheduler) latency as a histogram.
diff --git a/tools/runqlen.py b/tools/runqlen.py
index 4a6bc48..728c6f9 100755
--- a/tools/runqlen.py
+++ b/tools/runqlen.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# runqlen Summarize scheduler run queue length as a histogram.
diff --git a/tools/slabratetop.py b/tools/slabratetop.py
index aa1a7b4..4c2604f 100755
--- a/tools/slabratetop.py
+++ b/tools/slabratetop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# slabratetop Summarize kmem_cache_alloc() calls.
diff --git a/tools/softirqs.py b/tools/softirqs.py
index 2cd9248..10354e1 100755
--- a/tools/softirqs.py
+++ b/tools/softirqs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# softirqs Summarize soft IRQ (interrupt) event time.
diff --git a/tools/solisten.py b/tools/solisten.py
index 31f4637..bd2ac92 100755
--- a/tools/solisten.py
+++ b/tools/solisten.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# solisten Trace TCP listen events
# For Linux, uses BCC, eBPF. Embedded C.
diff --git a/tools/sslsniff.py b/tools/sslsniff.py
index a81b4a4..1108c17 100755
--- a/tools/sslsniff.py
+++ b/tools/sslsniff.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# sslsniff Captures data on read/recv or write/send functions of OpenSSL and
# GnuTLS
diff --git a/tools/stackcount.py b/tools/stackcount.py
index 536deed..7973432 100755
--- a/tools/stackcount.py
+++ b/tools/stackcount.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# stackcount Count events and their stack traces.
# For Linux, uses BCC, eBPF.
diff --git a/tools/statsnoop.py b/tools/statsnoop.py
index f68acdc..4d4158f 100755
--- a/tools/statsnoop.py
+++ b/tools/statsnoop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# statsnoop Trace stat() syscalls.
diff --git a/tools/syncsnoop.py b/tools/syncsnoop.py
index 90dcb20..adb54d9 100755
--- a/tools/syncsnoop.py
+++ b/tools/syncsnoop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# syncsnoop Trace sync() syscall.
diff --git a/tools/syscount.py b/tools/syscount.py
index 2faee50..afdf0ac 100755
--- a/tools/syscount.py
+++ b/tools/syscount.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# syscount Summarize syscall counts and latencies.
#
diff --git a/tools/tcpaccept.py b/tools/tcpaccept.py
index 8593837..93f6f94 100755
--- a/tools/tcpaccept.py
+++ b/tools/tcpaccept.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# tcpaccept Trace TCP accept()s.
diff --git a/tools/tcpconnect.py b/tools/tcpconnect.py
index 6779adf..1121715 100755
--- a/tools/tcpconnect.py
+++ b/tools/tcpconnect.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# tcpconnect Trace TCP connect()s.
diff --git a/tools/tcpconnlat.py b/tools/tcpconnlat.py
index d494675..1dadf62 100755
--- a/tools/tcpconnlat.py
+++ b/tools/tcpconnlat.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# tcpconnlat Trace TCP active connection latency (connect).
diff --git a/tools/tcplife.py b/tools/tcplife.py
index 547b71d..491a315 100755
--- a/tools/tcplife.py
+++ b/tools/tcplife.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# tcplife Trace the lifespan of TCP sessions and summarize.
diff --git a/tools/tcpretrans.py b/tools/tcpretrans.py
index 21fcbc7..b869bc2 100755
--- a/tools/tcpretrans.py
+++ b/tools/tcpretrans.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# tcpretrans Trace TCP retransmits and TLPs.
diff --git a/tools/tcptop.py b/tools/tcptop.py
index 4b448e8..ff1a726 100755
--- a/tools/tcptop.py
+++ b/tools/tcptop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# tcptop Summarize TCP send/recv throughput by host.
diff --git a/tools/tcptracer.py b/tools/tcptracer.py
index 5fd80ca..7dcf956 100755
--- a/tools/tcptracer.py
+++ b/tools/tcptracer.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# tcpv4tracer Trace TCP connections.
# For Linux, uses BCC, eBPF. Embedded C.
diff --git a/tools/tplist.py b/tools/tplist.py
index db4b68b..291ae57 100755
--- a/tools/tplist.py
+++ b/tools/tplist.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# tplist Display kernel tracepoints or USDT probes and their formats.
#
diff --git a/tools/trace.py b/tools/trace.py
index 4390328..dfacb13 100755
--- a/tools/trace.py
+++ b/tools/trace.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# trace Trace a function and print a trace message based on its
# parameters, with an optional filter.
diff --git a/tools/ttysnoop.py b/tools/ttysnoop.py
index 1510d7b..21e7c46 100755
--- a/tools/ttysnoop.py
+++ b/tools/ttysnoop.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# ttysnoop Watch live output from a tty or pts device.
diff --git a/tools/vfscount.py b/tools/vfscount.py
index 4641ea3..f4660ef 100755
--- a/tools/vfscount.py
+++ b/tools/vfscount.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# vfscount Count VFS calls ("vfs_*").
diff --git a/tools/vfsstat.py b/tools/vfsstat.py
index 1764c60..7ff5407 100755
--- a/tools/vfsstat.py
+++ b/tools/vfsstat.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# vfsstat Count some VFS calls.
diff --git a/tools/wakeuptime.py b/tools/wakeuptime.py
index b242f30..5b857c5 100755
--- a/tools/wakeuptime.py
+++ b/tools/wakeuptime.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# wakeuptime Summarize sleep to wakeup time by waker kernel stack
# For Linux, uses BCC, eBPF.
diff --git a/tools/xfsdist.py b/tools/xfsdist.py
index 18d5a8e..66eaeb3 100755
--- a/tools/xfsdist.py
+++ b/tools/xfsdist.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# xfsdist Summarize XFS operation latency.
diff --git a/tools/xfsslower.py b/tools/xfsslower.py
index 3fbc96d..22a71cd 100755
--- a/tools/xfsslower.py
+++ b/tools/xfsslower.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# xfsslower Trace slow XFS operations.
diff --git a/tools/zfsdist.py b/tools/zfsdist.py
index 9c6d3e0..4418d80 100755
--- a/tools/zfsdist.py
+++ b/tools/zfsdist.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# zfsdist Summarize ZFS operation latency.
diff --git a/tools/zfsslower.py b/tools/zfsslower.py
index 1e61de7..046d87a 100755
--- a/tools/zfsslower.py
+++ b/tools/zfsslower.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# @lint-avoid-python-3-compatibility-imports
#
# zfsslower Trace slow ZFS operations.
--
2.16.1