Printf work fine but fail whit some locales -> https://forum.vestacp.com/viewtopic.php?f=17&t=12585 In my test this work as well as printf but not is afected to locale problems.
@@ -99,7 +99,7 @@ get_srv_state() {
# Calculating memory usage
mem=$(echo "$pids" |awk '{sum += $3} END {print sum/1024 }')
- mem=$(printf "%.0f\n" $mem)
+ mem=$(echo "${mem%%.*}")
# Searching pid file
pid_file=''