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