check if files exist in /tmp
This commit is contained in:
parent
5795cb8879
commit
fc76bc00de
2
cpu.sh
2
cpu.sh
|
@ -25,7 +25,9 @@ SEEN=$(ls -1 /tmp/vm* | awk -F'/' '{print $3}')
|
|||
OUT=$(ps -uU _vmd | awk -v var="${THRESHOLD}" '$12 !~ /\// && $3 > var {print $12}')
|
||||
if [ -z "$OUT" ]; then
|
||||
echo "No VM over the threshold overload"
|
||||
if ls /tmp/vm* 1> /dev/null 2>&1; then
|
||||
rm -rf /tmp/vm*
|
||||
fi
|
||||
fi
|
||||
|
||||
for VM in ${OUT}; do
|
||||
|
|
Loading…
Reference in New Issue