13,420
edits
Changes
no edit summary
#Perform this section in your '''c7host''' machine
#Make certain you are logged in as '''root'''.
#Change to the '''/root/bin''' directory.
#Download, study, and run the following shell script. Issue the command:<br><b><code><span style=" pointer-events:none;cursor:default;color:#3366CC;font-size:1.2em;">wget https://scs.senecac.on.ca/~murray.saul/monitor-disk-space.bash</span></code></b>
#Try to understand what this Bash Shell script does (refer to man pages for the '''awk''' command), and then run the script as root.
#Give execute permissions and run this shell script. This script is supposed to notify the root user by email if there are any potential partition size issues.
#Issue the follow command: <b><code><span style="color:#3366CC;font-size:1.2em;">mail</span></code></b>. Check to see if there are any mail messages. If there are mail messages, they do not relate to this shell script execution. Remove all mail messages by typing d immediately followed by a mail message number range (eg. to remove all 5 messages, type '''d1-5''' and then press '''ENTER''' and enter '''q''' to exit the mail application).
#Edit the monitor-disk-space.bash shell script, and set the '''ALERT''' value from 90 to '''40''', save your editing session, and re-run this shell script.
#Run the '''mail''' command. Do you have a mail message? Enter the mail message number to view the message. If there is a message, what is the purpose of this message?