Question: Description: As an administrator, you will often find that more things require your time than you have time to give. Automating processes is one solution.
Description:
As an administrator, you will often find that more things require your time than you have time to give. Automating processes is one solution. There are many things on a Linux server that need periodic or even constant monitoring, but checking on these manually is time consuming.
For this lab we are going to create scripts to check on key statistics and then inform us if problems are encountered. Each of these scripts will need to run as a scheduled task and you should determine an appropriate frequency. For example, storage may take a while to fill up but processor utilization changes moment by moment.
Script Resource utilization
As Rob described, we need a script that monitors system load and then notifies the administrator when various thresholds are passed. There are several places where the load statistics can be found. We discussed proc near the beginning of the course and then the top utility recently. There are several other ways which I will leave it up to discover if desired In order to determine if a threshold has been exceeded you will need to isolate the pertinent value from your data source.
Tools such as cut or sed especially when output is piped from one to another can be used to isolate the load statistic. There may be problem, however. These tools process text strings and students often create these scripts to evaluate numeric data they use greater or less than operators. You will EITHER need to convert text data into numeric data OR construct your algorithm so that it doesnt use numeric comparisons.
The script can use decision logic a case statement or a series of if statements to determine if the load exceed a threshold.
For the purpose of this lab in the real world you will determine these based on your own environment significant thresholds and severity are:
Low
Moderate
High
Extreme
The script should notify the administrator with a brief message when load surpasses a threshold but only for one threshold. For example if the load is dont send notifications for Low, Moderate, and High only send one for Extreme.
The minimum requirement is to have it send a system email ie it doesnt have to an example of how to do this was in the scheduling slide deck But you could potentially have it send an SMS message but this is rather more difficult and would require a rdparty messaging service which might not be free
Submit your script file, along with a screenshot of the crontab showing that it is scheduled. To the extent you are able you should also test the script but stress testing your VM so you reach each of the load thresholds is more work than necessary.
Show me even creating the VM what domain to use, etc.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
