How to verify whether NTP setup (Sync) is working or not in Linux? It monitors everything such as CPU utilization, Memory utilization, swap utilization, disk space utilization and much more. Its light-weight monitoring software. #sh -x CpuAlert.sh Delete Blank Lines from file Using AWK tool, Thanks for your wonderful Support and Encouragement, More than 40000 Techies in our community do you want part of it Join NowLearn more & Earn MoreView all Posts, Your email address will not be published. Monitorix got in-built HTTP so you can check the utilization and other stuff on the web. If you want to get CPU utilization percentage through mail alert when the system reaches the given threshold, use the following script. There are many opensource monitoring tools are available to monitor Linux systems performance which will send an email alert when the system reaches the given threshold limit. In this tutorial, I will show how to write a shell script to perform Linux server health check. We added many useful shell scripts in the past. Share It is a scriptable multi-threaded benchmark tool that is most commonly used for database benchmarking. Check Top Processes sorted by RAM or CPU Usage in Linux The following command will show the list of top processes ordered by RAM and CPU use in descendant form (remove the pipeline and head if you want to see the full list): # ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head This will instantly gives you an idea what is going on your system. Output: You will be getting an email alert similar to below. This script collects system information and status like hostname, kernel version, uptime, CPU, memory and disk usage. We can simply sort the current executing processes with its CPU and Memory conception ratio. It will trigger an email when your system reaches 80% CPU utilization. Method-1 : Linux Shell script to monitor CPU utilization with email alert. It monitors everything such as CPU utilization, Memory utilization, swap utilization, disk space utilization and much more. How to Monitor CPU Utilization using Shell Script and Get an Email Alert When CPU Usage is HIGH. Note: Please change the email id and CPU utilization threshold value as per your requirement. Just executing the top command can show you CPU utilization, process details, a number of tasks, memory utilization, a number of zombie processes, etc. If you want to get CPU utilization percentage through mail alert when the system reaches the given threshold, use the following script. It will trigger an email when your system reaches 80% CPU utilization. If you only have few systems and want to monitor them then writing a small shell script can make your task very easy. One of these internal structures (/proc/stat) includes information on the amount of time (in USER_HZ) spent in various states. It will run for every 5 minutes. You can install like so: To display complete CPU information, including per CPU clock-speed and CPU max speed (if available), use the -Cflag as follows: us: Time spent running non-kernel code. Also, here is a simple link for monitoring your server load “ Load monitoring in Linux servers “ “ ps command ” and “ top command ” have a lot of options, here I am explaining some useful command combinations to find the resource(cpu, memory…) usages of users in the server. It is sorted in reverse order to display top 10 CPU eating process. I have executed below mentioned script from my test server.