amdgpu_fan 1.1.0 → 1.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e573c19faf31038fcd246334308fe836db2156849da03c35292d967013037804
4
- data.tar.gz: e5ddef669be7d78936d5c83543ae3b9d1bec49cfd5f0120577e848d6eadae25c
3
+ metadata.gz: 33cbd804a68b5d6bdd6aab3270d10befb792cb376645be18ee4532c77138988a
4
+ data.tar.gz: 40cb211ebd4a435c63207082292dd93deab05980a4dae90d425a2257f2f1835d
5
5
  SHA512:
6
- metadata.gz: 19cd5d20a96935b260bef4c1b22b8624675d7b9c4aeeb07a4b56efa236a6a2dfa1ccc8cc8e0413fa78e6c2e8a18b0f74e30b53f0c1494f952fabc6d1f699bb27
7
- data.tar.gz: 490d669b59cda1f9658a635e3bcb032dc83bc76deaeec6cb9d27382d853d5826bc78213e860e9fd459e116886f36d81e60e9ca60a2ca8b4e69cf0a1b4eef4215
6
+ metadata.gz: cf5a76d99bae79d8d6bcf7dae631f0730d31c274b7b413d185efb4a7446beaf78327442dc87be8b59070dee1a297e0efc91df57e50044e21d2de06fe9d2f2ca8
7
+ data.tar.gz: d016f946ed8d32123552d7bdf4b19610dc3f8f338394b49824933c8f986f506cb1985c240ecc457c6f75c3ee525a32cf2f92c38a8713421052670a1b161c800e
@@ -102,6 +102,8 @@ module AmdgpuFan
102
102
  def watch(seconds = 1)
103
103
  return puts 'Seconds must be from 1 to 600' unless (1..600).cover?(seconds.to_i)
104
104
 
105
+ $stdout.sync = true
106
+
105
107
  puts "Watching #{amdgpu_service.name} every #{seconds} second(s)...",
106
108
  ' <Press Ctrl-C to exit>'
107
109
 
@@ -127,6 +129,8 @@ module AmdgpuFan
127
129
  Watch min, max, average, and current stats.
128
130
  DOC
129
131
  def watch_avg
132
+ $stdout.sync = true
133
+
130
134
  puts "Watching #{amdgpu_service.name} min, max and averges since #{Time.now}...",
131
135
  ' <Press Ctrl-C to exit>',
132
136
  "\n\n\n\n\n"
@@ -157,6 +161,8 @@ module AmdgpuFan
157
161
  def watch_csv(seconds = 1)
158
162
  return puts 'Seconds must be from 1 to 600' unless (1..600).cover?(seconds.to_i)
159
163
 
164
+ $stdout.sync = true
165
+
160
166
  puts 'Timestamp,Core Clock (Mhz),Memory Clock (Mhz),Fan speed (rpm),' \
161
167
  'Load (%),Power (Watts),Temp (°C)'
162
168
 
@@ -121,7 +121,7 @@ module AmdgpuFan
121
121
  end
122
122
 
123
123
  def power_draw
124
- power_raw_to_watts File.read(power_avg_file)
124
+ power_raw_to_watts File.read(power_file)
125
125
  end
126
126
 
127
127
  def power_draw_percent
@@ -180,8 +180,9 @@ module AmdgpuFan
180
180
  @device_id ||= File.read(File.join(base_card_dir, 'device')).to_i(16)
181
181
  end
182
182
 
183
- def power_avg_file
184
- @power_avg_file ||= Dir.glob("#{base_card_dir}/**/power1_average").first
183
+ def power_file
184
+ @power_file ||= Dir.glob("#{base_card_dir}/**/power1_average").first ||
185
+ Dir.glob("#{base_card_dir}/**/power1_input").first
185
186
  end
186
187
 
187
188
  def power_raw_to_watts(raw_string)
@@ -2,5 +2,5 @@
2
2
 
3
3
  module AmdgpuFan
4
4
  # Current version of RSpec Core, in semantic versioning format.
5
- VERSION = '1.1.0'
5
+ VERSION = '1.1.2'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amdgpu_fan
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin McCormack