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
ee31f61c
Commit
ee31f61c
authored
Feb 10, 2016
by
Brendan Gregg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for spaces in filenames, #361
parent
2ec48d92
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
tools/filelife.py
tools/filelife.py
+1
-1
tools/opensnoop.py
tools/opensnoop.py
+2
-2
tools/statsnoop.py
tools/statsnoop.py
+2
-2
No files found.
tools/filelife.py
View file @
ee31f61c
...
@@ -97,7 +97,7 @@ start_ts = 0
...
@@ -97,7 +97,7 @@ start_ts = 0
# format output
# format output
while
1
:
while
1
:
(
task
,
pid
,
cpu
,
flags
,
ts
,
msg
)
=
b
.
trace_fields
()
(
task
,
pid
,
cpu
,
flags
,
ts
,
msg
)
=
b
.
trace_fields
()
(
delta
,
filename
)
=
msg
.
split
(
" "
)
(
delta
,
filename
)
=
msg
.
split
(
" "
,
1
)
# print columns
# print columns
print
(
"%-8s %-6d %-16s %-7.2f %s"
%
(
strftime
(
"%H:%M:%S"
),
pid
,
task
,
print
(
"%-8s %-6d %-16s %-7.2f %s"
%
(
strftime
(
"%H:%M:%S"
),
pid
,
task
,
...
...
tools/opensnoop.py
View file @
ee31f61c
...
@@ -63,7 +63,7 @@ int kretprobe__sys_open(struct pt_regs *ctx)
...
@@ -63,7 +63,7 @@ int kretprobe__sys_open(struct pt_regs *ctx)
return 0;
return 0;
}
}
bpf_trace_printk("%
s %d
\
\
n", *filenamep, ret
);
bpf_trace_printk("%
d %s
\
\
n", ret, *filenamep
);
args_filename.delete(&pid);
args_filename.delete(&pid);
return 0;
return 0;
...
@@ -90,7 +90,7 @@ start_ts = 0
...
@@ -90,7 +90,7 @@ start_ts = 0
# format output
# format output
while
1
:
while
1
:
(
task
,
pid
,
cpu
,
flags
,
ts
,
msg
)
=
b
.
trace_fields
()
(
task
,
pid
,
cpu
,
flags
,
ts
,
msg
)
=
b
.
trace_fields
()
(
filename
,
ret_s
)
=
msg
.
split
(
" "
)
(
ret_s
,
filename
)
=
msg
.
split
(
" "
,
1
)
ret
=
int
(
ret_s
)
ret
=
int
(
ret_s
)
if
(
args
.
failed
and
(
ret
>=
0
)):
if
(
args
.
failed
and
(
ret
>=
0
)):
...
...
tools/statsnoop.py
View file @
ee31f61c
...
@@ -63,7 +63,7 @@ int trace_return(struct pt_regs *ctx)
...
@@ -63,7 +63,7 @@ int trace_return(struct pt_regs *ctx)
return 0;
return 0;
}
}
bpf_trace_printk("%
s %d
\
\
n", *filenamep, ret
);
bpf_trace_printk("%
d %s
\
\
n", ret, *filenamep
);
args_filename.delete(&pid);
args_filename.delete(&pid);
return 0;
return 0;
...
@@ -96,7 +96,7 @@ start_ts = 0
...
@@ -96,7 +96,7 @@ start_ts = 0
# format output
# format output
while
1
:
while
1
:
(
task
,
pid
,
cpu
,
flags
,
ts
,
msg
)
=
b
.
trace_fields
()
(
task
,
pid
,
cpu
,
flags
,
ts
,
msg
)
=
b
.
trace_fields
()
(
filename
,
ret_s
)
=
msg
.
split
(
" "
)
(
ret_s
,
filename
)
=
msg
.
split
(
" "
,
1
)
ret
=
int
(
ret_s
)
ret
=
int
(
ret_s
)
if
(
args
.
failed
and
(
ret
>=
0
)):
if
(
args
.
failed
and
(
ret
>=
0
)):
...
...
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