to facilitate the analysis of the problem, a Linux stateful inspection script was written, and the script could be placed in any directory, and the script would output log records to the current directory after it was executed. The direct execution script can be used for one-time detection and can be analyzed through logs. If long monitoring is required, the-x parameter can be executed, and the script automatically increments the scheduled task and outputs the log to the/tmp directory. If you need to delete a scheduled task, you can execute the-XX parameter.
Script:wgethttp://jinxiang.oss-cn-hangzhou.aliyuncs.com/vmstatuscheck.sh
#How to use:
#Example:./vmstatuscheck.sh#script Check mechanism:
#1, detect internal and external network IP, mask
#2, detecting Gateway routing settings
#3, detection DNS settings, domain name resolution
#4, check the amount of disk space used
#5, check the boot mount file
#6, check cpu| memory load condition
#
#脚本参数说明:
#-x (optional): Increased scheduled tasks for monitoring server status
#-xx (optional): Delete Scheduled Tasks
Execution Result:[email protected] shell]#./vmstatuscheck.sh
To increase scheduled tasks and delete scheduled tasks:
Linux System load Status check script