usagewatch 0.0.7pre → 0.0.7
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 +2 -1
- data/README.md +1 -1
- data/lib/usagewatch/linux.rb +8 -8
- data/lib/usagewatch/version.rb +1 -1
- metadata +4 -4
data/CHANGELOG
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
License: (MIT) Copyright (C) 2013 usagewatch Author Phil Chen, contributor Ruben Espinosa.
|
2
2
|
|
3
|
-
0.0.
|
3
|
+
0.0.7 July 25 2013
|
4
4
|
====
|
5
5
|
* Added referring people to usagewatch_ext for OS support other then Linux in the OS detection
|
6
|
+
* Cleaned some syntax of calling methods
|
6
7
|
|
7
8
|
0.0.6 July 23 2013
|
8
9
|
====
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ License: (MIT) Copyright (C) 2013 usagewatch Author Phil Chen, contributor Ruben
|
|
7
7
|
A Ruby Class with methods to find usage statistics on a Linux server such as CPU, Disk, TCP/UDP Connections, Load,
|
8
8
|
Bandwidth, Disk I/O, and Memory
|
9
9
|
|
10
|
-
* If you are using a Operating System that is not Linux, please
|
10
|
+
* If you are using a Operating System that is not Linux, please use the Gem usagewatch_ext by Ruben Espinosa
|
11
11
|
|
12
12
|
## Getting Started
|
13
13
|
|
data/lib/usagewatch/linux.rb
CHANGED
@@ -186,9 +186,9 @@ module Usagewatch
|
|
186
186
|
# Current Bandwidth Received Calculation in Mbit/s
|
187
187
|
def self.uw_bandrx
|
188
188
|
|
189
|
-
@new0 = bandrx
|
189
|
+
@new0 = self.bandrx
|
190
190
|
sleep 1
|
191
|
-
@new1 = bandrx
|
191
|
+
@new1 = self.bandrx
|
192
192
|
|
193
193
|
@bytesreceived = @new1[0].to_i - @new0[0].to_i
|
194
194
|
@bitsreceived = (@bytesreceived * 8)
|
@@ -241,9 +241,9 @@ module Usagewatch
|
|
241
241
|
# Current Bandwidth Transmitted in Mbit/s
|
242
242
|
def self.uw_bandtx
|
243
243
|
|
244
|
-
@new0 = bandtx
|
244
|
+
@new0 = self.bandtx
|
245
245
|
sleep 1
|
246
|
-
@new1 = bandtx
|
246
|
+
@new1 = self.bandtx
|
247
247
|
|
248
248
|
@bytestransmitted = @new1[1].to_i - @new0[1].to_i
|
249
249
|
@bitstransmitted = (@bytestransmitted * 8)
|
@@ -294,9 +294,9 @@ module Usagewatch
|
|
294
294
|
# Current Disk Reads Completed
|
295
295
|
def self.uw_diskioreads
|
296
296
|
|
297
|
-
@new0 = diskio
|
297
|
+
@new0 = self.diskio
|
298
298
|
sleep 1
|
299
|
-
@new1 = diskio
|
299
|
+
@new1 = self.diskio
|
300
300
|
|
301
301
|
@diskreads = @new1[0].to_i - @new0[0].to_i
|
302
302
|
end
|
@@ -304,9 +304,9 @@ module Usagewatch
|
|
304
304
|
# Current Disk Writes Completed
|
305
305
|
def self.uw_diskiowrites
|
306
306
|
|
307
|
-
@new0 = diskio
|
307
|
+
@new0 = self.diskio
|
308
308
|
sleep 1
|
309
|
-
@new1 = diskio
|
309
|
+
@new1 = self.diskio
|
310
310
|
|
311
311
|
@diskwrites = @new1[1].to_i - @new0[1].to_i
|
312
312
|
end
|
data/lib/usagewatch/version.rb
CHANGED
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: usagewatch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.7
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Phil Chen, Ruben Espinosa
|
@@ -82,9 +82,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
82
82
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
|
-
- - ! '
|
85
|
+
- - ! '>='
|
86
86
|
- !ruby/object:Gem::Version
|
87
|
-
version:
|
87
|
+
version: '0'
|
88
88
|
requirements: []
|
89
89
|
rubyforge_project:
|
90
90
|
rubygems_version: 1.8.23
|