Class: OCI::Opsi::Models::HostGpuUsage
- Inherits:
-
HostPerformanceMetricGroup
- Object
- HostPerformanceMetricGroup
- OCI::Opsi::Models::HostGpuUsage
- Defined in:
- lib/oci/opsi/models/host_gpu_usage.rb
Overview
GPU performance metrics
Constant Summary
Constants inherited from HostPerformanceMetricGroup
OCI::Opsi::Models::HostPerformanceMetricGroup::METRIC_NAME_ENUM
Instance Attribute Summary collapse
-
#clock_event_app_clock_setting ⇒ Integer
GPU clocks are limited by applications clocks setting.
-
#clock_event_hw_power_break ⇒ Integer
HW Power Brake Slowdown (reducing the core clocks by a factor of 2 or more) is engaged.
-
#clock_event_hw_thermal_slow_down ⇒ Integer
HW Thermal Slowdown (reducing the core clocks by a factor of 2 or more) is engaged.
-
#clock_event_idle ⇒ Integer
Nothing running on CPU, clocks are idle.
-
#clock_event_sw_power_cap ⇒ Integer
SW Power Scaling algorithm is reducing the clocks below requested clocks because the GPU is consuming too much power.
-
#clock_event_sw_thermal_slowdown ⇒ Integer
SW Thermal capping algorithm is reducing clocks below requested clocks because GPU temperature is higher than Max Operating Temp.
-
#clock_event_sync_boost ⇒ Integer
HW Power Brake Slowdown (reducing the core clocks by a factor of 2 or more) is engaged.
-
#clock_speed_graphics ⇒ Float
GPU Graphics (Shader) Clock Speed.
-
#clock_speed_memory ⇒ Float
GPU Memory Clock Speed.
-
#clock_speed_sm ⇒ Float
GPU SM (Streaming Multiprocessor) Clock Speed.
-
#clock_speed_video ⇒ Float
GPU Video Clock Speed.
-
#ecc_double_bit_errors ⇒ Integer
GPU ECC Double Bit Errors.
-
#ecc_single_bit_errors ⇒ Integer
GPU ECC Single Bit Errors.
-
#fan_utilization ⇒ Float
GPU Fan Utilization.
-
#gpu_id ⇒ Integer
GPU Identifier.
-
#memory_utilization ⇒ Float
GPU Memory Utilization Percent.
-
#performance_state ⇒ Float
GPU Performance State.
-
#power_draw ⇒ Float
GPU Power Draw in Watts.
-
#temperature ⇒ Float
GPU Temperature in Celsius.
-
#utilization ⇒ Float
GPU Utilization Percent.
Attributes inherited from HostPerformanceMetricGroup
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ HostGpuUsage
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Methods inherited from HostPerformanceMetricGroup
Constructor Details
#initialize(attributes = {}) ⇒ HostGpuUsage
Initializes the object
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 180 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['metricName'] = 'HOST_GPU_USAGE' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.gpu_id = attributes[:'gpuId'] if attributes[:'gpuId'] raise 'You cannot provide both :gpuId and :gpu_id' if attributes.key?(:'gpuId') && attributes.key?(:'gpu_id') self.gpu_id = attributes[:'gpu_id'] if attributes[:'gpu_id'] self.utilization = attributes[:'utilization'] if attributes[:'utilization'] self.memory_utilization = attributes[:'memoryUtilization'] if attributes[:'memoryUtilization'] raise 'You cannot provide both :memoryUtilization and :memory_utilization' if attributes.key?(:'memoryUtilization') && attributes.key?(:'memory_utilization') self.memory_utilization = attributes[:'memory_utilization'] if attributes[:'memory_utilization'] self.power_draw = attributes[:'powerDraw'] if attributes[:'powerDraw'] raise 'You cannot provide both :powerDraw and :power_draw' if attributes.key?(:'powerDraw') && attributes.key?(:'power_draw') self.power_draw = attributes[:'power_draw'] if attributes[:'power_draw'] self.temperature = attributes[:'temperature'] if attributes[:'temperature'] self.fan_utilization = attributes[:'fanUtilization'] if attributes[:'fanUtilization'] raise 'You cannot provide both :fanUtilization and :fan_utilization' if attributes.key?(:'fanUtilization') && attributes.key?(:'fan_utilization') self.fan_utilization = attributes[:'fan_utilization'] if attributes[:'fan_utilization'] self.clock_speed_graphics = attributes[:'clockSpeedGraphics'] if attributes[:'clockSpeedGraphics'] raise 'You cannot provide both :clockSpeedGraphics and :clock_speed_graphics' if attributes.key?(:'clockSpeedGraphics') && attributes.key?(:'clock_speed_graphics') self.clock_speed_graphics = attributes[:'clock_speed_graphics'] if attributes[:'clock_speed_graphics'] self.clock_speed_sm = attributes[:'clockSpeedSm'] if attributes[:'clockSpeedSm'] raise 'You cannot provide both :clockSpeedSm and :clock_speed_sm' if attributes.key?(:'clockSpeedSm') && attributes.key?(:'clock_speed_sm') self.clock_speed_sm = attributes[:'clock_speed_sm'] if attributes[:'clock_speed_sm'] self.clock_speed_video = attributes[:'clockSpeedVideo'] if attributes[:'clockSpeedVideo'] raise 'You cannot provide both :clockSpeedVideo and :clock_speed_video' if attributes.key?(:'clockSpeedVideo') && attributes.key?(:'clock_speed_video') self.clock_speed_video = attributes[:'clock_speed_video'] if attributes[:'clock_speed_video'] self.clock_speed_memory = attributes[:'clockSpeedMemory'] if attributes[:'clockSpeedMemory'] raise 'You cannot provide both :clockSpeedMemory and :clock_speed_memory' if attributes.key?(:'clockSpeedMemory') && attributes.key?(:'clock_speed_memory') self.clock_speed_memory = attributes[:'clock_speed_memory'] if attributes[:'clock_speed_memory'] self.performance_state = attributes[:'performanceState'] if attributes[:'performanceState'] raise 'You cannot provide both :performanceState and :performance_state' if attributes.key?(:'performanceState') && attributes.key?(:'performance_state') self.performance_state = attributes[:'performance_state'] if attributes[:'performance_state'] self.ecc_single_bit_errors = attributes[:'eccSingleBitErrors'] if attributes[:'eccSingleBitErrors'] raise 'You cannot provide both :eccSingleBitErrors and :ecc_single_bit_errors' if attributes.key?(:'eccSingleBitErrors') && attributes.key?(:'ecc_single_bit_errors') self.ecc_single_bit_errors = attributes[:'ecc_single_bit_errors'] if attributes[:'ecc_single_bit_errors'] self.ecc_double_bit_errors = attributes[:'eccDoubleBitErrors'] if attributes[:'eccDoubleBitErrors'] raise 'You cannot provide both :eccDoubleBitErrors and :ecc_double_bit_errors' if attributes.key?(:'eccDoubleBitErrors') && attributes.key?(:'ecc_double_bit_errors') self.ecc_double_bit_errors = attributes[:'ecc_double_bit_errors'] if attributes[:'ecc_double_bit_errors'] self.clock_event_idle = attributes[:'clockEventIdle'] if attributes[:'clockEventIdle'] raise 'You cannot provide both :clockEventIdle and :clock_event_idle' if attributes.key?(:'clockEventIdle') && attributes.key?(:'clock_event_idle') self.clock_event_idle = attributes[:'clock_event_idle'] if attributes[:'clock_event_idle'] self.clock_event_hw_thermal_slow_down = attributes[:'clockEventHwThermalSlowDown'] if attributes[:'clockEventHwThermalSlowDown'] raise 'You cannot provide both :clockEventHwThermalSlowDown and :clock_event_hw_thermal_slow_down' if attributes.key?(:'clockEventHwThermalSlowDown') && attributes.key?(:'clock_event_hw_thermal_slow_down') self.clock_event_hw_thermal_slow_down = attributes[:'clock_event_hw_thermal_slow_down'] if attributes[:'clock_event_hw_thermal_slow_down'] self.clock_event_sw_power_cap = attributes[:'clockEventSwPowerCap'] if attributes[:'clockEventSwPowerCap'] raise 'You cannot provide both :clockEventSwPowerCap and :clock_event_sw_power_cap' if attributes.key?(:'clockEventSwPowerCap') && attributes.key?(:'clock_event_sw_power_cap') self.clock_event_sw_power_cap = attributes[:'clock_event_sw_power_cap'] if attributes[:'clock_event_sw_power_cap'] self.clock_event_app_clock_setting = attributes[:'clockEventAppClockSetting'] if attributes[:'clockEventAppClockSetting'] raise 'You cannot provide both :clockEventAppClockSetting and :clock_event_app_clock_setting' if attributes.key?(:'clockEventAppClockSetting') && attributes.key?(:'clock_event_app_clock_setting') self.clock_event_app_clock_setting = attributes[:'clock_event_app_clock_setting'] if attributes[:'clock_event_app_clock_setting'] self.clock_event_hw_power_break = attributes[:'clockEventHwPowerBreak'] if attributes[:'clockEventHwPowerBreak'] raise 'You cannot provide both :clockEventHwPowerBreak and :clock_event_hw_power_break' if attributes.key?(:'clockEventHwPowerBreak') && attributes.key?(:'clock_event_hw_power_break') self.clock_event_hw_power_break = attributes[:'clock_event_hw_power_break'] if attributes[:'clock_event_hw_power_break'] self.clock_event_sw_thermal_slowdown = attributes[:'clockEventSwThermalSlowdown'] if attributes[:'clockEventSwThermalSlowdown'] raise 'You cannot provide both :clockEventSwThermalSlowdown and :clock_event_sw_thermal_slowdown' if attributes.key?(:'clockEventSwThermalSlowdown') && attributes.key?(:'clock_event_sw_thermal_slowdown') self.clock_event_sw_thermal_slowdown = attributes[:'clock_event_sw_thermal_slowdown'] if attributes[:'clock_event_sw_thermal_slowdown'] self.clock_event_sync_boost = attributes[:'clockEventSyncBoost'] if attributes[:'clockEventSyncBoost'] raise 'You cannot provide both :clockEventSyncBoost and :clock_event_sync_boost' if attributes.key?(:'clockEventSyncBoost') && attributes.key?(:'clock_event_sync_boost') self.clock_event_sync_boost = attributes[:'clock_event_sync_boost'] if attributes[:'clock_event_sync_boost'] end |
Instance Attribute Details
#clock_event_app_clock_setting ⇒ Integer
GPU clocks are limited by applications clocks setting
79 80 81 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 79 def clock_event_app_clock_setting @clock_event_app_clock_setting end |
#clock_event_hw_power_break ⇒ Integer
HW Power Brake Slowdown (reducing the core clocks by a factor of 2 or more) is engaged
83 84 85 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 83 def clock_event_hw_power_break @clock_event_hw_power_break end |
#clock_event_hw_thermal_slow_down ⇒ Integer
HW Thermal Slowdown (reducing the core clocks by a factor of 2 or more) is engaged. Temp too high
71 72 73 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 71 def clock_event_hw_thermal_slow_down @clock_event_hw_thermal_slow_down end |
#clock_event_idle ⇒ Integer
Nothing running on CPU, clocks are idle
67 68 69 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 67 def clock_event_idle @clock_event_idle end |
#clock_event_sw_power_cap ⇒ Integer
SW Power Scaling algorithm is reducing the clocks below requested clocks because the GPU is consuming too much power
75 76 77 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 75 def clock_event_sw_power_cap @clock_event_sw_power_cap end |
#clock_event_sw_thermal_slowdown ⇒ Integer
SW Thermal capping algorithm is reducing clocks below requested clocks because GPU temperature is higher than Max Operating Temp
87 88 89 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 87 def clock_event_sw_thermal_slowdown @clock_event_sw_thermal_slowdown end |
#clock_event_sync_boost ⇒ Integer
HW Power Brake Slowdown (reducing the core clocks by a factor of 2 or more) is engaged
91 92 93 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 91 def clock_event_sync_boost @clock_event_sync_boost end |
#clock_speed_graphics ⇒ Float
GPU Graphics (Shader) Clock Speed
39 40 41 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 39 def clock_speed_graphics @clock_speed_graphics end |
#clock_speed_memory ⇒ Float
GPU Memory Clock Speed
51 52 53 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 51 def clock_speed_memory @clock_speed_memory end |
#clock_speed_sm ⇒ Float
GPU SM (Streaming Multiprocessor) Clock Speed
43 44 45 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 43 def clock_speed_sm @clock_speed_sm end |
#clock_speed_video ⇒ Float
GPU Video Clock Speed
47 48 49 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 47 def clock_speed_video @clock_speed_video end |
#ecc_double_bit_errors ⇒ Integer
GPU ECC Double Bit Errors
63 64 65 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 63 def ecc_double_bit_errors @ecc_double_bit_errors end |
#ecc_single_bit_errors ⇒ Integer
GPU ECC Single Bit Errors
59 60 61 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 59 def ecc_single_bit_errors @ecc_single_bit_errors end |
#fan_utilization ⇒ Float
GPU Fan Utilization
35 36 37 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 35 def fan_utilization @fan_utilization end |
#gpu_id ⇒ Integer
GPU Identifier
15 16 17 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 15 def gpu_id @gpu_id end |
#memory_utilization ⇒ Float
GPU Memory Utilization Percent
23 24 25 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 23 def memory_utilization @memory_utilization end |
#performance_state ⇒ Float
GPU Performance State
55 56 57 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 55 def performance_state @performance_state end |
#power_draw ⇒ Float
GPU Power Draw in Watts
27 28 29 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 27 def power_draw @power_draw end |
#temperature ⇒ Float
GPU Temperature in Celsius
31 32 33 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 31 def temperature @temperature end |
#utilization ⇒ Float
GPU Utilization Percent
19 20 21 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 19 def utilization @utilization end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 94 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'metric_name': :'metricName', 'time_collected': :'timeCollected', 'gpu_id': :'gpuId', 'utilization': :'utilization', 'memory_utilization': :'memoryUtilization', 'power_draw': :'powerDraw', 'temperature': :'temperature', 'fan_utilization': :'fanUtilization', 'clock_speed_graphics': :'clockSpeedGraphics', 'clock_speed_sm': :'clockSpeedSm', 'clock_speed_video': :'clockSpeedVideo', 'clock_speed_memory': :'clockSpeedMemory', 'performance_state': :'performanceState', 'ecc_single_bit_errors': :'eccSingleBitErrors', 'ecc_double_bit_errors': :'eccDoubleBitErrors', 'clock_event_idle': :'clockEventIdle', 'clock_event_hw_thermal_slow_down': :'clockEventHwThermalSlowDown', 'clock_event_sw_power_cap': :'clockEventSwPowerCap', 'clock_event_app_clock_setting': :'clockEventAppClockSetting', 'clock_event_hw_power_break': :'clockEventHwPowerBreak', 'clock_event_sw_thermal_slowdown': :'clockEventSwThermalSlowdown', 'clock_event_sync_boost': :'clockEventSyncBoost' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 124 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'metric_name': :'String', 'time_collected': :'DateTime', 'gpu_id': :'Integer', 'utilization': :'Float', 'memory_utilization': :'Float', 'power_draw': :'Float', 'temperature': :'Float', 'fan_utilization': :'Float', 'clock_speed_graphics': :'Float', 'clock_speed_sm': :'Float', 'clock_speed_video': :'Float', 'clock_speed_memory': :'Float', 'performance_state': :'Float', 'ecc_single_bit_errors': :'Integer', 'ecc_double_bit_errors': :'Integer', 'clock_event_idle': :'Integer', 'clock_event_hw_thermal_slow_down': :'Integer', 'clock_event_sw_power_cap': :'Integer', 'clock_event_app_clock_setting': :'Integer', 'clock_event_hw_power_break': :'Integer', 'clock_event_sw_thermal_slowdown': :'Integer', 'clock_event_sync_boost': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 310 def ==(other) return true if equal?(other) self.class == other.class && metric_name == other.metric_name && time_collected == other.time_collected && gpu_id == other.gpu_id && utilization == other.utilization && memory_utilization == other.memory_utilization && power_draw == other.power_draw && temperature == other.temperature && fan_utilization == other.fan_utilization && clock_speed_graphics == other.clock_speed_graphics && clock_speed_sm == other.clock_speed_sm && clock_speed_video == other.clock_speed_video && clock_speed_memory == other.clock_speed_memory && performance_state == other.performance_state && ecc_single_bit_errors == other.ecc_single_bit_errors && ecc_double_bit_errors == other.ecc_double_bit_errors && clock_event_idle == other.clock_event_idle && clock_event_hw_thermal_slow_down == other.clock_event_hw_thermal_slow_down && clock_event_sw_power_cap == other.clock_event_sw_power_cap && clock_event_app_clock_setting == other.clock_event_app_clock_setting && clock_event_hw_power_break == other.clock_event_hw_power_break && clock_event_sw_thermal_slowdown == other.clock_event_sw_thermal_slowdown && clock_event_sync_boost == other.clock_event_sync_boost end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 361 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
341 342 343 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 341 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
350 351 352 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 350 def hash [metric_name, time_collected, gpu_id, utilization, memory_utilization, power_draw, temperature, fan_utilization, clock_speed_graphics, clock_speed_sm, clock_speed_video, clock_speed_memory, performance_state, ecc_single_bit_errors, ecc_double_bit_errors, clock_event_idle, clock_event_hw_thermal_slow_down, clock_event_sw_power_cap, clock_event_app_clock_setting, clock_event_hw_power_break, clock_event_sw_thermal_slowdown, clock_event_sync_boost].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
394 395 396 397 398 399 400 401 402 403 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 394 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
388 389 390 |
# File 'lib/oci/opsi/models/host_gpu_usage.rb', line 388 def to_s to_hash.to_s end |