server-status 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a3df909f191689b03c6d598c9737ae0b84cb8bda2c4cc841cbeade427935642
4
- data.tar.gz: 626c783a70eae6d96df1d658ffac84077576e5787971d59c9f15d992a1fea9d3
3
+ metadata.gz: 39ff1e3798fc96930dd6ddd6b0bb6630f85b833e218479678df81df1ed0d2ed7
4
+ data.tar.gz: 2bf400538ae8311ce1bc1cf632392f9ce58b317e2630c262e7c50a827edee799
5
5
  SHA512:
6
- metadata.gz: 9c37713219852a433f41053d8a1947d6eef81ee56f29ade290fab6c697b075bc1c9758d59f41e65349f2edc320b94608b900042c413c37b00866cbf5e37f5551
7
- data.tar.gz: 41cd890f49ea182b1d1de7dc2877929ae4ccce6e6cd7102275d65d8e64292f995b3c783e9c754f155eebd7b73562bfb8f41119011e77f205db0500f622fb8c94
6
+ metadata.gz: '0576533758a95c012637d5f26b7a432698522f1751c04389ce5388999d30df58911cc9dc2d35dc452aa83802967017da572e464173b9c9f3a8ba174f66389a1f'
7
+ data.tar.gz: 875860c18b27dd2124d26e2877016af180958d63e3b155c8870cffa947e743d9bf13f8f3da546febe22643361a346cc8b3d7114841453fe20b60e0c860436a4f
@@ -102,7 +102,7 @@ module ServerStatus
102
102
  meminfo = Hash[meminfo_values]
103
103
 
104
104
  total_memory = meminfo['MemTotal']
105
- available_memory = meminfo['MemFree'] + meminfo['Buffers'] + meminfo['Cached']
105
+ available_memory = meminfo['MemAvailable'] || (meminfo['MemFree'] + meminfo['Buffers'] + meminfo['Cached'])
106
106
 
107
107
  format_percentage((total_memory - available_memory) / total_memory.to_f)
108
108
  end
@@ -35,7 +35,7 @@ module ServerStatus
35
35
  end
36
36
 
37
37
  if @options.memory
38
- parts << "cat /proc/meminfo | grep -P '^(MemTotal|MemFree|Cached|Buffers):'"
38
+ parts << "cat /proc/meminfo | grep -P '^(MemTotal|MemAvailable|MemFree|Cached|Buffers):'"
39
39
  end
40
40
 
41
41
  if @options.clock_drift
@@ -1,3 +1,3 @@
1
1
  module ServerStatus
2
- VERSION = '1.2.2'
2
+ VERSION = '1.2.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: server-status
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Brooks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-30 00:00:00.000000000 Z
11
+ date: 2018-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  version: '0'
130
130
  requirements: []
131
131
  rubyforge_project:
132
- rubygems_version: 2.7.3
132
+ rubygems_version: 2.7.7
133
133
  signing_key:
134
134
  specification_version: 4
135
135
  summary: Command line tool for quickly fetching and displaying vital host metrics