usagewatch 0.0.3 → 0.0.4.pre

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YTQ3MTFiOTA0NjQzOTQ3YzcyNjlkNTkyNDViOTU4OTA3Y2QyOTY3YQ==
4
+ OGVjOTQ4MDk0ZjhjZTRiZGY1NjRhNTBkZGEzZDMyNTM0NTMxZWI1NA==
5
5
  data.tar.gz: !binary |-
6
- NTZjYzhkNGVmZDE1MWJjNjNjYzYzOWI2ZjQ2YzQ5YmUyM2RhOTEzYg==
6
+ ZTFlZWIyNGY3NGJmNjc3YTAzNzg5ODRjMWJhNmJhNTMyNzA1Yjk2Yw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- Y2M3Y2EzYTI0ODc2Yjg5MWJjNWUyZTEyZmNmMTc0ZDYwYWU1YThkYzVhYTBj
10
- Y2Q0ODU3MzkwNDYyOWNmZDViNTI4MjFmZjQxNDkwMzVmZDQwNmQxMDJiNWY0
11
- NTFmNTRhNDU1YzExYjAyNDYwYTY5NDk5NWI3NGZlYmNhMGRlYjI=
9
+ Mzc3OTJiYjU3YTZjMTNkYmY1OWQ3MjgxZDEwMTJmNGIyMjFmOTMyZWE1NGM1
10
+ NGUxZmVmMjM1YTk0ZmY0MTQzOWMyNTgyNjBiY2Q4NzczNzdhM2Y4ZjNlMWY1
11
+ YmFjZjVhMzdiY2Q5NmJhYmNiOTliZjJhNzUzNzE1ZTU4OGM0OWQ=
12
12
  data.tar.gz: !binary |-
13
- YzRlZDk3NjJjMjdkYmVjYTMwZjE0YzkzNzkyMjUyYWZiODY5NTNkZTdlOTBj
14
- YzVkYWQ5YTI3NWVkZmFhYmUyZTU0MTc2M2RiZGQ4ZWIyNDhlYzI3OTlkYzcx
15
- NTAyMjVhZGQ2YzgyNTYwMWE3OWFhZjdlODU2Y2M1ZjhkYzA5YTI=
13
+ MmJmODA3MjMwNDI2Y2ExYmJkNDZmN2ZkMGQxZmI2NWEwMGY1ODE2N2MwYzVi
14
+ OGNjZjI5MjQ3MzgyNjQwMGMyOTdmZjYxNDBhNjY4MjkxNTA2N2RmNDVhMDg3
15
+ YjQ0NGU2MThlYjRlN2M1YjJmMjdmNWZlYTVjYzI3ZTFkOWViYjc=
@@ -1,3 +1,3 @@
1
1
  module Usagewatch
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4.pre"
3
3
  end
data/lib/usagewatch.rb CHANGED
@@ -10,8 +10,6 @@ module Usagewatch
10
10
  end
11
11
  @round = @sum.round(2)
12
12
  @totaldiskused = ((@round/1024)/1024).round(2)
13
-
14
- return @totaldiskused
15
13
  end
16
14
 
17
15
  # Show the percentage of disk used.
@@ -41,8 +39,6 @@ module Usagewatch
41
39
 
42
40
  @cpuusage = (@procusage.to_f / @proctotal.to_f)
43
41
  @cpuusagepercentage = (100 * @cpuusage).to_f.round(2)
44
-
45
- return @cpuusagepercentage
46
42
  end
47
43
 
48
44
  def uw_tcpused
@@ -66,8 +62,6 @@ module Usagewatch
66
62
  end
67
63
 
68
64
  @totaltcpused = @tcp4count.to_i + @tcp6count.to_i
69
-
70
- return @totaltcpused
71
65
  end
72
66
 
73
67
  def uw_udpused
@@ -90,8 +84,6 @@ module Usagewatch
90
84
  end
91
85
 
92
86
  @totaludpused = @udp4count.to_i + @udp6count.to_i
93
-
94
- return @totaludpused
95
87
  end
96
88
 
97
89
  def uw_memused
@@ -106,8 +98,6 @@ module Usagewatch
106
98
  @memactive = @memstat[5].gsub(/[^0-9]/, "")
107
99
  @memactivecalc = (@memactive.to_f * 100) / @memtotal.to_f
108
100
  @memusagepercentage = @memactivecalc.round
109
-
110
- return @memusagepercentage
111
101
  end
112
102
 
113
103
  def uw_load
@@ -118,8 +108,6 @@ module Usagewatch
118
108
 
119
109
  @load = @loaddata.split(/ /).first
120
110
  end
121
-
122
- return @load
123
111
  end
124
112
 
125
113
  def uw_bandrx
@@ -164,8 +152,6 @@ module Usagewatch
164
152
  end
165
153
 
166
154
  @bandrxtx= @arrTotal
167
-
168
- return @bandrxtx
169
155
  end
170
156
 
171
157
  @new0 = bandrx
@@ -174,9 +160,7 @@ module Usagewatch
174
160
 
175
161
  @bytesreceived = @new1[0].to_i - @new0[0].to_i
176
162
  @bitsreceived = (@bytesreceived * 8)
177
- @megabitsreceived = (@bitsreceived.to_f / 1024 / 1024)
178
-
179
- return @megabitsreceived.round(3)
163
+ @megabitsreceived = (@bitsreceived.to_f / 1024 / 1024).round(3)
180
164
  end
181
165
 
182
166
  def uw_bandtx
@@ -221,8 +205,6 @@ module Usagewatch
221
205
  end
222
206
 
223
207
  @bandrxtx = @arrTotal
224
-
225
- return @bandrxtx
226
208
  end
227
209
 
228
210
  @new0 = bandtx
@@ -231,9 +213,7 @@ module Usagewatch
231
213
 
232
214
  @bytestransmitted = @new1[1].to_i - @new0[1].to_i
233
215
  @bitstransmitted = (@bytestransmitted * 8)
234
- @megabitstransmitted = (@bitstransmitted.to_f / 1024 / 1024)
235
-
236
- return @megabitstransmitted.round(3)
216
+ @megabitstransmitted = (@bitstransmitted.to_f / 1024 / 1024).round(3)
237
217
  end
238
218
 
239
219
  def uw_diskioreads
@@ -276,8 +256,6 @@ module Usagewatch
276
256
  end
277
257
 
278
258
  @diskiorw= @arrTotal
279
-
280
- return @diskiorw
281
259
  end
282
260
 
283
261
  @new0 = diskio
@@ -285,8 +263,6 @@ module Usagewatch
285
263
  @new1 = diskio
286
264
 
287
265
  @diskreads = @new1[0].to_i - @new0[0].to_i
288
-
289
- return @diskreads
290
266
  end
291
267
 
292
268
  def uw_diskiowrites
@@ -329,8 +305,6 @@ module Usagewatch
329
305
  end
330
306
 
331
307
  @diskiorw= @arrTotal
332
-
333
- return @diskiorw
334
308
  end
335
309
 
336
310
  @new0 = diskio
@@ -338,7 +312,5 @@ module Usagewatch
338
312
  @new1 = diskio
339
313
 
340
314
  @diskwrites = @new1[1].to_i - @new0[1].to_i
341
-
342
- return @diskwrites
343
315
  end
344
316
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usagewatch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phil Chen,Ruben Espinosa
@@ -70,9 +70,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
70
70
  version: '0'
71
71
  required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ! '>='
73
+ - - ! '>'
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: 1.3.1
76
76
  requirements: []
77
77
  rubyforge_project:
78
78
  rubygems_version: 2.0.3