Browse Source

Update v-list-sys-services

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.
Skamasle 9 years ago
parent
commit
29c5f93475
1 changed files with 1 additions and 1 deletions
  1. 1 1
      bin/v-list-sys-services

+ 1 - 1
bin/v-list-sys-services

@@ -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=''