Answered step by step
Verified Expert Solution
Question
1 Approved Answer
vmstat, top, and free are all commonly used linux system memory tools. Using the links above as reference for flags and formatting, run each of
vmstat, top, and free are all commonly used linux system memory tools. Using the links above as reference for flags and formatting, run each of the commands in a bash script (.sh extension) in the order above, and save their output to a file. Name your bash script memoryCheck.sh. Bash scripts are typically used to perform a series of commands in the order that they are supplied in the file, and they are extremely finicky about spacing so I suggeest you test frequently. Anything that you can run from a terminal can be run with the exact same call within a bash script. First time writing a bash script? No problem! [Here's a great resource] (https://www.linuxfoundation.org/blog/blog/classic-sysadmin-writing-a- simple-bash-script) . You may use whichever flags you would like with each tool, so long as you can answer the questions below based on that output. You can use the cat command to copy the information from your terminal into a file. The files should be named vmstat.txt, , and free.txt. Note that bash scripts must start with a shebang for you to be able to execute them using ./memoryCheck.sh. Once the output has been saved, answer the following in a txt file named 1. What is the difference between the 3 tools? 2. You're working on an ubuntu system when you notice that the system has become less responsive to your clicks. What could be happening in memory to slow the system? Which of the 3 commands would be most appropriate to check if that's the case? 3. You're working on an ubuntu system when you get a message saying that there isn't enough free memory to save your text file. Would this indicate that RAM or your HDD is full? Which command of the 3 above would be the fastest way to check the cause of the message? 4. You would like to know how often processes are being interrupted or page faulting, and how much memory has been reserved to swap pages on and off RAM. Which command is best for that? What entries would you look at? All text files should be generated in the same directory as the bash script! To Submit When you are done, you should use git to git push the following to your assignment repo (see instructions above): 5. batchSchedulingComparison.py 6. memoryCheck.sh 7. answers.txt 8. vmstat.txt 9. top.txt 10. free.txt You can submit as many times as you would like, and you can check whether your code is functioning correctly using the autograder
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started