Skip to content

Commit bb4ac2f

Browse files
committed
fix for uptime calculation
1 parent 6fbfb3d commit bb4ac2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/v-list-sys-services

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ get_srv_state() {
3737
mem=$((mem / 1024))
3838

3939
# Get pid date
40-
if [ ! -z $pid ] && [ -e "/proc/$pid/cmdline" ]; then
41-
mtime=$(stat -c "%Y" /proc/$pid/cmdline)
40+
if [ ! -z $pid ] && [ -e "/proc/$pid" ]; then
41+
mtime=$(stat -c "%Y" /proc/$pid)
4242
rtime=$((ctime - mtime))
4343
rtime=$((rtime / 60))
4444
fi

0 commit comments

Comments
 (0)