Skip to content
Permalink
Browse files

Output 0 if benchmark doesn't exist

  • Loading branch information...
NEMS Linux
NEMS Linux committed May 4, 2019
1 parent 67e55d6 commit d47bbc61ccccb8e658e4b9ba52444bbde0fa0f27
Showing with 20 additions and 4 deletions.
  1. +20 −4 info.sh
24 info.sh
@@ -344,16 +344,32 @@ elif [[ $COMMAND == "downtimes" ]]; then

elif [[ $COMMAND == "benchmark" ]]; then
if [[ $VARIABLE == 'cpu' ]]; then
cat /var/log/nems/benchmarks/cpu
if [[ -f /var/log/nems/benchmarks/cpu ]]; then
cat /var/log/nems/benchmarks/cpu
else
echo 0
fi
fi
if [[ $VARIABLE == 'mutex' ]]; then
cat /var/log/nems/benchmarks/mutex
if [[ -f /var/log/nems/benchmarks/mutex ]]; then
cat /var/log/nems/benchmarks/mutex
else
echo 0
fi
fi
if [[ $VARIABLE == 'io' ]]; then
cat /var/log/nems/benchmarks/io
if [[ -f /var/log/nems/benchmarks/io ]]; then
cat /var/log/nems/benchmarks/io
else
echo 0
fi
fi
if [[ $VARIABLE == 'ram' ]]; then
cat /var/log/nems/benchmarks/ram
if [[ -f /var/log/nems/benchmarks/ram ]]; then
cat /var/log/nems/benchmarks/ram
else
echo 0
fi
fi
if [[ $VARIABLE == '7z' ]]; then
if [[ -f /var/log/nems/benchmarks/7z ]]; then

0 comments on commit d47bbc6

Please sign in to comment.
You can’t perform that action at this time.