The disk that filled at 3 am
A college file server has a 500 GB disk. Every week it fills a little more. Nobody looks.
At 3 am on a Tuesday the disk is full. The server stops saving files. At 9 am two hundred students cannot save their work.
A simple alert on Friday would have saved the week.
Key words
| Word | What it means |
|---|---|
| Network | computers and devices joined together so they can share data |
| Monitoring | watching a system all the time to see how it is doing |
| Logging | writing down what a system does, with the time |
| Alert | a message that tells a person something needs attention |
| Threshold | the level at which an alert is sent, such as 80 out of 100 |
| Capacity management | making sure there is always enough disk, memory and speed for the work |
| Resource use | how much of a part is in use, as a percentage |
| Script | a short program that does a job for you |
| Automation | getting a computer to do a repeated job without a person |
| Hardware | the physical parts of a computer |
| Software | the programs that run on the hardware |
The cells students fill in are left blank in this preview.
By the end of this lesson
Note
I can explain how monitoring, logs, alerts and scripts help review and improve a network.
Starter
Have a go
Starter
3 questionsYour answers are marked here and are not kept. A college account keeps every student’s marks.
Monitoring, logging and alerts
Monitoring watches a system. It checks the disk, the memory, the speed and whether each service is up.
Logging keeps a record. When a fault happens, the log tells you when and why.
An alert is sent when a number crosses a threshold. Many tools send the alert by email, so the technician hears at once.
Watch a real system
The commands below ran on a real Ubuntu system, the same kind as the linux-admin lab. Press Start the lab, then press Run.
This lab does not send email. You will see the check and the alert line a tool would act on.
How much memory is in use?
free -m | awk 'NR==2 {print "memory used", $3, "of", $2, "MB"}'A command for the lesson’s lab terminal. It is shown here and not run.
Check the disk against a threshold of 80
use=$(df / | awk 'NR==2 {print $5}' | tr -d '%'); if [ "$use" -gt 80 ]; then echo "ALERT disk $use"; else echo "disk ok at $use"; fiA command for the lesson’s lab terminal. It is shown here and not run.