usagewatch_ext 0.0.4.pre1 → 0.1.0
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.
- data/CHANGELOG.md +27 -0
- data/README.md +4 -1
- data/examples/mac_example.rb +2 -0
- data/lib/usagewatch_ext/mac.rb +12 -8
- data/lib/usagewatch_ext/version.rb +1 -1
- metadata +24 -7
- checksums.yaml +0 -15
data/CHANGELOG.md
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
|
2
|
+
#### [Current]
|
3
|
+
* [7002242](../../commit/7002242) Bump to 0.1.0 __(Ruben Espinosa)__
|
4
|
+
* [b75ccab](../../commit/b75ccab) test __(Ruben Espinosa)__
|
5
|
+
* [36a4c9f](../../commit/36a4c9f) Bump to 0.0.4.pre1 __(Ruben Espinosa)__
|
6
|
+
* [fade9f9](../../commit/fade9f9) http connections __(Ruben Espinosa)__
|
7
|
+
* [bf826b3](../../commit/bf826b3) method improvement __(Ruben Espinosa)__
|
8
|
+
* [7bfe9be](../../commit/7bfe9be) suggestions of code climate apllied __(Ruben Espinosa)__
|
9
|
+
* [d26b9c8](../../commit/d26b9c8) remove code duplicated __(Ruben Espinosa)__
|
10
|
+
* [c426a34](../../commit/c426a34) Update README.md __(Ruben Espinosa)__
|
11
|
+
* [b178d0e](../../commit/b178d0e) Update README.md __(Ruben Espinosa)__
|
12
|
+
* [1fc9091](../../commit/1fc9091) Update README.md __(Ruben Espinosa)__
|
13
|
+
* [255d04d](../../commit/255d04d) testing OS version __(Ruben Espinosa)__
|
14
|
+
* [d191a19](../../commit/d191a19) test coverage increase __(Ruben Espinosa)__
|
15
|
+
* [7b4a522](../../commit/7b4a522) readme updated __(Ruben Espinosa)__
|
16
|
+
|
17
|
+
#### v0.0.3
|
18
|
+
* [53ccd3a](../../commit/53ccd3a) Bump to 0.0.3 __(Ruben Espinosa)__
|
19
|
+
* [a6dbdb3](../../commit/a6dbdb3) test coverage __(Ruben Espinosa)__
|
20
|
+
|
21
|
+
#### v0.0.2
|
22
|
+
* [40a15ae](../../commit/40a15ae) Bump to 0.0.2 __(Ruben Espinosa)__
|
23
|
+
* [cbf1041](../../commit/cbf1041) using Usagewacth module insted of original module __(Ruben Espinosa)__
|
24
|
+
* [e8e0bb4](../../commit/e8e0bb4) readme updated __(Ruben Espinosa)__
|
25
|
+
|
26
|
+
#### v0.0.1
|
27
|
+
* [45f61a9](../../commit/45f61a9) first commit __(Ruben Espinosa)__
|
data/README.md
CHANGED
@@ -111,7 +111,9 @@ Top Ten Processes By Memory Consumption: [["WebProcess", "8.3"], ["rubymine", "6
|
|
111
111
|
uw_load
|
112
112
|
uw_cpuused
|
113
113
|
uw_memused
|
114
|
-
|
114
|
+
uw_httpconns
|
115
|
+
uw_bandrx
|
116
|
+
uw_bandtx
|
115
117
|
|
116
118
|
|
117
119
|
## Notes
|
@@ -143,6 +145,7 @@ Top Ten Processes By Memory Consumption: [["WebProcess", "8.3"], ["rubymine", "6
|
|
143
145
|
|
144
146
|
RUBY VERSIONS:
|
145
147
|
ruby 1.9.3p429 (2013-05-15) [x86_64-linux]
|
148
|
+
ruby 2.0
|
146
149
|
|
147
150
|
OS VERSIONS:
|
148
151
|
CENTOS 5x 6x, Ubuntu 12.04, Fedora 18, Mountain Lion 10.8.4
|
data/examples/mac_example.rb
CHANGED
@@ -14,3 +14,5 @@ puts "#{usw.uw_load} Average System Load Of The Past Minute"
|
|
14
14
|
puts "Top Ten Processes By CPU Consumption: #{usw.uw_cputop}"
|
15
15
|
puts "Top Ten Processes By Memory Consumption: #{usw.uw_memtop}"
|
16
16
|
puts "#{usw.uw_httpconns} Connections in 80 Port"
|
17
|
+
puts "#{usw.uw_bandrx} Mbit/s Current Bandwidth Received"
|
18
|
+
puts "#{usw.uw_bandtx} Mbit/s Current Bandwidth Transmitted"
|
data/lib/usagewatch_ext/mac.rb
CHANGED
@@ -72,15 +72,19 @@ module Usagewatch
|
|
72
72
|
cpu
|
73
73
|
end
|
74
74
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
75
|
+
def self.uw_bandrx
|
76
|
+
read1 =`netstat -ib | grep -e "en1" -m 1 | awk '{print $7}'`
|
77
|
+
sleep 1
|
78
|
+
read2=`netstat -ib | grep -e "en1" -m 1 | awk '{print $7}'`
|
79
|
+
(((read2.to_f - read1.to_f)/1024)/1024).round(3)
|
80
|
+
end
|
79
81
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
82
|
+
def self.uw_bandtx
|
83
|
+
send1=`netstat -ib | grep -e "en1" -m 1 | awk '{print $10}'`
|
84
|
+
sleep 1
|
85
|
+
send2=`netstat -ib | grep -e "en1" -m 1 | awk '{print $10}'`
|
86
|
+
(((send2.to_f - send1.to_f)/1024)/1024).round(3)
|
87
|
+
end
|
84
88
|
|
85
89
|
#todo
|
86
90
|
#def uw_diskioreads
|
metadata
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: usagewatch_ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Ruben Espinosa, Phil Chen
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2013-
|
12
|
+
date: 2013-09-04 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: usagewatch
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ~>
|
18
20
|
- !ruby/object:Gem::Version
|
@@ -20,6 +22,7 @@ dependencies:
|
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
27
|
- - ~>
|
25
28
|
- !ruby/object:Gem::Version
|
@@ -27,6 +30,7 @@ dependencies:
|
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: bundler
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
35
|
- - ~>
|
32
36
|
- !ruby/object:Gem::Version
|
@@ -34,6 +38,7 @@ dependencies:
|
|
34
38
|
type: :development
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
43
|
- - ~>
|
39
44
|
- !ruby/object:Gem::Version
|
@@ -41,6 +46,7 @@ dependencies:
|
|
41
46
|
- !ruby/object:Gem::Dependency
|
42
47
|
name: rake
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
44
50
|
requirements:
|
45
51
|
- - ! '>='
|
46
52
|
- !ruby/object:Gem::Version
|
@@ -48,6 +54,7 @@ dependencies:
|
|
48
54
|
type: :development
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
51
58
|
requirements:
|
52
59
|
- - ! '>='
|
53
60
|
- !ruby/object:Gem::Version
|
@@ -55,6 +62,7 @@ dependencies:
|
|
55
62
|
- !ruby/object:Gem::Dependency
|
56
63
|
name: rspec
|
57
64
|
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
58
66
|
requirements:
|
59
67
|
- - ! '>='
|
60
68
|
- !ruby/object:Gem::Version
|
@@ -62,6 +70,7 @@ dependencies:
|
|
62
70
|
type: :development
|
63
71
|
prerelease: false
|
64
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
65
74
|
requirements:
|
66
75
|
- - ! '>='
|
67
76
|
- !ruby/object:Gem::Version
|
@@ -77,6 +86,7 @@ files:
|
|
77
86
|
- .gitignore
|
78
87
|
- .rspec
|
79
88
|
- .travis.yml
|
89
|
+
- CHANGELOG.md
|
80
90
|
- Gemfile
|
81
91
|
- LICENSE.txt
|
82
92
|
- README.md
|
@@ -95,7 +105,6 @@ files:
|
|
95
105
|
homepage: https://github.com/rderoldan1/usagewatch_ext
|
96
106
|
licenses:
|
97
107
|
- MIT
|
98
|
-
metadata: {}
|
99
108
|
post_install_message: ! '* Usagewatch Gem for linux are covered for our test.
|
100
109
|
|
101
110
|
* Mac OS version is in development
|
@@ -107,20 +116,28 @@ rdoc_options:
|
|
107
116
|
require_paths:
|
108
117
|
- lib
|
109
118
|
required_ruby_version: !ruby/object:Gem::Requirement
|
119
|
+
none: false
|
110
120
|
requirements:
|
111
121
|
- - ! '>='
|
112
122
|
- !ruby/object:Gem::Version
|
113
123
|
version: '0'
|
124
|
+
segments:
|
125
|
+
- 0
|
126
|
+
hash: 379101011193989804
|
114
127
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
|
+
none: false
|
115
129
|
requirements:
|
116
|
-
- - ! '
|
130
|
+
- - ! '>='
|
117
131
|
- !ruby/object:Gem::Version
|
118
|
-
version:
|
132
|
+
version: '0'
|
133
|
+
segments:
|
134
|
+
- 0
|
135
|
+
hash: 379101011193989804
|
119
136
|
requirements: []
|
120
137
|
rubyforge_project:
|
121
|
-
rubygems_version:
|
138
|
+
rubygems_version: 1.8.25
|
122
139
|
signing_key:
|
123
|
-
specification_version:
|
140
|
+
specification_version: 3
|
124
141
|
summary: Extended version of usagewatch
|
125
142
|
test_files:
|
126
143
|
- spec/general_spec.rb
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
N2FkYjUyZGI1ZmE1NDJiNmI2MTk2NWM3MWM0YTI5YzRjNTdmZmNjYw==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
Y2I3NDNkMzQ0YmYyNjA1NGI1ZjJkMDBjOTUyY2ZhMWI2ZDBhZWU4OQ==
|
7
|
-
!binary "U0hBNTEy":
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
Y2Q4MjNmMjJiNmUyMjYzODcxNzlkZTE0MmNiMjhlNjA3ODlkYmM3MmRhMzBj
|
10
|
-
MTU1ZTM1ZmU2MTU3Mzk3YjRlZjdhNWQ0ZjY0N2JiZGVhY2IxNGU0MWY2MDg0
|
11
|
-
MGViOWY0NjZjNjAxNjZjNGFhYTkxMWJiMTQyMjliODk1MDBlYTQ=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
YTBkNzA0ZWY2NjIzYjJmMjFlZmUzOGRlYTliNDI5NDRlMThjYmYwNzM1ZmI1
|
14
|
-
ZTMzMzFhZWZkYTljMjIxZDk5MjA4MjMwMGIzZjgyNjcxZTNhOWQyYmE1MDg1
|
15
|
-
NGQ1ZmI2NTViMTYxNTE1Yzk4OGZmMzlmZjlhMTRkZjQyMTZmZjc=
|