refactor(discovery): use ping for discovery and fill MAC via SSH
This commit is contained in:
14
auto-check/scripts/memory.sh
Normal file
14
auto-check/scripts/memory.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
echo "===TEST:memory==="
|
||||
VM_WORKERS=${AUTOCHECK_THREADS:-4}
|
||||
if [ "$VM_WORKERS" -gt 4 ]; then VM_WORKERS=4; fi
|
||||
START_TIME=$(date +%s%N)
|
||||
set +e
|
||||
OUTPUT=$(stress-ng --vm "${VM_WORKERS}" --vm-bytes 256M --vm-method all --timeout "${AUTOCHECK_DURATION:-30}s" --metrics-brief 2>&1)
|
||||
EXIT_CODE=$?
|
||||
set -e
|
||||
END_TIME=$(date +%s%N)
|
||||
DURATION_MS=$(( (END_TIME - START_TIME) / 1000000 ))
|
||||
if [ "$EXIT_CODE" -eq 0 ]; then echo 'status:pass'; else echo 'status:fail'; fi
|
||||
echo "duration:${DURATION_MS}ms"
|
||||
echo "output:${OUTPUT}"
|
||||
echo ''
|
||||
Reference in New Issue
Block a user