![]() Set an executable Linux file permission to “cpu-memory-swap-2.sh” file. ![]() Scpu=$(ssh $server cat /proc/stat | awk '/cpu/')Įcho "$server, $scpu, $smem, $sswap" > /tmp/cpu-mem-swap.csvĮcho "CPU and Memory Report for `date +"%B %Y"`" | mailx -s "CPU and Memory Report on `date`" -a /tmp/cpu-mem-swap.csv CPU Usage Even though CPU load and CPU usage sound similar, they are not interchangeable. ![]() In this article, we’ll look at how to interpret CPU metrics and display them in a human-readable format. # vi /opt/scripts/cpu-memory-swap.shĮcho "-"Įcho "Server_Name CPU(%) Memory(%) Swap(%)"įor server in `more /opt/scripts/server-list.txt` Unlike disk and memory, monitoring the CPU usage on a Linux system isn’t as straightforward. This script allows you to check CPU, memory and swap usage on multiple Linux system from the terminal. Method-1 : Shell Script to Check CPU, Memory and Swap usage on Multiple Linux System Three shell scripts are added in this tutorial to generate a report.Įach bash script has written with unique features and choose the one you need.Īlso, you can modify this script based on your needs. You can use this script to generate a CPU, memory and swap usage for a multiple Linux system. This script will help you to create a report for you. You have a small infrastructure and want to check multiple system performance simultaneously for some reason.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |