mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 21:04:07 -07:00
relative path to pidof command
This commit is contained in:
parent
6959c38f88
commit
3450cb4973
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ get_srv_state() {
|
||||||
# Calculate cpu and memory usage
|
# Calculate cpu and memory usage
|
||||||
cpu=0
|
cpu=0
|
||||||
mem=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_mem=$(pmap -x $pid | tail -n1 | awk '{print $3}')
|
||||||
pid_cpu=$(grep "^$pid " $tmp_file | cut -f 2 -d ' ')
|
pid_cpu=$(grep "^$pid " $tmp_file | cut -f 2 -d ' ')
|
||||||
cpu=$((cpu + pid_cpu))
|
cpu=$((cpu + pid_cpu))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue