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
a0aa7f28
Commit
a0aa7f28
authored
Jan 10, 2016
by
Brenden Blanco
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #310 from iovisor/ast_dev
fix pep8 lint errors in biolatency and biosnoop
parents
1ec515ee
a79da0a0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
136 additions
and
134 deletions
+136
-134
tools/biolatency
tools/biolatency
+59
-58
tools/biosnoop
tools/biosnoop
+72
-71
tools/biosnoop_example.txt
tools/biosnoop_example.txt
+5
-5
No files found.
tools/biolatency
View file @
a0aa7f28
#!/usr/bin/python
# @lint-avoid-python-3-compatibility-imports
#
# biolatency Summarize block device I/O latency as a histogram.
# For Linux, uses BCC, eBPF.
...
...
@@ -124,7 +125,7 @@ while (1):
try
:
sleep
(
int
(
args
.
interval
))
except
KeyboardInterrupt
:
exiting
=
1
exiting
=
1
print
()
if
args
.
timestamp
:
...
...
tools/biosnoop
View file @
a0aa7f28
#!/usr/bin/python
# @lint-avoid-python-3-compatibility-imports
#
# biosnoop Trace block device I/O and print details including issuing PID.
# For Linux, uses BCC, eBPF.
...
...
@@ -97,7 +98,7 @@ int trace_req_completion(struct pt_regs *ctx, struct request *req)
return 0;
}
"""
)
"""
,
debug
=
0
)
b
.
attach_kprobe
(
event
=
"blk_account_io_start"
,
fn_name
=
"trace_pid_start"
)
b
.
attach_kprobe
(
event
=
"blk_start_request"
,
fn_name
=
"trace_req_start"
)
b
.
attach_kprobe
(
event
=
"blk_mq_start_request"
,
fn_name
=
"trace_req_start"
)
...
...
tools/biosnoop_example.txt
View file @
a0aa7f28
...
...
@@ -36,11 +36,11 @@ $ iostat -x 1
avg-cpu: %user %nice %system %iowait %steal %idle
0.12 0.00 0.12 0.00 0.00 99.75
Device:
rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_
await svctm %util
xvda
0.00 0.00 0.00 4.00 0.00 16.00 8.00 0.00 0.00 0.00
0.00 0.00 0.00
xvdb
0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00
xvdc
0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00
md0
0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00
Device:
rrqm/s wrqm/s r/s w/s rkB/s wkB/s
await svctm %util
xvda
0.00 0.00 0.00 4.00 0.00 16.00
0.00 0.00 0.00
xvdb
0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00
xvdc
0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00
md0
0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00
There are 4 write IOPS.
...
...
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