Skip to content

Commit 33b1bcc

Browse files
committed
Fix: memory stats on v-list-sys-services
1 parent f04b44a commit 33b1bcc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bin/v-list-sys-services

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ get_srv_state() {
7878
srv=$1
7979
name=${2-$1}
8080
state='running'
81+
mem=0
82+
cpu=0
83+
rtime="0"
8184

8285
# Searching related pids
8386
if [ -z $3 ]; then
@@ -92,6 +95,7 @@ get_srv_state() {
9295
# Checking pid
9396
if [ ! -z "$pids" ]; then
9497
pid=$(echo "$pids" |cut -f 1 -d '|')
98+
pids=${pids%|}
9599
pids=$(egrep "$pids" $tmp_file)
96100

97101
# Calculating CPU usage

0 commit comments

Comments
 (0)