cloudscopes 0.8.1 → 0.8.2

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
2
  SHA1:
3
- metadata.gz: 29c742176d650ed007a12245e8df02ec9736b894
4
- data.tar.gz: effeb7e2a0dae22ac33ff243f34d19e3a2139169
3
+ metadata.gz: 3db63861f9fdc9fa82e577f6bbce20d0217915f1
4
+ data.tar.gz: 7ba62cb99093368e8d401660a6b0e1f1ea225e5c
5
5
  SHA512:
6
- metadata.gz: 1df637739da6f4ec6ec280e8d2a0408fcc836bc65bfa1b0f26a2d186d53a3dc32ee02b65fa41f91812502f32737672ec9f560dc58115cf42a62cd7f550f1a834
7
- data.tar.gz: 57a9859f94aa5c1244c0debcf3ac99350f8f9876e08be303191fc9333c6941cbd52cc7f0ccac17ee3067f4a05eabef3995bac72a22a204c32c3d695a1f8a4579
6
+ metadata.gz: aaa0318e8dc45f876d714dea8cff0603aebbe25e6e560feb5e089aeef5e57b59f39dd5cf933b03e22e401772670fa6fe7504e2f2a1736d6f07103263a4b165c7
7
+ data.tar.gz: b4696c27e6cd1de88878059386b0e029490713c1fe3bda3d14c89b916f64d8a003f7851e1903e5d34af64fd311144a05a243606fd6699ab3629772323b06d4cc
@@ -14,7 +14,7 @@ metrics:
14
14
  value: system.iostat[8]
15
15
  - name: Memory Utilization
16
16
  unit: Percent
17
- value: 100 * memory.Active / memory.MemTotal
17
+ value: 100 * (1 - (memory.MemFree / memory.MemTotal))
18
18
 
19
19
  - name: Available Space on System
20
20
  unit: Gigabytes
data/lib/cloudscopes.rb CHANGED
@@ -12,6 +12,7 @@ require 'cloudscopes/configuration'
12
12
  require 'cloudscopes/options'
13
13
  require 'cloudscopes/globals'
14
14
  require 'cloudscopes/sample'
15
+ require 'cloudscopes/memory'
15
16
  require 'cloudscopes/system'
16
17
  require 'cloudscopes/filesystem'
17
18
  require 'cloudscopes/redis'
@@ -0,0 +1,14 @@
1
+ module Cloudscopes
2
+
3
+ class Memory
4
+
5
+ File.read('/proc/meminfo').split("\n").collect do |line|
6
+ line =~ /(\w+):\s+(\d+)/ and { name: $1, value: $2.to_i }
7
+ end.each do |data|
8
+ next if data.nil?
9
+ define_method(data[:name]) { data[:value] }
10
+ end
11
+
12
+ end
13
+
14
+ end
@@ -1,16 +1,5 @@
1
1
  module Cloudscopes
2
2
 
3
- class Memory
4
-
5
- File.read('/proc/meminfo').split("\n").collect do |line|
6
- line =~ /(\w+):\s+(\d+)/ and { name: $1, value: $2.to_i }
7
- end.each do |data|
8
- next if data.nil?
9
- define_method(data[:name]) { data[:value] }
10
- end
11
-
12
- end
13
-
14
3
  class System
15
4
 
16
5
  def loadavg5
@@ -1,3 +1,3 @@
1
1
  module Cloudscopes
2
- VERSION = "0.8.1"
2
+ VERSION = "0.8.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudscopes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oded Arbel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-25 00:00:00.000000000 Z
11
+ date: 2014-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -113,6 +113,7 @@ files:
113
113
  - lib/cloudscopes/configuration.rb
114
114
  - lib/cloudscopes/filesystem.rb
115
115
  - lib/cloudscopes/globals.rb
116
+ - lib/cloudscopes/memory.rb
116
117
  - lib/cloudscopes/network.rb
117
118
  - lib/cloudscopes/options.rb
118
119
  - lib/cloudscopes/redis.rb