procmon 0.0.4 → 0.0.5

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.
Files changed (4) hide show
  1. data/README.md +7 -0
  2. data/lib/procmon/version.rb +1 -1
  3. data/lib/test.rb +2 -2
  4. metadata +4 -4
data/README.md CHANGED
@@ -47,6 +47,13 @@ It's hosted on [rubygems.org][rubygems].
47
47
  puts "Oh no! My process is not running"
48
48
  end
49
49
  end
50
+
51
+ # Checking for percent cpu usage
52
+ Procmon.process("Mail") do |process|
53
+ process.checks :cpu_usage, :above => 0.1 do
54
+ puts "This process sure is busy!"
55
+ end
56
+ end
50
57
 
51
58
  # Would be nice if we can do this as well
52
59
  # Procmon.process("Mail") do |process|
@@ -1,3 +1,3 @@
1
1
  module Procmon
2
- VERSION = "0.0.4".freeze
2
+ VERSION = "0.0.5".freeze
3
3
  end
@@ -11,8 +11,8 @@ notifier2 = Proc.new do
11
11
  end
12
12
 
13
13
  Procmon.process("Mail") do |process|
14
- process.pid = 8264
15
- process.checks :cpu_usage, :above => 3 do
14
+ process.pid = 49096
15
+ process.checks :cpu_usage, :above => 0.1 do
16
16
  puts "OOOO SHOOT"
17
17
  end
18
18
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: procmon
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Darren Dao
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-18 00:00:00 Z
18
+ date: 2011-12-02 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: activesupport