Selaa lähdekoodia

relative path to pidof command

Serghey Rodin 12 vuotta sitten
vanhempi
sitoutus
3450cb4973
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      bin/v-list-sys-services

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

@@ -28,7 +28,7 @@ get_srv_state() {
         # Calculate cpu and memory usage
         cpu=0
         mem=0
-        for pid in $(/sbin/pidof $proc_name); do
+        for pid in $(pidof $proc_name); do
             pid_mem=$(pmap -x $pid | tail -n1 | awk '{print $3}')
             pid_cpu=$(grep "^$pid " $tmp_file | cut -f 2 -d ' ')
             cpu=$((cpu + pid_cpu))