Explorar o código

fix for uptime calculation

Serghey Rodin %!s(int64=13) %!d(string=hai) anos
pai
achega
bb4ac2f115
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      bin/v-list-sys-services

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

@@ -37,8 +37,8 @@ get_srv_state() {
         mem=$((mem / 1024))
 
         # Get pid date
-        if [ ! -z $pid ] && [ -e "/proc/$pid/cmdline" ]; then
-            mtime=$(stat -c "%Y" /proc/$pid/cmdline)
+        if [ ! -z $pid ] && [ -e "/proc/$pid" ]; then
+            mtime=$(stat -c "%Y" /proc/$pid)
             rtime=$((ctime - mtime))
             rtime=$((rtime  / 60))
         fi