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
ba404cfe
Commit
ba404cfe
authored
Oct 04, 2016
by
Brendan Gregg
Committed by
4ast
Oct 04, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix filelife missing output (#729)
parent
6e60fbc8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
man/man8/filelife.8
man/man8/filelife.8
+3
-3
tools/filelife.py
tools/filelife.py
+3
-0
No files found.
man/man8/filelife.8
View file @
ba404cfe
...
@@ -9,9 +9,9 @@ on who deleted the file, the file age, and the file name. The intent is to
...
@@ -9,9 +9,9 @@ on who deleted the file, the file age, and the file name. The intent is to
provide information on short-lived files, for debugging or performance
provide information on short-lived files, for debugging or performance
analysis.
analysis.
This works by tracing the kernel vfs_create() and vfs_delete() functions
using
This works by tracing the kernel vfs_create() and vfs_delete() functions
(and
dynamic tracing, and will need updating to match any changes to these
maybe more, see the source) using dynamic tracing, and will need updating to
functions.
match any changes to these
functions.
This makes use of a Linux 4.5 feature (bpf_perf_event_output());
This makes use of a Linux 4.5 feature (bpf_perf_event_output());
for kernels older than 4.5, see the version under tools/old,
for kernels older than 4.5, see the version under tools/old,
...
...
tools/filelife.py
View file @
ba404cfe
...
@@ -120,6 +120,9 @@ if debug:
...
@@ -120,6 +120,9 @@ if debug:
# initialize BPF
# initialize BPF
b
=
BPF
(
text
=
bpf_text
)
b
=
BPF
(
text
=
bpf_text
)
b
.
attach_kprobe
(
event
=
"vfs_create"
,
fn_name
=
"trace_create"
)
b
.
attach_kprobe
(
event
=
"vfs_create"
,
fn_name
=
"trace_create"
)
# newer kernels (say, 4.8) may don't fire vfs_create, so record (or overwrite)
# the timestamp in security_inode_create():
b
.
attach_kprobe
(
event
=
"security_inode_create"
,
fn_name
=
"trace_create"
)
b
.
attach_kprobe
(
event
=
"vfs_unlink"
,
fn_name
=
"trace_unlink"
)
b
.
attach_kprobe
(
event
=
"vfs_unlink"
,
fn_name
=
"trace_unlink"
)
# header
# header
...
...
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