Skip to content
$ lynuxpro
← All projects

LINUX PROJECT · ABOUT 30 MIN · +150 XP

Server health report

Your team lead wants a quick health report for the production fleet before Friday's deploy. Everything you need is on this machine: the server inventory in ~/servers.csv, the nginx log in /var/log/nginx/access.log and the app log in /var/log/app/app.log.

Your tasks

  1. Create ~/ops with two folders inside it: reports and backup.
  2. Save the names of all prod servers (from ~/servers.csv), one per line, in ~/ops/reports/prod-servers.txt.
  3. Save every ERROR line from /var/log/app/app.log in ~/ops/reports/app-errors.log.
  4. Write the number of HTTP 500 responses in the nginx log into ~/ops/reports/http-500.txt (just the number).
  5. Make ~/ops/reports/app-errors.log readable and writable by you, readable by your group, and nothing for others (rw-r-----).
  6. Create a gzip tar archive ~/ops/backup/logs.tar.gz containing a copy of access.log (copy it into ~/ops/backup first, then archive it from that folder).

Stuck? Every step is covered in the Linux lessons.

Sign in to start this project

Your progress is checked and saved to your profile.

Sign in