Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion validate_health.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ fi

if dpkg -s sysstat &>/dev/null; then
echo -e "\nSystem CPU, Memory, Disk usage"

# set the S_TIME_FORMAT variable to ensure the date format match YYYY-MM-DD
export S_TIME_FORMAT=ISO
cpu_usage=$(mpstat | awk '$12 ~ /[0-9.]+/ { print 100 - $12 }')
mem_usage=$(free -m | awk 'NR==2{printf "%.2f", $3*100/$2 }')
disk_usage=$(df -h | awk '$NF=="/"{printf "%s", $5}' | tr -d %)
Expand Down