Introduction
In this challenge, you will enhance the provided Linux system monitor script by adding a logging feature. The goal is to record resource usage (CPU, memory, and disk) into a log file after every monitoring cycle. This task will test your ability to modify and extend a shell script to include file-based output.
The base script is provided for you. You need to add the logging feature to it.
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
linux(("Linux")) -.-> linux/BasicSystemCommandsGroup(["Basic System Commands"])
linux(("Linux")) -.-> linux/BasicFileOperationsGroup(["Basic File Operations"])
linux(("Linux")) -.-> linux/SystemInformationandMonitoringGroup(["System Information and Monitoring"])
linux/BasicSystemCommandsGroup -.-> linux/echo("Text Display")
linux/BasicFileOperationsGroup -.-> linux/cat("File Concatenating")
linux/SystemInformationandMonitoringGroup -.-> linux/date("Date/Time Displaying")
subgraph Lab Skills
linux/echo -.-> lab-299447{{"Add Logging to the System Monitor"}}
linux/cat -.-> lab-299447{{"Add Logging to the System Monitor"}}
linux/date -.-> lab-299447{{"Add Logging to the System Monitor"}}
end