diff --git a/install/install_quilibrium_service.sh b/install/install_quilibrium_service.sh index aab0834..87b7397 100644 --- a/install/install_quilibrium_service.sh +++ b/install/install_quilibrium_service.sh @@ -33,6 +33,15 @@ else echo "git is installed" fi +if ! command -v cpulimit &> /dev/null +then + echo "cpulimit could not be found" + echo "Installing cpulimit..." + su -c "apt update && apt install cpulimit -y" +else + echo "cpulimit is installed" +fi + sudo apt upgrade -y diff --git a/profile/.profile b/profile/.profile index 5db3d54..749ff93 100644 --- a/profile/.profile +++ b/profile/.profile @@ -54,4 +54,5 @@ alias balance='cd ~/ceremonyclient/node && ./${NODE_BINARY} -balance && cd ~' alias nlog='sudo journalctl -u ceremonyclient.service -f --no-hostname -o cat' alias nstart='service ceremonyclient start' alias nrestart='service ceremonyclient restart' -alias nstop='service ceremonyclient stop' \ No newline at end of file +alias nstop='service ceremonyclient stop' +alias benchmark='last_next_difficulty=$(journalctl -u ceremonyclient -ocat -n 100 | grep difficulty | awk -F'"'"'[:,}]'"'"' '"'"'{for(i=1;i<=NF;i++){if($i~"next_difficulty_metric"){gsub(/[ "]/,"",$i); print $(i+1)}}}'"'"' | tail -n 1) && cpus=$(nproc) && echo "" && echo "Your Benchmark Details" && echo "Difficulty: $last_next_difficulty" && echo "CPU(s): $cpus" && if [ $cpus -gt 0 ]; then difficulty_per_core=$(echo "scale=2; ($cpus*$cpus*1000)/$last_next_difficulty" | bc); echo "Score: $difficulty_per_core"; fi' \ No newline at end of file diff --git a/quilibrium_for_dummies.sh b/quilibrium_for_dummies.sh index 4d0deb1..642a697 100644 --- a/quilibrium_for_dummies.sh +++ b/quilibrium_for_dummies.sh @@ -445,6 +445,7 @@ echo " echo "Please follow insturctions very carefully" echo "Please install prerequisites first, then install node, lastly configure grpcurl." echo "Do not forget to restart the node after configuration." + echo "" echo "Quilibrium Version: $VERSION" echo "" echo "Please choose an option:" @@ -453,6 +454,7 @@ echo " echo "2) Install Node 6) Node Info e) Exit" echo "3) Configure grpCurl 7) Node Logs " echo "4) Update Node 8) Restart Node" + echo "" read -p "Enter your choice: " choice