dbtop 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +24 -0
- data/bin/dbtop +6 -4
- data/version.txt +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -72,6 +72,30 @@ rake gem:install
|
|
72
72
|
|
73
73
|
in the application folder.
|
74
74
|
|
75
|
+
Usage
|
76
|
+
------
|
77
|
+
|
78
|
+
```
|
79
|
+
State Command Description
|
80
|
+
S Include 'Sleep' processes
|
81
|
+
p Pause the process monitor
|
82
|
+
K Enter kill mode -- navigate to kill a process
|
83
|
+
```
|
84
|
+
|
85
|
+
When in 'kill' mode, use the 'j', and 'k', keys to navigate up and down
|
86
|
+
as you would in VIM. Select the process you wish to kill and press
|
87
|
+
ENTER. If you wish to cancel, press ESC.
|
88
|
+
|
89
|
+
TODO
|
90
|
+
------
|
91
|
+
|
92
|
+
Clean up the code!!
|
93
|
+
|
94
|
+
Implement scrolling if the list of processes exceeds the terminal
|
95
|
+
screen size.
|
96
|
+
|
97
|
+
VIM style navigation (#<k/j> for navigating up and down)
|
98
|
+
|
75
99
|
Author
|
76
100
|
------
|
77
101
|
|
data/bin/dbtop
CHANGED
@@ -143,9 +143,11 @@ class MysqlTop
|
|
143
143
|
Curses.setpos(@process_list[:x],0)
|
144
144
|
end
|
145
145
|
kill_pid = @freeze_screen.rows[@process_list[:x]-3][0]
|
146
|
-
|
147
|
-
|
148
|
-
|
146
|
+
if nav_key == 10
|
147
|
+
Thread.new {
|
148
|
+
%x[mysql -A -u #@user -p#@pass -h #@host #@db -e "KILL #{kill_pid}"]
|
149
|
+
}
|
150
|
+
end
|
149
151
|
write(0,0,@freeze_screen.to_s)
|
150
152
|
@state = "FREE"
|
151
153
|
when '?'
|
@@ -166,7 +168,7 @@ class MysqlTop
|
|
166
168
|
help_cmds = [
|
167
169
|
"\tS\t\tInclude 'Sleep' processes\n",
|
168
170
|
"\tp\t\tPause the process monitor\n",
|
169
|
-
"\
|
171
|
+
"\tK\t\tEnter kill mode -- navigate to kill a process\n"
|
170
172
|
]
|
171
173
|
help_cmds.each do |help_cmd|
|
172
174
|
help_xy[:x] += 1
|
data/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dbtop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-06-
|
12
|
+
date: 2012-06-04 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bones
|
16
|
-
requirement: &
|
16
|
+
requirement: &70171704272220 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: 3.8.0
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70171704272220
|
25
25
|
description: ! 'Similar to the Unix ''top'' tool, this Ruby gem will provide process
|
26
26
|
|
27
27
|
monitoring for your MySQL database instance.'
|