Browse Source

add post-details to check_status

pull/3051/head
Daniel Gibbs 5 years ago
parent
commit
27d8c03916
  1. 2
      lgsm/functions/check.sh
  2. 2
      lgsm/functions/info_distro.sh

2
lgsm/functions/check.sh

@ -85,7 +85,7 @@ for allowed_command in "${allowed_commands_array[@]}"; do
fi
done
allowed_commands_array=( DETAILS MONITOR START STOP CHANGE-PASSWORD UPDATE VALIDATE )
allowed_commands_array=( CHANGE-PASSWORD DETAILS MONITOR START STOP UPDATE VALIDATE POST-DETAILS )
for allowed_command in "${allowed_commands_array[@]}"; do
if [ "${allowed_command}" == "${commandname}" ]; then
check_status.sh

2
lgsm/functions/info_distro.sh

@ -97,7 +97,7 @@ cpumodel=$(awk -F: '/model name/ {name=$2} END {print name}' /proc/cpuinfo | sed
cpucores=$(awk -F: '/model name/ {core++} END {print core}' /proc/cpuinfo)
cpufreqency=$(awk -F: '/cpu MHz/ {freq=$2} END {print freq}' /proc/cpuinfo | sed 's/^[ \t]*//;s/[ \t]*$//')
# CPU usage of the game server pid
if [ "${gameserverpid}" ]; then
if [ -n "${gameserverpid}" ]; then
cpuused=$(ps --forest -o pcpu -g "${gameserverpid}"|awk '{s+=$1} END {print s}')
cpuusedmhz=$(echo "${cpufreqency} * ${cpuused} / 100" | bc )
fi

Loading…
Cancel
Save