From bb4ac2f11528750068715bf820d7060a186da61b Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 21 Mar 2013 12:27:37 +0200 Subject: [PATCH] fix for uptime calculation --- bin/v-list-sys-services | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/v-list-sys-services b/bin/v-list-sys-services index 8e047b9c0..79254fe12 100755 --- a/bin/v-list-sys-services +++ b/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