Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 174e0400 authored by Pierre Neyron's avatar Pierre Neyron :bicyclist: Committed by Pierre Neyron
Browse files

[wiki:hw] Rework the processor display: display vendor

parent 3325e441
No related branches found
No related tags found
1 merge request!529Rework wiki hw
......@@ -42,18 +42,23 @@ class G5KHardwareGenerator < WikiGenerator
@node = node_uid
# Processors
model = node_hash['processor']['model']
version = "#{model} #{node_hash['processor']['version']}"
vendor = node_hash['processor']['vendor']
model = node_hash['processor']['model'].gsub(/^#{vendor} /, '')
version = node_hash['processor']['version']
proc_desc = "#{model}"
if version != 'Unknown'
proc_desc += " #{version}"
end
microarchitecture = node_hash['processor']['microarchitecture']
cluster_procs = node_hash['architecture']['nb_procs']
cluster_cores = node_hash['architecture']['nb_cores']
key = [model]
key = [vendor, model]
init(data, 'proc_families', key)
data['proc_families'][key][site_uid] += cluster_procs
key = [{text: microarchitecture || ' ', sort: get_date(microarchitecture) + ', ' + microarchitecture.to_s}, {text: version, sort: get_date(microarchitecture) + ', ' + version.to_s}]
key = [vendor, {text: proc_desc, sort: get_date(microarchitecture) + ', ' + proc_desc.to_s}, {text: microarchitecture || ' ', sort: get_date(microarchitecture) + ', ' + microarchitecture.to_s}]
init(data, 'proc_models', key)
data['proc_models'][key][site_uid] += cluster_procs
......@@ -253,13 +258,13 @@ class G5KHardwareGenerator < WikiGenerator
generated_content += "\n== Processors counts per families ==\n"
sites = @site_uids.map{ |e| "[[#{e.capitalize}:Hardware|#{e.capitalize}]]" }
table_options = 'class="wikitable sortable" style="text-align: center;"'
table_columns = ['Processor family'] + sites + ['Processors total']
table_columns = ['Vendor', 'Processor family'] + sites + ['Processors total']
generated_content += MW.generate_table(table_options, table_columns, get_table_data(data, 'proc_families'))
generated_content += "\n== Processors counts per models ==\n"
table_columns = ['Microarchitecture', 'Processor model'] + sites + ['Processors total']
table_columns = ['Vendor', 'Processor model', 'Microarchitecture'] + sites + ['Processors total']
generated_content += MW.generate_table(table_options, table_columns, get_table_data(data, 'proc_models'))
generated_content += "\n== Cores counts per models ==\n"
table_columns = ['Microarchitecture', 'Core model'] + sites + ['Cores total']
table_columns = ['Vendor', 'Core model', 'Microarchitecture'] + sites + ['Cores total']
generated_content += MW.generate_table(table_options, table_columns, get_table_data(data, 'core_models'))
generated_content += "\n= Memory =\n"
......
......@@ -362,7 +362,11 @@ def get_hardware(sites)
hard['exotic'] = cluster_hash['exotic']
hard['date'] = Date.parse(cluster_hash['created_at'].to_s).strftime('%Y-%m-%d')
hard['model'] = cluster_hash['model']
hard['processor_model'] = [node_hash['processor']['model'], node_hash['processor']['version']].join(' ')
hard['processor_model'] = "#{node_hash['processor']['vendor']} "
hard['processor_model'] += node_hash['processor']['model'].gsub(/^#{node_hash['processor']['vendor']} /,'')
if node_hash['processor']['version'] != 'Unknown'
hard['processor_model'] += " #{node_hash['processor']['version']}"
end
if node_hash['processor']['other_description'] =~ /@/
hard['processor_freq'] = node_hash['processor']['other_description'].split('@')[1].strip
end
......@@ -374,7 +378,7 @@ def get_hardware(sites)
hard['architecture'] = node_hash['architecture']['platform_type']
exotic_archname = get_exotic_archname(node_hash['architecture']['platform_type'])
hard['num_processor_model'] = (hard['cpus_per_node'] == 1 ? '' : "#{hard['cpus_per_node']}&nbsp;x&nbsp;") + (exotic_archname ? "#{exotic_archname}&nbsp;" : '') + hard['processor_model'].gsub(' ', '&nbsp;')
hard['processor_description'] = "#{hard['processor_model']} (#{hard['microarchitecture']}#{hard['processor_freq'] ? ', ' + hard['processor_freq'] : ''}, #{hard['cpus_per_node_str']}, #{hard['cores_per_cpu_str']})"
hard['processor_description'] = "#{hard['processor_model']} (#{hard['microarchitecture']}), #{hard['architecture']}#{hard['processor_freq'] ? ', ' + hard['processor_freq'] : ''}, #{hard['cpus_per_node_str']}, #{hard['cores_per_cpu_str']}"
hard['ram_size'] = G5K.get_size(node_hash['main_memory']['ram_size'])
hard['pmem_size'] = G5K.get_size(node_hash['main_memory']['pmem_size']) unless node_hash['main_memory']['pmem_size'].nil?
storage = node_hash['storage_devices'].sort_by!{ |d| d['id']}.map { |i| { 'size' => i['size'], 'tech' => i['storage'], 'reservation' => i['reservation'].nil? ? false : i['reservation'] } }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment