Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bcc
Commits
deaeabb6
Commit
deaeabb6
authored
Sep 08, 2016
by
Brendan Gregg
Committed by
GitHub
Sep 08, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #685 from kinvolk/iaguis/fix-indentation
examples: fix indentation in tracing/tcpv4connect
parents
4c2b5388
5bd242c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
examples/tracing/tcpv4connect.py
examples/tracing/tcpv4connect.py
+11
-11
No files found.
examples/tracing/tcpv4connect.py
View file @
deaeabb6
...
...
@@ -88,17 +88,17 @@ def inet_ntoa(addr):
# filter and format output
while
1
:
# Read messages from kernel pipe
try
:
(
task
,
pid
,
cpu
,
flags
,
ts
,
msg
)
=
b
.
trace_fields
()
(
_tag
,
saddr_hs
,
daddr_hs
,
dport_s
)
=
msg
.
split
(
" "
)
except
ValueError
:
# Ignore messages from other tracers
continue
# Ignore messages from other tracers
if
_tag
!=
"trace_tcp4connect"
:
continue
# Read messages from kernel pipe
try
:
(
task
,
pid
,
cpu
,
flags
,
ts
,
msg
)
=
b
.
trace_fields
()
(
_tag
,
saddr_hs
,
daddr_hs
,
dport_s
)
=
msg
.
split
(
" "
)
except
ValueError
:
# Ignore messages from other tracers
continue
# Ignore messages from other tracers
if
_tag
!=
"trace_tcp4connect"
:
continue
print
(
"%-6d %-12.12s %-16s %-16s %-4s"
%
(
pid
,
task
,
inet_ntoa
(
int
(
saddr_hs
,
16
)),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment