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
5938394e
Commit
5938394e
authored
Jul 27, 2016
by
Brenden Blanco
Committed by
GitHub
Jul 27, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #630 from chantra/cachetop_sort_ui
[cachetop] Display sorting field and order.
parents
023d0527
beefca91
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
tools/cachetop.py
tools/cachetop.py
+4
-2
tools/cachetop_example.txt
tools/cachetop_example.txt
+3
-3
No files found.
tools/cachetop.py
View file @
5938394e
...
@@ -213,8 +213,10 @@ def handle_loop(stdscr, args):
...
@@ -213,8 +213,10 @@ def handle_loop(stdscr, args):
stdscr
.
clear
()
stdscr
.
clear
()
stdscr
.
addstr
(
stdscr
.
addstr
(
0
,
0
,
0
,
0
,
"%-8s Buffers MB: %.0f / Cached MB: %.0f"
%
(
"%-8s Buffers MB: %.0f / Cached MB: %.0f "
strftime
(
"%H:%M:%S"
),
buff
,
cached
"/ Sort: %s / Order: %s"
%
(
strftime
(
"%H:%M:%S"
),
buff
,
cached
,
FIELDS
[
sort_field
],
sort_reverse
and
"descending"
or
"ascending"
)
)
)
)
...
...
tools/cachetop_example.txt
View file @
5938394e
...
@@ -15,7 +15,7 @@ examples:
...
@@ -15,7 +15,7 @@ examples:
./cachetop 1 # print every second hit/miss stats
./cachetop 1 # print every second hit/miss stats
# ./cachetop 5
# ./cachetop 5
13:01:01 Buffers MB: 76 / Cached MB: 114
13:01:01 Buffers MB: 76 / Cached MB: 114
/ Sort: HITS / Order: ascending
PID UID CMD HITS MISSES DIRTIES READ_HIT% WRITE_HIT%
PID UID CMD HITS MISSES DIRTIES READ_HIT% WRITE_HIT%
1 root systemd 2 0 0 100.0% 0.0%
1 root systemd 2 0 0 100.0% 0.0%
680 root vminfo 3 4 2 14.3% 42.9%
680 root vminfo 3 4 2 14.3% 42.9%
...
@@ -43,7 +43,7 @@ Command used to generate the activity
...
@@ -43,7 +43,7 @@ Command used to generate the activity
Below shows the hit rate increases as we run find a second time and it gets it
Below shows the hit rate increases as we run find a second time and it gets it
its pages from the cache.
its pages from the cache.
# ./cachetop.py
# ./cachetop.py
13:01:01 Buffers MB: 76 / Cached MB: 115
13:01:01 Buffers MB: 76 / Cached MB: 115
/ Sort: HITS / Order: ascending
PID UID CMD HITS MISSES DIRTIES READ_HIT% WRITE_HIT%
PID UID CMD HITS MISSES DIRTIES READ_HIT% WRITE_HIT%
544 messageb dbus-daemon 2 2 1 25.0% 50.0%
544 messageb dbus-daemon 2 2 1 25.0% 50.0%
680 root vminfo 2 2 1 25.0% 50.0%
680 root vminfo 2 2 1 25.0% 50.0%
...
@@ -57,7 +57,7 @@ Below shows that the dirty pages increases as a file of 80M is created running
...
@@ -57,7 +57,7 @@ Below shows that the dirty pages increases as a file of 80M is created running
# dd if=/dev/urandom of=/tmp/c bs=8192 count=10000
# dd if=/dev/urandom of=/tmp/c bs=8192 count=10000
# ./cachetop.py 10
# ./cachetop.py 10
13:01:01 Buffers MB: 77 / Cached MB: 193
13:01:01 Buffers MB: 77 / Cached MB: 193
/ Sort: HITS / Order: ascending
PID UID CMD HITS MISSES DIRTIES READ_HIT% WRITE_HIT%
PID UID CMD HITS MISSES DIRTIES READ_HIT% WRITE_HIT%
544 messageb dbus-daemon 9 10 7 10.5% 15.8%
544 messageb dbus-daemon 9 10 7 10.5% 15.8%
680 root vminfo 9 10 7 10.5% 15.8%
680 root vminfo 9 10 7 10.5% 15.8%
...
...
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