snipr 0.0.3 → 0.0.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 260ebc0fbd826bfa24bd623f4ea8d77814d6f8ad
4
- data.tar.gz: 3111be0b3d14412b2edff70811e9e517bd9ea237
5
2
  SHA512:
6
- metadata.gz: 3df66f9b9ed20653c0ed01f1d15ec5fcb869927ed83a79b98af8150bf4f96df1b25ab9be079a69b2ebfe9240a3e66f67bef5fe3da02369139c1e32fbeedccccd
7
- data.tar.gz: a79e94e7331508b65b5d6415cac8c908f5a9c8743f587c6987ac98bb66af07364a90ee32ee167a55d38de0bc042c0cd55f2b9d0c955704eb25225149bdc3116a
3
+ metadata.gz: fa11945d45829fb5f7ef8d2bfc641109d18d6f238b233c16b1fa2a5e13e1a595164cf1933db78583e90d925b471b09662fab1b19bb63a74e6859a711310e3cd1
4
+ data.tar.gz: de1f5f425b757abd09630cc232a417db1ade1c8506042a41a7939e15ecd650789fabb827d7ccf4c3dba3ef2f7dfd280224ab0643ca02476b531dca8b6e29ff81
5
+ SHA1:
6
+ metadata.gz: a133c18251342f631b0a254bce7546f26ff97e80
7
+ data.tar.gz: 48a55cc801d8f376bdb0cc7302eea605153e5a90
data/README.md CHANGED
@@ -24,17 +24,30 @@ Or install it yourself as:
24
24
  ```
25
25
  Usage: reap_resque_workers [options]
26
26
 
27
- Can be used to reap runaway resque workers that have exceeded too much memory use, CPU use, or time alive.
28
- By default, this sends USR1 to the parent worker process, which causes it to immediately kill the runaway
29
- child. The parent will then spawn another child to continue work.
27
+ Can be used to reap runaway resque workers that have exceeded too much memory
28
+ use, CPU use, or time alive. By default, this sends USR1 to the parent worker
29
+ process, which causes it to immediately kill the runaway child. The parent
30
+ will then spawn another child to continue work.
30
31
 
31
32
  Options:
32
- -m, --memory [BYTES] Workers using more than some bytes size of memory
33
+ -m, --memory [BYTES] Workers using more than some bytes size of
34
+ memory
33
35
  -c, --cpu [PERCENTAGE] workers using more than a percentage of CPU
34
- -a, --alive [SECONDS] Workers that have been alive for some length of time in seconds
35
- -s, --signal [SIGNAL] Signal to send to the worker's parent. Defaults to USR1.
36
+ -a, --alive [SECONDS] Workers that have been alive for some
37
+ length of time in seconds
38
+ -s, --signal [SIGNAL] Signal to send to the worker's parent.
39
+ Defaults to USR1.
40
+ -d, --dry-run Perform a dry run which will identify
41
+ workers to be reaped but not send any
42
+ signals
36
43
  ```
37
44
 
45
+ #### TODO
46
+ * Better readme docs
47
+ * General purpose command that lets you specify process filter options & signal
48
+ to send to arbitrary processes
49
+ * A command that targets bloated unicorn workers
50
+
38
51
  ## Contributing
39
52
 
40
53
  1. Fork it ( https://github.com/[my-github-username]/snipr/fork )
@@ -14,7 +14,6 @@ module Snipr
14
14
  MINUTE_SECONDS = 60
15
15
 
16
16
 
17
- attr_accessor :signal
18
17
  attr_reader :includes, :excludes, :filters
19
18
 
20
19
  def initialize
@@ -99,7 +98,7 @@ module Snipr
99
98
  end
100
99
 
101
100
  def all_processes
102
- Snipr.exec_cmd('ps h -eo pid,ppid,size,%cpu,etime,cmd').map do |line|
101
+ Snipr.exec_cmd('ps h -eo pid,ppid,%mem,%cpu,etime,command').map do |line|
103
102
  pid, ppid, mem, cpu, etime, *cmd = line.split
104
103
  cmd = cmd.join(" ")
105
104
 
@@ -1,3 +1,3 @@
1
1
  module Snipr
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snipr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lance Woodson
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2014-09-08 00:00:00 Z
12
+ date: 2014-09-09 00:00:00 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler