Requirements: have to do now Linux operating system, automatic checking memory usage and/bob_dir1/bob_dir2/bob_dir3 disk usage, determine if the utilization rate of more than 80% then the script output current point and the actual usage size problem, for example: MEM: 90% or/bob_test_dir2:90%, and the inspection need to automatically perform at nine o 'clock every morning, please configure automatic task in crontab, please thinking () in the annotation and scripts in the/TMP/bob_apq2. Sh file,
CodePudding user response:
Through the top command for memory usage, through LSBLK command to check the hard disk usage, the information output to a buffer analysis to obtain the needed information, the judgment by echo again after the output, use crontab set run regularly,