Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GeVarLi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TRANSVIHMI
nfernandez
GeVarLi
Commits
ec95cbd2
Commit
ec95cbd2
authored
2 years ago
by
nicolas.fernandez_ird.fr
Browse files
Options
Downloads
Patches
Plain Diff
2023-04 release
parent
d29156e6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Start_GeVarLi.sh
+4
-4
4 additions, 4 deletions
Start_GeVarLi.sh
with
4 additions
and
4 deletions
Start_GeVarLi.sh
+
4
−
4
View file @
ec95cbd2
...
...
@@ -81,11 +81,11 @@ then
ram_gb
=
$(
expr
${
mem_size
}
\/
$((
1024
**
3
))
)
# mem_size / 1024**3 = Gb
elif
[[
${
os
}
==
"linux"
]]
then
model_name
=
$(
lscpu |
grep
-o
-E
"Model name: +.+"
|
sed
-
r
"s/Model name: +//"
)
# Get chip model name
physical_cpu
=
$(
lscpu |
grep
-o
-E
"^CPU
\(
s
\)
: +[0-9]+"
|
sed
-
r
"s/CPU
\(
s
\)
: +//"
)
# Get physical cpu
threads_cpu
=
$(
lscpu |
grep
-o
-E
"^Thread
\(
s
\)
per core: +[0-9]+"
|
sed
-
r
"s/Thread
\(
s
\)
per core: +//"
)
# Get thread(s) per core
model_name
=
$(
lscpu |
grep
-o
-E
"Model name: +.+"
|
sed
-
E
"s/Model name: +//"
)
# Get chip model name
physical_cpu
=
$(
lscpu |
grep
-o
-E
"^CPU
\(
s
\)
: +[0-9]+"
|
sed
-
E
"s/CPU
\(
s
\)
: +//"
)
# Get physical cpu
threads_cpu
=
$(
lscpu |
grep
-o
-E
"^Thread
\(
s
\)
per core: +[0-9]+"
|
sed
-
E
"s/Thread
\(
s
\)
per core: +//"
)
# Get thread(s) per core
logical_cpu
=
$(
expr
${
physical_cpu
}
\*
${
threads_cpu
}
)
# Calcul logical cpu
mem_size
=
$(
grep
-o
-E
"MemTotal: +[0-9]+"
/proc/meminfo |
sed
-
r
"s/MemTotal: +//"
)
# Get memory size (Kb)
mem_size
=
$(
grep
-o
-E
"MemTotal: +[0-9]+"
/proc/meminfo |
sed
-
E
"s/MemTotal: +//"
)
# Get memory size (Kb)
ram_gb
=
$(
expr
${
mem_size
}
\/
$((
1024
**
2
))
)
# mem_size / 1024**2 = Gb
else
echo
-e
"Please, use '
${
red
}
osx
${
nc
}
' or '
${
red
}
linux
${
nc
}
' operating systems"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment