Commit deaeabb6 authored by Brendan Gregg's avatar Brendan Gregg Committed by GitHub

Merge pull request #685 from kinvolk/iaguis/fix-indentation

examples: fix indentation in tracing/tcpv4connect
parents 4c2b5388 5bd242c0
...@@ -88,17 +88,17 @@ def inet_ntoa(addr): ...@@ -88,17 +88,17 @@ def inet_ntoa(addr):
# filter and format output # filter and format output
while 1: while 1:
# Read messages from kernel pipe # Read messages from kernel pipe
try: try:
(task, pid, cpu, flags, ts, msg) = b.trace_fields() (task, pid, cpu, flags, ts, msg) = b.trace_fields()
(_tag, saddr_hs, daddr_hs, dport_s) = msg.split(" ") (_tag, saddr_hs, daddr_hs, dport_s) = msg.split(" ")
except ValueError: except ValueError:
# Ignore messages from other tracers # Ignore messages from other tracers
continue continue
# Ignore messages from other tracers # Ignore messages from other tracers
if _tag != "trace_tcp4connect": if _tag != "trace_tcp4connect":
continue continue
print("%-6d %-12.12s %-16s %-16s %-4s" % (pid, task, print("%-6d %-12.12s %-16s %-16s %-4s" % (pid, task,
inet_ntoa(int(saddr_hs, 16)), inet_ntoa(int(saddr_hs, 16)),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment