cloudscopes 0.12.4 → 0.12.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.
- checksums.yaml +4 -4
- data/lib/cloudscopes/process.rb +7 -14
- data/lib/cloudscopes/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 13a8c1e4fd96446ee9cfb730470ffbd144b336a2
|
|
4
|
+
data.tar.gz: e19c5195b89ffaf6cda0805183bf61e3a6129ac4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 211373e4fe776df95c5ac33283d43f85e4f579277e525d68ba039a0b22567215244aa6bf2c47e192b442bc0534ff667eb5cd6e07874dfc9076171ce9ae5eb8f6
|
|
7
|
+
data.tar.gz: 94479bbf4b7456bcd4c4314d4200c215f0855e3bc93bd670c0ae469a32968597b781aa1cb58c6c66ed88b918c45e06b5ad615854f19802f0588c6a256ce0cdc2
|
data/lib/cloudscopes/process.rb
CHANGED
|
@@ -10,7 +10,7 @@ module Cloudscopes
|
|
|
10
10
|
|
|
11
11
|
def initialize(id)
|
|
12
12
|
@id = id.to_i
|
|
13
|
-
raise "Invalid system process id #{id}" unless @id > 0 && @id
|
|
13
|
+
raise "Invalid system process id #{id}" unless @id > 0 && @id < @@maxpid
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def procpath(field = nil)
|
|
@@ -56,20 +56,13 @@ module Cloudscopes
|
|
|
56
56
|
Etc.getpwuid(uid || 0).name
|
|
57
57
|
end
|
|
58
58
|
|
|
59
|
-
def
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
r[4].to_i == 0 && r[1] !~ /s/
|
|
65
|
-
end.collect do |r|
|
|
66
|
-
b,e = r[0].split(/-/,2).collect{ |a| a.to_i(16) }
|
|
67
|
-
r[0] = e - b
|
|
68
|
-
r
|
|
69
|
-
end.inject(0) do |s,r|
|
|
70
|
-
s += r[0]
|
|
71
|
-
end
|
|
59
|
+
def mem_usage_rss
|
|
60
|
+
statm.strip.split(/\s+/)[1].to_i * Etc.sysconf(Etc::SC_PAGESIZE)
|
|
61
|
+
end
|
|
62
|
+
def mem_usage_virt
|
|
63
|
+
statm.strip.split(/\s+/)[0].to_i * Etc.sysconf(Etc::SC_PAGESIZE)
|
|
72
64
|
end
|
|
65
|
+
alias mem_usage mem_usage_virt
|
|
73
66
|
end
|
|
74
67
|
|
|
75
68
|
def list
|
data/lib/cloudscopes/version.rb
CHANGED
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.12.
|
|
4
|
+
version: 0.12.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Oded Arbel
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-07-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aws-sdk
|
|
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
128
128
|
version: '0'
|
|
129
129
|
requirements: []
|
|
130
130
|
rubyforge_project:
|
|
131
|
-
rubygems_version: 2.
|
|
131
|
+
rubygems_version: 2.5.1
|
|
132
132
|
signing_key:
|
|
133
133
|
specification_version: 4
|
|
134
134
|
summary: Ruby gem to report system statistics to web based monitoring services such
|