linuxMaestro
Instructor
How do I make a script to log the load every 5 minutes?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#!/bin/ksh
#
LOG_FILE=/path/to/system_loading.log
FLAG_FILE=/path/to/loading_flagfile
touch ${FLAG_FILE}
while [[ -f ${FLAG_FILE} ]]
do
uptime >> ${LOG_FILE}
sleep 600
done