fluent-diagtool 0.1.6 → 0.1.7

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: 459fd1aefd11e12f79ef9f12cd99e289412fc99c3711191508aa3b17af985a6d
4
- data.tar.gz: 8ed32d7c995ec7a6afb9a618421eb49590f44db96ed10f4babb8440cb3fde271
3
+ metadata.gz: '08fde300371aa506f74a6b700b18840d9ccfa88059a5b2ddff78256e839c37be'
4
+ data.tar.gz: 890483b9fa25f5ee44454d0c8e527ecd7dab2f60e676b283fc64d433c48ac6eb
5
5
  SHA512:
6
- metadata.gz: 97adbb75557f1c7c2cf0624e2c9f4aa8ac1631a91d1b30f269fa137223ee20855ceb5764d47cf32f3b01ec0b1e80d541b0ecb069c27d136e456809b935f91efe
7
- data.tar.gz: e6bc2057366a4f864d7d081235f29bcc0ddbc118412695f52fc6516a642421e9d9770a5a1fd6c7fc2deb7f4cd90a1d3e8d90cb0bcec07e99fd8ef4dc41a90f8a
6
+ metadata.gz: 0e4563b5db53d26fe79dc2a1d7f4c425f63a28bc4ebba62c9005796a258d69b92f1ecac2b8e22f952ff9ea672f5e0e6ff10aeaab49b52773ab0cf295b21a13a9
7
+ data.tar.gz: 5e26af31e777513a58067262e6ea89cad0d7c07f29d3e1e5ceca816162dc089325502f6b5c4a68470be548340c0e9b312e75c0490b1e8346a05526c95b79cd72
@@ -205,7 +205,7 @@ module Diagtool
205
205
 
206
206
  def collect_ulimit()
207
207
  output = @outdir+'/ulimit_n.output'
208
- stdout, stderr, status = Open3.capture3("ulimit -n")
208
+ stdout, stderr, status = Open3.capture3("sh -c 'ulimit -n'")
209
209
  File.open(output, 'w') do |f|
210
210
  f.puts(stdout)
211
211
  end
@@ -176,16 +176,20 @@ module Diagtool
176
176
  end
177
177
  end
178
178
 
179
- diaglogger_info("[Collect] Collecting ulimit information...")
180
- ulimit = c.collect_ulimit()
181
- diaglogger_info("[Collect] ulimit information is stored in #{ulimit}")
179
+ if system("sh -c 'ulimit -n'")
180
+ diaglogger_info("[Collect] Collecting ulimit information...")
181
+ ulimit = c.collect_ulimit()
182
+ diaglogger_info("[Collect] ulimit information is stored in #{ulimit}")
182
183
 
183
- diaglogger_info("[Valid] Validating ulimit information...")
184
- ret, rec, val = v.valid_ulimit(ulimit)
185
- if ret == true
186
- diaglogger_info("[Valid] ulimit => #{val} is correct (recommendation is >#{rec})")
184
+ diaglogger_info("[Valid] Validating ulimit information...")
185
+ ret, rec, val = v.valid_ulimit(ulimit)
186
+ if ret == true
187
+ diaglogger_info("[Valid] ulimit => #{val} is correct (recommendation is >#{rec})")
188
+ else
189
+ diaglogger_warn("[Valid] ulimit => #{val} is incorrect (recommendation is >#{rec})")
190
+ end
187
191
  else
188
- diaglogger_warn("[Valid] ulimit => #{val} is incorrect (recommendation is >#{rec})")
192
+ diaglogger_warn("[Collect] ulimit command does not exist. skip collectig ulimit")
189
193
  end
190
194
 
191
195
  if @conf[:mask] == 'yes'
@@ -1,5 +1,5 @@
1
1
  module Fluent
2
2
  module Diagtool
3
- VERSION = "0.1.6"
3
+ VERSION = "0.1.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-diagtool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - kubotat
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-29 00:00:00.000000000 Z
11
+ date: 2020-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fileutils