Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
paddle_dbnet
Commits
e4a51f40
Commit
e4a51f40
authored
Jun 17, 2021
by
LDOUBLEV
Browse files
get cpuinfo and ip info to status_log
parent
777857ec
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
test/infer.sh
test/infer.sh
+6
-0
test/test.sh
test/test.sh
+6
-0
No files found.
test/infer.sh
View file @
e4a51f40
...
@@ -34,6 +34,12 @@ ${python} -m pip install pynvml;
...
@@ -34,6 +34,12 @@ ${python} -m pip install pynvml;
${
python
}
-m
pip
install
psutil
;
${
python
}
-m
pip
install
psutil
;
${
python
}
-m
pip
install
GPUtil
;
${
python
}
-m
pip
install
GPUtil
;
paddle_info
=
"
$(
python3.7
-c
"import paddle;print(f'paddle_version:{paddle.__version__}');print(f'paddle_commit:{paddle.__git_commit__}')"
)
"
echo
-e
"
\0
33[33m
$paddle_info
\0
33[0m"
|
tee
-a
${
status_log
}
cpu_model
=
`
cat
/proc/cpuinfo |
grep
"model name"
|
awk
-F
':'
'{print $2}'
|
sort
|
uniq
`
echo
-e
"
\0
33[33m cpu_info:
$cpu_model
\0
33[0m"
|
tee
-a
${
status_log
}
ip
=
`
ifconfig|
grep
-A
1
'eth0'
|grep
'inet'
|awk
-F
':'
'{print $2}'
|awk
'{print $1}'
`
echo
-e
"
\0
33[33m ip_info:
$ip
\0
33[0m"
|
tee
-a
${
status_log
}
function
status_check
(){
function
status_check
(){
last_status
=
$1
# the exit code
last_status
=
$1
# the exit code
...
...
test/test.sh
View file @
e4a51f40
...
@@ -75,6 +75,12 @@ ${python} -m pip install psutil;
...
@@ -75,6 +75,12 @@ ${python} -m pip install psutil;
${
python
}
-m
pip
install
GPUtil
;
${
python
}
-m
pip
install
GPUtil
;
${
python
}
-m
pip
install
paddlesim
==
2.0.0
${
python
}
-m
pip
install
paddlesim
==
2.0.0
paddle_info
=
"
$(
python3.7
-c
"import paddle;print(f'paddle_version:{paddle.__version__}');print(f'paddle_commit:{paddle.__git_commit__}')"
)
"
echo
-e
"
\0
33[33m
$paddle_info
\0
33[0m"
|
tee
-a
${
status_log
}
cpu_model
=
`
cat
/proc/cpuinfo |
grep
"model name"
|
awk
-F
':'
'{print $2}'
|
sort
|
uniq
`
echo
-e
"
\0
33[33m cpu_info:
$cpu_model
\0
33[0m"
|
tee
-a
${
status_log
}
ip
=
`
ifconfig|
grep
-A
1
'eth0'
|grep
'inet'
|awk
-F
':'
'{print $2}'
|awk
'{print $1}'
`
echo
-e
"
\0
33[33m ip_info:
$ip
\0
33[0m"
|
tee
-a
${
status_log
}
function
status_check
(){
function
status_check
(){
last_status
=
$1
# the exit code
last_status
=
$1
# the exit code
...
...
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