workaholic-cron 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -1
  3. data/lib/workaholic.rb +1 -2
  4. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e09600ad1a3055e282925209d623d2cdd2890cdc
4
- data.tar.gz: 1435cfe904d6242f760805f1edaf2c9d6a7875a7
3
+ metadata.gz: 77af8fe1e33690e36caf282ea7416aeef28215bf
4
+ data.tar.gz: 279cd27cc7ff365ad0404f7b33b49d9e81b57cfc
5
5
  SHA512:
6
- metadata.gz: b2ebfc0a0520eb5ba7876f378e2ab944d1e38606cd5d72058d2e4cc81743256b5faf750b372fda4d1da9d21f3c9a66bf46a17248d694a4da4f8f74230e60ff12
7
- data.tar.gz: af789fb71ff005f0a13f4de8cfe1edbfdcbf61c12676eff40de83304a6a4a2b093801e03ef7d080cd0b951d38f854a36aa08f2a6de3f3901a5f4a047f67a883c
6
+ metadata.gz: 9076f7f8c5d6199a9e81155517755096e969eaa58958fa0a17eff3a25d1ea5e0524c5e927b6ce403b8068ad8d9084c783b0c51f0396ee2fc264db22b0f4c97d4
7
+ data.tar.gz: b51c4773ffe9c7fc3e4e76a9c3eeedd567109ba9628f842570900956cb8606856ac5d36868e9f36fa1c6aa80015c9e1d388eeb7cb6728a0d9fc3c8d6a0918947
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  ### Workaholic
2
2
  ==========
3
- Ruby Gem to find long running child processes like cron jobs.
3
+ Ruby Gem to find long running child processes like cron jobs.
4
+ Workaholic is useful to be integrated in monitoring and alerting systems for
5
+ monitoring background jobs.
4
6
 
5
7
  ### Usage
6
8
 
data/lib/workaholic.rb CHANGED
@@ -1,4 +1,3 @@
1
- #!/bin/ruby
2
1
  class Workaholic
3
2
  # Find long running cron jobs.
4
3
  #
@@ -20,7 +19,7 @@ class Workaholic
20
19
 
21
20
  def scan
22
21
  # Get all child processes of the desired parent process.
23
- pids = %x(ps -o pid,etime --ppid=`pidof -s #{@proccess}` --sort=etime | awk '{print $1,$2}' | tr '-' ' ' | awk '{print $1,$3}' | egrep '^[0-9]' | grep ':')
22
+ pids = %x(ps -o pid,etime --ppid=`pidof -s #{@proccess}` --sort=etime | awk '{print $1,$2}' | tr '-' ' ' | awk '{print $1,$3}' | egrep '^[0-9]*\s[0-9:]{3}')
24
23
  workaholics = {}
25
24
  pids.each_line do |proccess|
26
25
  pid, etime = proccess.split
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workaholic-cron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alaa Qutaish
@@ -17,9 +17,9 @@ extensions: []
17
17
  extra_rdoc_files:
18
18
  - README.md
19
19
  files:
20
- - lib/workaholic.rb
21
20
  - README.md
22
- homepage: http://rubygems.org/gems/workaholic
21
+ - lib/workaholic.rb
22
+ homepage: http://rubygems.org/gems/workaholic-cron
23
23
  licenses:
24
24
  - MIT
25
25
  metadata: {}
@@ -39,7 +39,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
39
39
  version: '0'
40
40
  requirements: []
41
41
  rubyforge_project:
42
- rubygems_version: 2.1.10
42
+ rubygems_version: 2.2.2
43
43
  signing_key:
44
44
  specification_version: 4
45
45
  summary: Workaholic