Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
reference-repository
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
grid5000
reference-repository
Commits
7d5ddf07
Commit
7d5ddf07
authored
Jun 16, 2018
by
Lucas Nussbaum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[dev/wiki] fix rendering of processors with no frequency (Skylake)
parent
c439a57b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
generators/wiki/lib/generators/site_hardware.rb
generators/wiki/lib/generators/site_hardware.rb
+4
-2
No files found.
generators/wiki/lib/generators/site_hardware.rb
View file @
7d5ddf07
...
...
@@ -191,14 +191,16 @@ def get_hardware(sites)
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_freq'
]
=
node_hash
[
'processor'
][
'other_description'
].
split
(
'@'
)[
1
]
if
node_hash
[
'processor'
][
'other_description'
]
=~
/@/
hard
[
'processor_freq'
]
=
node_hash
[
'processor'
][
'other_description'
].
split
(
'@'
)[
1
].
strip
end
hard
[
'microarchitecture'
]
=
node_hash
[
'processor'
][
'microarchitecture'
]
hard
[
'cpus_per_node'
]
=
node_hash
[
'architecture'
][
'nb_procs'
]
hard
[
'cpus_per_node_str'
]
=
hard
[
'cpus_per_node'
].
to_s
+
' '
+
G5K
.
pluralize
(
hard
[
'cpus_per_node'
],
'CPU'
)
+
'/node'
hard
[
'cores_per_cpu'
]
=
node_hash
[
'architecture'
][
'nb_cores'
]
/
hard
[
'cpus_per_node'
]
hard
[
'cores_per_cpu_str'
]
=
hard
[
'cores_per_cpu'
].
to_s
+
' '
+
G5K
.
pluralize
(
hard
[
'cores_per_cpu'
],
'core'
)
+
'/CPU'
hard
[
'num_processor_model'
]
=
(
hard
[
'cpus_per_node'
]
==
1
?
''
:
"
#{
hard
[
'cpus_per_node'
]
}
x "
)
+
hard
[
'processor_model'
].
gsub
(
' '
,
' '
)
hard
[
'processor_description'
]
=
[
hard
[
'processor_model'
],
hard
[
'microarchitecture'
],
hard
[
'processor_freq'
],
'('
+
hard
[
'cpus_per_node_str'
]
+
','
,
hard
[
'cores_per_cpu_str'
]
+
')'
].
join
(
' '
)
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
[
'ram_size'
]
=
G5K
.
get_size
(
node_hash
[
'main_memory'
][
'ram_size'
])
storage
=
node_hash
[
'storage_devices'
].
map
{
|
k
,
v
|
{
'size'
=>
v
[
'size'
],
'tech'
=>
v
[
'storage'
]}
}
hard
[
'storage'
]
=
storage
.
each_with_object
(
Hash
.
new
(
0
))
{
|
data
,
counts
|
counts
[
data
]
+=
1
}.
to_a
.
sort_by
{
|
e
|
e
[
0
][
'size'
].
to_f
}.
map
{
|
e
|
(
e
[
1
]
==
1
?
''
:
e
[
1
].
to_s
+
' x '
)
+
G5K
.
get_size
(
e
[
0
][
'size'
])
+
' '
+
e
[
0
][
'tech'
]
}.
join
(
' + '
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment