CPU utilization refers to a computer’s usage of processing resources or the amount of work handled by a CPU.
CPU utilization is the amount of work a CPU does to perform the tasks given to it. It’s an important metric to track because high CPU usage can negatively impact the performance of a system.
Optimize your server performance with real-time alerts.
Sample Scripting..!!!
echo "SERVER UTILIZATION USING SHELL SCRIPT"
echo "WELCOME, by User $(whoami)"
echo "Today's Date: "
date | awk '{print $3,$2,$6 }'
echo "Time:"
date | awk '{print $4}'
echo "======================================="
echo "server update time is"
uptime
echo "Top $1 last logins"
last -a | head -$s1
echo "======================================="
echo "My server disk utilization:"
df -h | xargs | awk '{print "Free disk space is:" $11 }'
df -h | xargs | awk '{print "Total disk space is:" $9 }'
echo "percentage of Server Utilised" && df -h | xargs | awk '{print $11/$9100 "%"}'
diskspace=$(df -h | xargs | awk '{print $11/$9100}')
int_disk=$(printf "%.0f" "${diskspace}")
if [[ "$int_disk" -gt "50" ]]
then
echo "Your Server Utilization is more than 50%"
echo "Subject: WARNING, Server Utilization is High"
fi
echo "======================================="
echo "Server Ram utilization:"
free -h | xargs | awk '{print "Free Memory:" $10}'
free -h | xargs | awk '{print "Total Memory:" $8}'
echo "percentage of ram utilized" && free -h | xargs | awk '{print $10/$8*100}'
echo "DONE"
Thank you .....!!!!